summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml13
-rw-r--r--COPYRIGHT.txt11
-rw-r--r--DONORS.md2
-rw-r--r--SConstruct23
-rw-r--r--core/array.cpp11
-rw-r--r--core/array.h2
-rw-r--r--core/bind/core_bind.cpp78
-rw-r--r--core/bind/core_bind.h57
-rw-r--r--core/color.cpp131
-rw-r--r--core/color.h23
-rw-r--r--core/event_queue.cpp157
-rw-r--r--core/io/file_access_network.cpp2
-rw-r--r--core/io/file_access_pack.cpp4
-rw-r--r--core/io/resource_format_binary.cpp45
-rw-r--r--core/io/resource_format_binary.h2
-rw-r--r--core/io/stream_peer.cpp3
-rw-r--r--core/map.h3
-rw-r--r--core/math/a_star.cpp11
-rw-r--r--core/math/a_star.h1
-rw-r--r--core/math/camera_matrix.cpp85
-rw-r--r--core/math/camera_matrix.h1
-rw-r--r--core/math/triangle_mesh.cpp2
-rw-r--r--core/object.cpp12
-rw-r--r--core/object.h5
-rw-r--r--core/ordered_hash_map.h6
-rw-r--r--core/os/dir_access.cpp7
-rw-r--r--core/os/dir_access.h2
-rw-r--r--core/os/file_access.h3
-rw-r--r--core/os/os.cpp2
-rw-r--r--core/os/os.h16
-rw-r--r--core/project_settings.cpp68
-rw-r--r--core/reference.cpp13
-rw-r--r--core/reference.h2
-rw-r--r--core/register_core_types.cpp6
-rw-r--r--core/script_debugger_remote.cpp3
-rw-r--r--core/script_language.cpp1
-rw-r--r--core/set.h3
-rw-r--r--core/type_info.h75
-rw-r--r--core/undo_redo.cpp4
-rw-r--r--core/variant.cpp4
-rw-r--r--core/variant.h1
-rw-r--r--core/variant_call.cpp12
-rw-r--r--core/variant_op.cpp10
-rw-r--r--doc/base/classes.xml60265
-rw-r--r--doc/classes/@GDScript.xml1078
-rw-r--r--doc/classes/@Global Scope.xml1235
-rw-r--r--doc/classes/@NativeScript.xml15
-rw-r--r--doc/classes/@VisualScript.xml15
-rw-r--r--doc/classes/ARVRAnchor.xml60
-rw-r--r--doc/classes/ARVRCamera.xml18
-rw-r--r--doc/classes/ARVRController.xml100
-rw-r--r--doc/classes/ARVRInterface.xml107
-rw-r--r--doc/classes/ARVROrigin.xml42
-rw-r--r--doc/classes/ARVRPositionalTracker.xml89
-rw-r--r--doc/classes/ARVRScriptInterface.xml109
-rw-r--r--doc/classes/ARVRServer.xml184
-rw-r--r--doc/classes/AStar.xml226
-rw-r--r--doc/classes/AcceptDialog.xml115
-rw-r--r--doc/classes/AnimatedSprite.xml182
-rw-r--r--doc/classes/AnimatedSprite3D.xml103
-rw-r--r--doc/classes/Animation.xml455
-rw-r--r--doc/classes/AnimationPlayer.xml390
-rw-r--r--doc/classes/AnimationTreePlayer.xml667
-rw-r--r--doc/classes/Area.xml507
-rw-r--r--doc/classes/Area2D.xml465
-rw-r--r--doc/classes/Array.xml257
-rw-r--r--doc/classes/ArrayMesh.xml267
-rw-r--r--doc/classes/AtlasTexture.xml71
-rw-r--r--doc/classes/AudioBusLayout.xml15
-rw-r--r--doc/classes/AudioEffect.xml17
-rw-r--r--doc/classes/AudioEffectAmplify.xml38
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml15
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml15
-rw-r--r--doc/classes/AudioEffectChorus.xml268
-rw-r--r--doc/classes/AudioEffectCompressor.xml129
-rw-r--r--doc/classes/AudioEffectDelay.xml225
-rw-r--r--doc/classes/AudioEffectDistortion.xml107
-rw-r--r--doc/classes/AudioEffectEQ.xml39
-rw-r--r--doc/classes/AudioEffectEQ10.xml15
-rw-r--r--doc/classes/AudioEffectEQ21.xml15
-rw-r--r--doc/classes/AudioEffectEQ6.xml15
-rw-r--r--doc/classes/AudioEffectFilter.xml89
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml15
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml15
-rw-r--r--doc/classes/AudioEffectLimiter.xml81
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml15
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml15
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml15
-rw-r--r--doc/classes/AudioEffectPanner.xml33
-rw-r--r--doc/classes/AudioEffectPhaser.xml97
-rw-r--r--doc/classes/AudioEffectPitchShift.xml33
-rw-r--r--doc/classes/AudioEffectReverb.xml145
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml65
-rw-r--r--doc/classes/AudioServer.xml317
-rw-r--r--doc/classes/AudioStream.xml17
-rw-r--r--doc/classes/AudioStreamOGGVorbis.xml70
-rw-r--r--doc/classes/AudioStreamPlayback.xml15
-rw-r--r--doc/classes/AudioStreamPlayer.xml156
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml186
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml363
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml53
-rw-r--r--doc/classes/AudioStreamSample.xml156
-rw-r--r--doc/classes/BackBufferCopy.xml64
-rw-r--r--doc/classes/BaseButton.xml213
-rw-r--r--doc/classes/Basis.xml182
-rw-r--r--doc/classes/BitMap.xml84
-rw-r--r--doc/classes/BitmapFont.xml161
-rw-r--r--doc/classes/BoneAttachment.xml33
-rw-r--r--doc/classes/BoxContainer.xml56
-rw-r--r--doc/classes/BoxShape.xml38
-rw-r--r--doc/classes/Button.xml137
-rw-r--r--doc/classes/ButtonGroup.xml28
-rw-r--r--doc/classes/Camera.xml251
-rw-r--r--doc/classes/Camera2D.xml375
-rw-r--r--doc/classes/CanvasItem.xml671
-rw-r--r--doc/classes/CanvasItemMaterial.xml65
-rw-r--r--doc/classes/CanvasLayer.xml148
-rw-r--r--doc/classes/CanvasModulate.xml37
-rw-r--r--doc/classes/CapsuleMesh.xml87
-rw-r--r--doc/classes/CapsuleShape.xml57
-rw-r--r--doc/classes/CapsuleShape2D.xml57
-rw-r--r--doc/classes/CenterContainer.xml37
-rw-r--r--doc/classes/CheckBox.xml51
-rw-r--r--doc/classes/CheckButton.xml47
-rw-r--r--doc/classes/CircleShape2D.xml38
-rw-r--r--doc/classes/ClassDB.xml222
-rw-r--r--doc/classes/CollisionObject.xml232
-rw-r--r--doc/classes/CollisionObject2D.xml233
-rw-r--r--doc/classes/CollisionPolygon.xml70
-rw-r--r--doc/classes/CollisionPolygon2D.xml96
-rw-r--r--doc/classes/CollisionShape.xml69
-rw-r--r--doc/classes/CollisionShape2D.xml70
-rw-r--r--doc/classes/Color.xml222
-rw-r--r--doc/classes/ColorPicker.xml103
-rw-r--r--doc/classes/ColorPickerButton.xml98
-rw-r--r--doc/classes/ColorRect.xml45
-rw-r--r--doc/classes/ConcavePolygonShape.xml33
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml38
-rw-r--r--doc/classes/ConeTwistJoint.xml57
-rw-r--r--doc/classes/ConfigFile.xml119
-rw-r--r--doc/classes/ConfirmationDialog.xml24
-rw-r--r--doc/classes/Container.xml46
-rw-r--r--doc/classes/Control.xml1062
-rw-r--r--doc/classes/ConvexPolygonShape.xml35
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml47
-rw-r--r--doc/classes/CubeMap.xml113
-rw-r--r--doc/classes/CubeMesh.xml87
-rw-r--r--doc/classes/Curve.xml237
-rw-r--r--doc/classes/Curve2D.xml200
-rw-r--r--doc/classes/Curve3D.xml228
-rw-r--r--doc/classes/CurveTexture.xml43
-rw-r--r--doc/classes/CylinderMesh.xml104
-rw-r--r--doc/classes/DampedSpringJoint2D.xml91
-rw-r--r--doc/classes/Dictionary.xml82
-rw-r--r--doc/classes/DirectionalLight.xml89
-rw-r--r--doc/classes/Directory.xml196
-rw-r--r--doc/classes/DynamicFont.xml155
-rw-r--r--doc/classes/DynamicFontData.xml33
-rw-r--r--doc/classes/EditorExportPlugin.xml61
-rw-r--r--doc/classes/EditorFileDialog.xml193
-rw-r--r--doc/classes/EditorFileSystem.xml98
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml102
-rw-r--r--doc/classes/EditorImportPlugin.xml93
-rw-r--r--doc/classes/EditorInterface.xml129
-rw-r--r--doc/classes/EditorPlugin.xml390
-rw-r--r--doc/classes/EditorResourcePreview.xml83
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml48
-rw-r--r--doc/classes/EditorScript.xml43
-rw-r--r--doc/classes/EditorSelection.xml63
-rw-r--r--doc/classes/EditorSettings.xml108
-rw-r--r--doc/classes/EditorSpatialGizmo.xml152
-rw-r--r--doc/classes/EncodedObjectAsID.xml29
-rw-r--r--doc/classes/Engine.xml114
-rw-r--r--doc/classes/Environment.xml1173
-rw-r--r--doc/classes/File.xml420
-rw-r--r--doc/classes/FileDialog.xml222
-rw-r--r--doc/classes/Font.xml94
-rw-r--r--doc/classes/FuncRef.xml42
-rw-r--r--doc/classes/GDFunctionState.xml46
-rw-r--r--doc/classes/GDNative.xml57
-rw-r--r--doc/classes/GDNativeClass.xml21
-rw-r--r--doc/classes/GDNativeLibrary.xml51
-rw-r--r--doc/classes/GDScript.xml38
-rw-r--r--doc/classes/GIProbe.xml201
-rw-r--r--doc/classes/GIProbeData.xml193
-rw-r--r--doc/classes/Generic6DOFJoint.xml265
-rw-r--r--doc/classes/Geometry.xml267
-rw-r--r--doc/classes/GeometryInstance.xml165
-rw-r--r--doc/classes/Gradient.xml131
-rw-r--r--doc/classes/GradientTexture.xml47
-rw-r--r--doc/classes/GraphEdit.xml250
-rw-r--r--doc/classes/GraphNode.xml365
-rw-r--r--doc/classes/GridContainer.xml43
-rw-r--r--doc/classes/GrooveJoint2D.xml55
-rw-r--r--doc/classes/HBoxContainer.xml21
-rw-r--r--doc/classes/HScrollBar.xml37
-rw-r--r--doc/classes/HSeparator.xml23
-rw-r--r--doc/classes/HSlider.xml35
-rw-r--r--doc/classes/HSplitContainer.xml27
-rw-r--r--doc/classes/HTTPClient.xml356
-rw-r--r--doc/classes/HTTPRequest.xml184
-rw-r--r--doc/classes/HingeJoint.xml97
-rw-r--r--doc/classes/IP.xml102
-rw-r--r--doc/classes/IP_Unix.xml15
-rw-r--r--doc/classes/Image.xml485
-rw-r--r--doc/classes/ImageTexture.xml119
-rw-r--r--doc/classes/ImmediateGeometry.xml111
-rw-r--r--doc/classes/Input.xml335
-rw-r--r--doc/classes/InputDefault.xml17
-rw-r--r--doc/classes/InputEvent.xml131
-rw-r--r--doc/classes/InputEventAction.xml44
-rw-r--r--doc/classes/InputEventJoypadButton.xml63
-rw-r--r--doc/classes/InputEventJoypadMotion.xml52
-rw-r--r--doc/classes/InputEventKey.xml80
-rw-r--r--doc/classes/InputEventMouse.xml69
-rw-r--r--doc/classes/InputEventMouseButton.xml79
-rw-r--r--doc/classes/InputEventMouseMotion.xml52
-rw-r--r--doc/classes/InputEventScreenDrag.xml86
-rw-r--r--doc/classes/InputEventScreenTouch.xml63
-rw-r--r--doc/classes/InputEventWithModifiers.xml103
-rw-r--r--doc/classes/InputMap.xml110
-rw-r--r--doc/classes/InstancePlaceholder.xml42
-rw-r--r--doc/classes/InterpolatedCamera.xml73
-rw-r--r--doc/classes/ItemList.xml558
-rw-r--r--doc/classes/JSON.xml31
-rw-r--r--doc/classes/JSONParseResult.xml81
-rw-r--r--doc/classes/Joint.xml81
-rw-r--r--doc/classes/Joint2D.xml87
-rw-r--r--doc/classes/KinematicBody.xml109
-rw-r--r--doc/classes/KinematicBody2D.xml111
-rw-r--r--doc/classes/KinematicCollision.xml119
-rw-r--r--doc/classes/KinematicCollision2D.xml119
-rw-r--r--doc/classes/Label.xml275
-rw-r--r--doc/classes/LargeTexture.xml96
-rw-r--r--doc/classes/Light.xml185
-rw-r--r--doc/classes/Light2D.xml432
-rw-r--r--doc/classes/LightOccluder2D.xml57
-rw-r--r--doc/classes/Line2D.xml253
-rw-r--r--doc/classes/LineEdit.xml338
-rw-r--r--doc/classes/LineShape2D.xml57
-rw-r--r--doc/classes/LinkButton.xml76
-rw-r--r--doc/classes/Listener.xml39
-rw-r--r--doc/classes/MainLoop.xml136
-rw-r--r--doc/classes/MarginContainer.xml27
-rw-r--r--doc/classes/Marshalls.xml71
-rw-r--r--doc/classes/Material.xml55
-rw-r--r--doc/classes/MenuButton.xml59
-rw-r--r--doc/classes/Mesh.xml143
-rw-r--r--doc/classes/MeshDataTool.xml337
-rw-r--r--doc/classes/MeshInstance.xml94
-rw-r--r--doc/classes/MeshLibrary.xml158
-rw-r--r--doc/classes/MultiMesh.xml151
-rw-r--r--doc/classes/MultiMeshInstance.xml37
-rw-r--r--doc/classes/Mutex.xml38
-rw-r--r--doc/classes/NativeScript.xml55
-rw-r--r--doc/classes/Navigation.xml111
-rw-r--r--doc/classes/Navigation2D.xml73
-rw-r--r--doc/classes/NavigationMesh.xml349
-rw-r--r--doc/classes/NavigationMeshInstance.xml49
-rw-r--r--doc/classes/NavigationPolygon.xml127
-rw-r--r--doc/classes/NavigationPolygonInstance.xml49
-rw-r--r--doc/classes/NetworkedMultiplayerENet.xml85
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml118
-rw-r--r--doc/classes/Nil.xml171
-rw-r--r--doc/classes/NinePatchRect.xml150
-rw-r--r--doc/classes/Node.xml870
-rw-r--r--doc/classes/Node2D.xml343
-rw-r--r--doc/classes/NodePath.xml81
-rw-r--r--doc/classes/OS.xml854
-rw-r--r--doc/classes/Object.xml392
-rw-r--r--doc/classes/OccluderPolygon2D.xml71
-rw-r--r--doc/classes/OmniLight.xml63
-rw-r--r--doc/classes/OptionButton.xml237
-rw-r--r--doc/classes/PCKPacker.xml43
-rw-r--r--doc/classes/PHashTranslation.xml25
-rw-r--r--doc/classes/PackedDataContainer.xml33
-rw-r--r--doc/classes/PackedDataContainerRef.xml21
-rw-r--r--doc/classes/PackedScene.xml55
-rw-r--r--doc/classes/PacketPeer.xml77
-rw-r--r--doc/classes/PacketPeerStream.xml54
-rw-r--r--doc/classes/PacketPeerUDP.xml79
-rw-r--r--doc/classes/Panel.xml25
-rw-r--r--doc/classes/PanelContainer.xml21
-rw-r--r--doc/classes/PanoramaSky.xml33
-rw-r--r--doc/classes/ParallaxBackground.xml125
-rw-r--r--doc/classes/ParallaxLayer.xml71
-rw-r--r--doc/classes/Particles.xml303
-rw-r--r--doc/classes/Particles2D.xml330
-rw-r--r--doc/classes/ParticlesMaterial.xml449
-rw-r--r--doc/classes/Path.xml37
-rw-r--r--doc/classes/Path2D.xml37
-rw-r--r--doc/classes/PathFollow.xml145
-rw-r--r--doc/classes/PathFollow2D.xml133
-rw-r--r--doc/classes/Performance.xml79
-rw-r--r--doc/classes/Physics2DDirectBodyState.xml234
-rw-r--r--doc/classes/Physics2DDirectBodyStateSW.xml17
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml140
-rw-r--r--doc/classes/Physics2DServer.xml1121
-rw-r--r--doc/classes/Physics2DServerSW.xml17
-rw-r--r--doc/classes/Physics2DShapeQueryParameters.xml138
-rw-r--r--doc/classes/Physics2DShapeQueryResult.xml53
-rw-r--r--doc/classes/Physics2DTestMotionResult.xml69
-rw-r--r--doc/classes/PhysicsBody.xml109
-rw-r--r--doc/classes/PhysicsBody2D.xml122
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml237
-rw-r--r--doc/classes/PhysicsDirectBodyStateSW.xml15
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml81
-rw-r--r--doc/classes/PhysicsServer.xml1276
-rw-r--r--doc/classes/PhysicsServerSW.xml15
-rw-r--r--doc/classes/PhysicsShapeQueryParameters.xml107
-rw-r--r--doc/classes/PhysicsShapeQueryResult.xml54
-rw-r--r--doc/classes/PinJoint.xml47
-rw-r--r--doc/classes/PinJoint2D.xml35
-rw-r--r--doc/classes/Plane.xml160
-rw-r--r--doc/classes/PlaneMesh.xml70
-rw-r--r--doc/classes/PlaneShape.xml33
-rw-r--r--doc/classes/Polygon2D.xml233
-rw-r--r--doc/classes/PolygonPathFinder.xml89
-rw-r--r--doc/classes/PoolByteArray.xml138
-rw-r--r--doc/classes/PoolColorArray.xml93
-rw-r--r--doc/classes/PoolIntArray.xml93
-rw-r--r--doc/classes/PoolRealArray.xml93
-rw-r--r--doc/classes/PoolStringArray.xml102
-rw-r--r--doc/classes/PoolVector2Array.xml93
-rw-r--r--doc/classes/PoolVector3Array.xml93
-rw-r--r--doc/classes/Popup.xml91
-rw-r--r--doc/classes/PopupDialog.xml17
-rw-r--r--doc/classes/PopupMenu.xml509
-rw-r--r--doc/classes/PopupPanel.xml21
-rw-r--r--doc/classes/Position2D.xml17
-rw-r--r--doc/classes/Position3D.xml17
-rw-r--r--doc/classes/PrimitiveMesh.xml42
-rw-r--r--doc/classes/PrismMesh.xml104
-rw-r--r--doc/classes/ProceduralSky.xml285
-rw-r--r--doc/classes/ProgressBar.xml47
-rw-r--r--doc/classes/ProjectSettings.xml159
-rw-r--r--doc/classes/ProximityGroup.xml71
-rw-r--r--doc/classes/QuadMesh.xml17
-rw-r--r--doc/classes/Quat.xml148
-rw-r--r--doc/classes/RID.xml33
-rw-r--r--doc/classes/Range.xml182
-rw-r--r--doc/classes/RayCast.xml201
-rw-r--r--doc/classes/RayCast2D.xml216
-rw-r--r--doc/classes/RayShape.xml33
-rw-r--r--doc/classes/RayShape2D.xml38
-rw-r--r--doc/classes/Rect2.xml155
-rw-r--r--doc/classes/Rect3.xml202
-rw-r--r--doc/classes/RectangleShape2D.xml38
-rw-r--r--doc/classes/Reference.xml37
-rw-r--r--doc/classes/ReferenceRect.xml21
-rw-r--r--doc/classes/ReflectionProbe.xml213
-rw-r--r--doc/classes/RegEx.xml114
-rw-r--r--doc/classes/RegExMatch.xml68
-rw-r--r--doc/classes/RemoteTransform.xml97
-rw-r--r--doc/classes/RemoteTransform2D.xml97
-rw-r--r--doc/classes/Resource.xml119
-rw-r--r--doc/classes/ResourceImporter.xml15
-rw-r--r--doc/classes/ResourceImporterOGGVorbis.xml15
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml51
-rw-r--r--doc/classes/ResourceLoader.xml74
-rw-r--r--doc/classes/ResourcePreloader.xml76
-rw-r--r--doc/classes/ResourceSaver.xml51
-rw-r--r--doc/classes/RichTextLabel.xml400
-rw-r--r--doc/classes/RigidBody.xml449
-rw-r--r--doc/classes/RigidBody2D.xml489
-rw-r--r--doc/classes/SceneState.xml175
-rw-r--r--doc/classes/SceneTree.xml408
-rw-r--r--doc/classes/SceneTreeTimer.xml35
-rw-r--r--doc/classes/Script.xml88
-rw-r--r--doc/classes/ScriptEditor.xml45
-rw-r--r--doc/classes/ScrollBar.xml41
-rw-r--r--doc/classes/ScrollContainer.xml87
-rw-r--r--doc/classes/SegmentShape2D.xml57
-rw-r--r--doc/classes/Semaphore.xml31
-rw-r--r--doc/classes/Separator.xml17
-rw-r--r--doc/classes/Shader.xml73
-rw-r--r--doc/classes/ShaderMaterial.xml47
-rw-r--r--doc/classes/Shape.xml15
-rw-r--r--doc/classes/Shape2D.xml102
-rw-r--r--doc/classes/ShortCut.xml53
-rw-r--r--doc/classes/Skeleton.xml221
-rw-r--r--doc/classes/Sky.xml49
-rw-r--r--doc/classes/Slider.xml73
-rw-r--r--doc/classes/SliderJoint.xml125
-rw-r--r--doc/classes/Spatial.xml406
-rw-r--r--doc/classes/SpatialGizmo.xml15
-rw-r--r--doc/classes/SpatialMaterial.xml1021
-rw-r--r--doc/classes/SpatialVelocityTracker.xml51
-rw-r--r--doc/classes/SphereMesh.xml104
-rw-r--r--doc/classes/SphereShape.xml33
-rw-r--r--doc/classes/SpinBox.xml82
-rw-r--r--doc/classes/SplitContainer.xml91
-rw-r--r--doc/classes/SpotLight.xml27
-rw-r--r--doc/classes/Sprite.xml241
-rw-r--r--doc/classes/Sprite3D.xml119
-rw-r--r--doc/classes/SpriteBase3D.xml205
-rw-r--r--doc/classes/SpriteFrames.xml159
-rw-r--r--doc/classes/StaticBody.xml97
-rw-r--r--doc/classes/StaticBody2D.xml93
-rw-r--r--doc/classes/StreamPeer.xml279
-rw-r--r--doc/classes/StreamPeerBuffer.xml69
-rw-r--r--doc/classes/StreamPeerSSL.xml64
-rw-r--r--doc/classes/StreamPeerTCP.xml74
-rw-r--r--doc/classes/StreamTexture.xml33
-rw-r--r--doc/classes/String.xml730
-rw-r--r--doc/classes/StyleBox.xml97
-rw-r--r--doc/classes/StyleBoxEmpty.xml17
-rw-r--r--doc/classes/StyleBoxFlat.xml338
-rw-r--r--doc/classes/StyleBoxTexture.xml217
-rw-r--r--doc/classes/SurfaceTool.xml226
-rw-r--r--doc/classes/TCP_Server.xml52
-rw-r--r--doc/classes/TabContainer.xml238
-rw-r--r--doc/classes/Tabs.xml263
-rw-r--r--doc/classes/TextEdit.xml553
-rw-r--r--doc/classes/Texture.xml141
-rw-r--r--doc/classes/TextureButton.xml162
-rw-r--r--doc/classes/TextureProgress.xml201
-rw-r--r--doc/classes/TextureRect.xml94
-rw-r--r--doc/classes/Theme.xml306
-rw-r--r--doc/classes/Thread.xml60
-rw-r--r--doc/classes/TileMap.xml537
-rw-r--r--doc/classes/TileSet.xml372
-rw-r--r--doc/classes/Timer.xml151
-rw-r--r--doc/classes/ToolButton.xml46
-rw-r--r--doc/classes/TouchScreenButton.xml181
-rw-r--r--doc/classes/Transform.xml168
-rw-r--r--doc/classes/Transform2D.xml177
-rw-r--r--doc/classes/Translation.xml81
-rw-r--r--doc/classes/TranslationServer.xml60
-rw-r--r--doc/classes/Tree.xml495
-rw-r--r--doc/classes/TreeItem.xml555
-rw-r--r--doc/classes/TriangleMesh.xml15
-rw-r--r--doc/classes/Tween.xml477
-rw-r--r--doc/classes/UndoRedo.xml154
-rw-r--r--doc/classes/VBoxContainer.xml21
-rw-r--r--doc/classes/VScrollBar.xml36
-rw-r--r--doc/classes/VSeparator.xml23
-rw-r--r--doc/classes/VSlider.xml35
-rw-r--r--doc/classes/VSplitContainer.xml27
-rw-r--r--doc/classes/Variant.xml17
-rw-r--r--doc/classes/Vector2.xml225
-rw-r--r--doc/classes/Vector3.xml253
-rw-r--r--doc/classes/VehicleBody.xml110
-rw-r--r--doc/classes/VehicleWheel.xml199
-rw-r--r--doc/classes/VideoPlayer.xml201
-rw-r--r--doc/classes/VideoStream.xml15
-rw-r--r--doc/classes/Viewport.xml668
-rw-r--r--doc/classes/ViewportContainer.xml33
-rw-r--r--doc/classes/ViewportTexture.xml33
-rw-r--r--doc/classes/VisibilityEnabler.xml51
-rw-r--r--doc/classes/VisibilityEnabler2D.xml70
-rw-r--r--doc/classes/VisibilityNotifier.xml71
-rw-r--r--doc/classes/VisibilityNotifier2D.xml71
-rw-r--r--doc/classes/VisualInstance.xml53
-rw-r--r--doc/classes/VisualScript.xml467
-rw-r--r--doc/classes/VisualScriptBasicTypeConstant.xml49
-rw-r--r--doc/classes/VisualScriptBuiltinFunc.xml149
-rw-r--r--doc/classes/VisualScriptClassConstant.xml49
-rw-r--r--doc/classes/VisualScriptComment.xml65
-rw-r--r--doc/classes/VisualScriptCondition.xml15
-rw-r--r--doc/classes/VisualScriptConstant.xml49
-rw-r--r--doc/classes/VisualScriptConstructor.xml49
-rw-r--r--doc/classes/VisualScriptCustomNode.xml133
-rw-r--r--doc/classes/VisualScriptDeconstruct.xml35
-rw-r--r--doc/classes/VisualScriptEmitSignal.xml33
-rw-r--r--doc/classes/VisualScriptEngineSingleton.xml33
-rw-r--r--doc/classes/VisualScriptExpression.xml15
-rw-r--r--doc/classes/VisualScriptFunction.xml15
-rw-r--r--doc/classes/VisualScriptFunctionCall.xml199
-rw-r--r--doc/classes/VisualScriptFunctionState.xml41
-rw-r--r--doc/classes/VisualScriptGlobalConstant.xml33
-rw-r--r--doc/classes/VisualScriptIndexGet.xml15
-rw-r--r--doc/classes/VisualScriptIndexSet.xml15
-rw-r--r--doc/classes/VisualScriptInputAction.xml57
-rw-r--r--doc/classes/VisualScriptIterator.xml15
-rw-r--r--doc/classes/VisualScriptLocalVar.xml49
-rw-r--r--doc/classes/VisualScriptLocalVarSet.xml49
-rw-r--r--doc/classes/VisualScriptMathConstant.xml51
-rw-r--r--doc/classes/VisualScriptNode.xml49
-rw-r--r--doc/classes/VisualScriptOperator.xml49
-rw-r--r--doc/classes/VisualScriptPreload.xml33
-rw-r--r--doc/classes/VisualScriptPropertyGet.xml137
-rw-r--r--doc/classes/VisualScriptPropertySet.xml177
-rw-r--r--doc/classes/VisualScriptResourcePath.xml33
-rw-r--r--doc/classes/VisualScriptReturn.xml49
-rw-r--r--doc/classes/VisualScriptSceneNode.xml33
-rw-r--r--doc/classes/VisualScriptSceneTree.xml15
-rw-r--r--doc/classes/VisualScriptSelect.xml33
-rw-r--r--doc/classes/VisualScriptSelf.xml15
-rw-r--r--doc/classes/VisualScriptSequence.xml33
-rw-r--r--doc/classes/VisualScriptSubCall.xml23
-rw-r--r--doc/classes/VisualScriptSwitch.xml15
-rw-r--r--doc/classes/VisualScriptTypeCast.xml49
-rw-r--r--doc/classes/VisualScriptVariableGet.xml33
-rw-r--r--doc/classes/VisualScriptVariableSet.xml33
-rw-r--r--doc/classes/VisualScriptWhile.xml15
-rw-r--r--doc/classes/VisualScriptYield.xml55
-rw-r--r--doc/classes/VisualScriptYieldSignal.xml87
-rw-r--r--doc/classes/VisualServer.xml82
-rw-r--r--doc/classes/WeakRef.xml24
-rw-r--r--doc/classes/WindowDialog.xml80
-rw-r--r--doc/classes/World.xml69
-rw-r--r--doc/classes/World2D.xml38
-rw-r--r--doc/classes/WorldEnvironment.xml37
-rw-r--r--doc/classes/XMLParser.xml173
-rw-r--r--doc/classes/YSort.xml37
-rw-r--r--doc/classes/bool.xml44
-rw-r--r--doc/classes/float.xml44
-rw-r--r--doc/classes/int.xml44
-rw-r--r--doc/tools/doc_status.py54
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp21
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp17
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp104
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h4
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp22
-rw-r--r--drivers/gles3/shaders/effect_blur.glsl13
-rw-r--r--drivers/gles3/shaders/scene.glsl58
-rw-r--r--drivers/gles3/shaders/screen_space_reflection.glsl6
-rw-r--r--drivers/gles3/shaders/ssao.glsl21
-rw-r--r--drivers/gles3/shaders/ssao_minify.glsl4
-rw-r--r--drivers/gles3/shaders/subsurf_scattering.glsl126
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp170
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.h11
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.cpp2
-rw-r--r--drivers/unix/SCsub2
-rw-r--r--drivers/unix/dir_access_unix.cpp114
-rw-r--r--drivers/unix/file_access_unix.cpp15
-rw-r--r--drivers/unix/file_access_unix.h2
-rw-r--r--drivers/unix/socket_helpers.h1
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp8
-rw-r--r--drivers/windows/file_access_windows.cpp3
-rw-r--r--editor/SCsub35
-rw-r--r--editor/animation_editor.cpp88
-rw-r--r--editor/create_dialog.cpp38
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/dependency_editor.cpp1
-rw-r--r--editor/doc/doc_data.cpp132
-rw-r--r--editor/doc/doc_data.h8
-rw-r--r--editor/editor_audio_buses.cpp134
-rw-r--r--editor/editor_audio_buses.h20
-rw-r--r--editor/editor_dir_dialog.cpp4
-rw-r--r--editor/editor_export.cpp161
-rw-r--r--editor/editor_export.h49
-rw-r--r--editor/editor_file_dialog.cpp33
-rw-r--r--editor/editor_fonts.cpp20
-rw-r--r--editor/editor_help.cpp319
-rw-r--r--editor/editor_help.h5
-rw-r--r--editor/editor_log.cpp25
-rw-r--r--editor/editor_log.h3
-rw-r--r--editor/editor_node.cpp129
-rw-r--r--editor/editor_node.h5
-rw-r--r--editor/editor_plugin.cpp10
-rw-r--r--editor/editor_plugin.h3
-rw-r--r--editor/editor_run.cpp4
-rw-r--r--editor/editor_settings.cpp34
-rw-r--r--editor/editor_themes.cpp565
-rw-r--r--editor/fileserver/editor_file_server.cpp2
-rw-r--r--editor/filesystem_dock.cpp68
-rw-r--r--editor/filesystem_dock.h1
-rw-r--r--editor/icons/SCsub26
-rw-r--r--editor/icons/icon_GUI_hslider_bg.svg5
-rw-r--r--editor/icons/icon_GUI_tab.svg5
-rw-r--r--editor/icons/icon_GUI_vslider_bg.svg5
-rw-r--r--editor/icons/icon_class_list.svg10
-rw-r--r--editor/icons/icon_file.svg7
-rw-r--r--editor/icons/icon_file_big_thumb.svg (renamed from editor/icons/icon_file_big.svg)0
-rw-r--r--editor/icons/icon_file_broken_big_thumb.svg (renamed from editor/icons/icon_file_big_broken.svg)0
-rw-r--r--editor/icons/icon_file_dead.svg7
-rw-r--r--editor/icons/icon_file_dead_big_thumb.svg (renamed from editor/icons/icon_file_big_dead.svg)0
-rw-r--r--editor/icons/icon_file_dead_medium_thumb.svg7
-rw-r--r--editor/icons/icon_file_medium_thumb.svg7
-rw-r--r--editor/icons/icon_filesystem.svg5
-rw-r--r--editor/icons/icon_folder_big.svg5
-rw-r--r--editor/icons/icon_folder_big_thumb.svg5
-rw-r--r--editor/icons/icon_folder_medium_thumb.svg5
-rw-r--r--editor/icons/icon_godot.svg3
-rw-r--r--editor/icons/icon_godot_docs.svg31
-rw-r--r--editor/icons/icon_key_call.svg5
-rw-r--r--editor/icons/icon_logo.svg7
-rw-r--r--editor/icons/icon_mini_checkerboard.svg4
-rw-r--r--editor/icons/icon_shader_material.svg11
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp6
-rw-r--r--editor/import/resource_importer_scene.cpp51
-rw-r--r--editor/import/resource_importer_scene.h9
-rw-r--r--editor/import/resource_importer_texture.cpp7
-rw-r--r--editor/import/resource_importer_wav.cpp2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp130
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp6
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp57
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h4
-rw-r--r--editor/plugins/navigation_mesh_editor_plugin.cpp165
-rw-r--r--editor/plugins/navigation_mesh_editor_plugin.h86
-rw-r--r--editor/plugins/navigation_mesh_generator.cpp311
-rw-r--r--editor/plugins/navigation_mesh_generator.h65
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/script_editor_plugin.cpp79
-rw-r--r--editor/plugins/script_editor_plugin.h6
-rw-r--r--editor/plugins/script_text_editor.cpp149
-rw-r--r--editor/plugins/shader_editor_plugin.cpp123
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp150
-rw-r--r--editor/plugins/spatial_editor_plugin.h4
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp37
-rw-r--r--editor/plugins/tile_map_editor_plugin.h3
-rw-r--r--editor/project_export.cpp9
-rw-r--r--editor/project_manager.cpp417
-rw-r--r--editor/project_manager.h4
-rw-r--r--editor/project_settings_editor.cpp8
-rw-r--r--editor/property_editor.cpp21
-rw-r--r--editor/property_selector.cpp33
-rw-r--r--editor/property_selector.h3
-rw-r--r--editor/quick_open.cpp2
-rw-r--r--editor/scene_tree_dock.cpp56
-rw-r--r--editor/script_editor_debugger.cpp1
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--main/input_default.cpp11
-rw-r--r--main/main.cpp58
-rw-r--r--methods.py3
-rw-r--r--misc/dist/html/default.html386
-rw-r--r--misc/dist/html_fs/godotfs.js151
-rw-r--r--modules/gdnative/gd_native_library_editor.cpp148
-rw-r--r--modules/gdnative/gd_native_library_editor.h55
-rw-r--r--modules/gdnative/gdnative.cpp13
-rw-r--r--modules/gdnative/gdnative.h3
-rw-r--r--modules/gdnative/gdnative/color.cpp8
-rw-r--r--modules/gdnative/gdnative/variant.cpp17
-rw-r--r--modules/gdnative/include/gdnative/color.h4
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h3
-rw-r--r--modules/gdnative/include/gdnative_api_struct.h723
-rw-r--r--modules/gdnative/register_types.cpp13
-rw-r--r--modules/gdscript/gd_editor.cpp6
-rw-r--r--modules/gdscript/gd_functions.cpp18
-rw-r--r--modules/gridmap/config.py6
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml175
-rw-r--r--modules/gridmap/doc_classes/README.md1
-rw-r--r--modules/pvr/texture_loader_pvr.cpp8
-rw-r--r--modules/recast/SCsub38
-rw-r--r--modules/recast/config.py7
-rw-r--r--modules/recast/register_types.cpp34
-rw-r--r--modules/recast/register_types.h32
-rw-r--r--modules/regex/regex.h4
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp6
-rw-r--r--modules/svg/image_loader_svg.cpp61
-rw-r--r--modules/svg/image_loader_svg.h12
-rw-r--r--modules/theora/video_stream_theora.cpp3
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp59
-rw-r--r--modules/visual_script/visual_script_editor.cpp808
-rw-r--r--modules/visual_script/visual_script_editor.h8
-rw-r--r--modules/visual_script/visual_script_expression.cpp1
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp20
-rw-r--r--modules/visual_script/visual_script_nodes.cpp35
-rw-r--r--platform/android/export/export.cpp57
-rw-r--r--platform/android/os_android.cpp7
-rw-r--r--platform/android/power_android.cpp16
-rw-r--r--platform/android/power_android.h6
-rw-r--r--platform/haiku/os_haiku.cpp6
-rw-r--r--platform/haiku/os_haiku.h2
-rw-r--r--platform/haiku/power_haiku.cpp6
-rw-r--r--platform/haiku/power_haiku.h6
-rw-r--r--platform/iphone/power_iphone.cpp8
-rw-r--r--platform/iphone/power_iphone.h6
-rw-r--r--platform/javascript/SCsub33
-rw-r--r--platform/javascript/detect.py2
-rw-r--r--platform/javascript/engine.js366
-rw-r--r--platform/javascript/export/export.cpp30
-rw-r--r--platform/javascript/godot_shell.html347
-rw-r--r--platform/javascript/os_javascript.cpp8
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/javascript/power_javascript.cpp6
-rw-r--r--platform/javascript/power_javascript.h6
-rw-r--r--platform/javascript/pre_asmjs.js3
-rw-r--r--platform/javascript/pre_wasm.js3
-rw-r--r--platform/osx/SCsub7
-rw-r--r--platform/osx/audio_driver_osx.cpp11
-rw-r--r--platform/osx/crash_handler_osx.h (renamed from core/os/power.h)27
-rw-r--r--platform/osx/crash_handler_osx.mm178
-rw-r--r--platform/osx/dir_access_osx.h3
-rw-r--r--platform/osx/dir_access_osx.mm18
-rw-r--r--platform/osx/export/export.cpp15
-rw-r--r--platform/osx/godot_main_osx.mm8
-rw-r--r--platform/osx/os_osx.h9
-rw-r--r--platform/osx/os_osx.mm30
-rw-r--r--platform/osx/power_osx.cpp16
-rw-r--r--platform/osx/power_osx.h6
-rw-r--r--platform/server/os_server.cpp10
-rw-r--r--platform/server/os_server.h4
-rw-r--r--platform/uwp/export/export.cpp2
-rw-r--r--platform/uwp/os_uwp.cpp9
-rw-r--r--platform/uwp/os_uwp.h2
-rw-r--r--platform/uwp/power_uwp.cpp6
-rw-r--r--platform/uwp/power_uwp.h6
-rw-r--r--platform/windows/SCsub3
-rw-r--r--platform/windows/context_gl_win.cpp16
-rw-r--r--platform/windows/crash_handler_win.cpp211
-rw-r--r--platform/windows/crash_handler_win.h (renamed from core/event_queue.h)42
-rw-r--r--platform/windows/detect.py11
-rw-r--r--platform/windows/godot_win.cpp34
-rw-r--r--platform/windows/joypad.cpp4
-rw-r--r--platform/windows/os_windows.cpp50
-rw-r--r--platform/windows/os_windows.h8
-rw-r--r--platform/windows/power_windows.cpp18
-rw-r--r--platform/windows/power_windows.h6
-rw-r--r--platform/x11/SCsub13
-rw-r--r--platform/x11/crash_handler_x11.cpp135
-rw-r--r--platform/x11/crash_handler_x11.h47
-rw-r--r--platform/x11/detect.py1
-rw-r--r--platform/x11/export/export.cpp1
-rw-r--r--platform/x11/joypad_linux.cpp1
-rw-r--r--platform/x11/os_x11.cpp61
-rw-r--r--platform/x11/os_x11.h16
-rw-r--r--platform/x11/power_x11.cpp42
-rw-r--r--platform/x11/power_x11.h6
-rw-r--r--scene/2d/area_2d.cpp8
-rw-r--r--scene/2d/audio_stream_player_2d.cpp67
-rw-r--r--scene/2d/canvas_item.cpp1
-rw-r--r--scene/2d/collision_polygon_2d.cpp3
-rw-r--r--scene/2d/light_2d.cpp7
-rw-r--r--scene/2d/line_2d.cpp15
-rw-r--r--scene/2d/line_2d.h19
-rw-r--r--scene/2d/line_builder.cpp107
-rw-r--r--scene/2d/line_builder.h27
-rw-r--r--scene/2d/path_2d.cpp3
-rw-r--r--scene/2d/physics_body_2d.cpp224
-rw-r--r--scene/2d/physics_body_2d.h52
-rw-r--r--scene/2d/screen_button.cpp3
-rw-r--r--scene/3d/area.cpp6
-rw-r--r--scene/3d/arvr_nodes.cpp19
-rw-r--r--scene/3d/arvr_nodes.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp162
-rw-r--r--scene/3d/audio_stream_player_3d.h4
-rw-r--r--scene/3d/bone_attachment.cpp6
-rw-r--r--scene/3d/collision_shape.cpp3
-rw-r--r--scene/3d/gi_probe.cpp50
-rw-r--r--scene/3d/interpolated_camera.cpp4
-rw-r--r--scene/3d/light.cpp26
-rw-r--r--scene/3d/light.h10
-rw-r--r--scene/3d/navigation_mesh.cpp230
-rw-r--r--scene/3d/navigation_mesh.h81
-rw-r--r--scene/3d/path.cpp4
-rw-r--r--scene/3d/physics_body.cpp7
-rw-r--r--scene/3d/spatial.cpp2
-rw-r--r--scene/3d/vehicle_body.cpp8
-rw-r--r--scene/3d/vehicle_body.h2
-rw-r--r--scene/3d/visual_instance.cpp11
-rw-r--r--scene/animation/animation_tree_player.cpp4
-rw-r--r--scene/audio/audio_player.cpp22
-rw-r--r--scene/gui/control.cpp16
-rw-r--r--scene/gui/dialogs.cpp2
-rw-r--r--scene/gui/file_dialog.cpp4
-rw-r--r--scene/gui/rich_text_label.cpp8
-rw-r--r--scene/gui/slider.cpp10
-rw-r--r--scene/gui/tab_container.cpp10
-rw-r--r--scene/gui/text_edit.cpp25
-rw-r--r--scene/gui/tree.cpp124
-rw-r--r--scene/gui/tree.h4
-rwxr-xr-xscene/main/node.cpp28
-rw-r--r--scene/main/scene_tree.cpp1
-rw-r--r--scene/main/viewport.cpp25
-rw-r--r--scene/main/viewport.h6
-rw-r--r--scene/register_scene_types.cpp1
-rw-r--r--scene/resources/audio_stream_sample.cpp8
-rw-r--r--scene/resources/curve.cpp38
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/environment.cpp7
-rw-r--r--scene/resources/environment.h1
-rw-r--r--scene/resources/material.cpp8
-rw-r--r--scene/resources/mesh.cpp44
-rw-r--r--scene/resources/mesh.h3
-rw-r--r--scene/resources/packed_scene.cpp8
-rw-r--r--scene/resources/primitive_meshes.cpp19
-rw-r--r--scene/resources/primitive_meshes.h3
-rw-r--r--scene/resources/sky_box.cpp6
-rw-r--r--scene/resources/style_box.h4
-rw-r--r--servers/arvr/arvr_positional_tracker.cpp14
-rw-r--r--servers/arvr/arvr_positional_tracker.h12
-rw-r--r--servers/arvr_server.cpp9
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp6
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp5
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp5
-rw-r--r--servers/audio_server.cpp95
-rw-r--r--servers/audio_server.h29
-rw-r--r--servers/physics/broad_phase_basic.cpp3
-rw-r--r--servers/physics/broad_phase_basic.h2
-rw-r--r--servers/physics/shape_sw.cpp5
-rw-r--r--servers/physics/step_sw.cpp2
-rw-r--r--servers/physics_2d/space_2d_sw.cpp12
-rw-r--r--servers/physics_2d/space_2d_sw.h6
-rw-r--r--servers/physics_server.cpp14
-rw-r--r--servers/visual/rasterizer.h2
-rw-r--r--servers/visual/shader_language.cpp25
-rw-r--r--servers/visual/shader_language.h2
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_scene.cpp104
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
-rw-r--r--servers/visual_server.cpp23
-rw-r--r--servers/visual_server.h10
-rw-r--r--thirdparty/README.md11
-rw-r--r--thirdparty/fonts/LICENSE_Mononoki (renamed from thirdparty/fonts/LICENSE.SourceCodePro.txt)8
-rw-r--r--thirdparty/fonts/mononoki_Regular.ttfbin0 -> 90216 bytes
-rw-r--r--thirdparty/fonts/source_code_pro.otfbin145556 -> 0 bytes
-rw-r--r--thirdparty/recastnavigation/License.txt18
-rw-r--r--thirdparty/recastnavigation/Recast/Include/Recast.h1200
-rw-r--r--thirdparty/recastnavigation/Recast/Include/RecastAlloc.h146
-rw-r--r--thirdparty/recastnavigation/Recast/Include/RecastAssert.h56
-rw-r--r--thirdparty/recastnavigation/Recast/Source/Recast.cpp504
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp86
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastArea.cpp591
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastAssert.cpp35
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastContour.cpp1105
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastFilter.cpp202
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastLayers.cpp644
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastMesh.cpp1552
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp1462
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastRasterization.cpp454
-rw-r--r--thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp1824
816 files changed, 83660 insertions, 63950 deletions
diff --git a/.gitignore b/.gitignore
index 0cccfa97a7..315dc7950f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@ gmon.out
.DS_Store
# for projects that use SCons for building: http://http://www.scons.org/
+.sconf_temp
.sconsign.dblite
*.pyc
diff --git a/.travis.yml b/.travis.yml
index 371c965db4..602152374a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,8 @@ dist: trusty
sudo: false
+cache: ccache
+
compiler:
- gcc
- clang
@@ -76,7 +78,10 @@ addons:
- clang-format-3.9
before_script:
- - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install scons; fi
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ brew update; brew install scons ccache;
+ export PATH="/usr/local/opt/ccache/libexec:$PATH";
+ fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$GODOT_TARGET" = "android" ]; then
brew update; brew install -v android-sdk;
brew install -v android-ndk | grep -v "inflating:" | grep -v "creating:";
@@ -87,9 +92,5 @@ script:
- if [ "$STATIC_CHECKS" = "yes" ]; then
sh ./misc/travis/clang-format.sh;
else
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
- scons -j 2 platform=$GODOT_TARGET progress=no verbose=yes CXX=$CXX openssl=builtin;
- else
- scons -j 2 platform=$GODOT_TARGET progress=no verbose=yes bits=64 CXX=$CXX openssl=builtin;
- fi
+ scons -j 2 platform=$GODOT_TARGET progress=no verbose=yes CXX=$CXX builtin_openssl=yes;
fi
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index 13edd896ef..16ef854f1f 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -150,9 +150,9 @@ Comment: Noto Sans font
Copyright: 2012, Google Inc.
License: OFL-1.1
-Files: ./thirdparty/fonts/source_code_pro.otf
-Comment: Source Code Pro font
-Copyright: 2010, 2012, Adobe Systems Incorporated
+Files: ./thirdparty/fonts/mononoki_Regular.ttf
+Comment: Mononoki font
+Copyright: 2013, Matthias Tellen
License: OFL-1.1
Files: ./thirdparty/freetype/
@@ -315,6 +315,11 @@ Comment: PvrTcCompressor
Copyright: 2014, Jeffrey Lim.
License: BSD-3-clause
+Files: ./thirdparty/recastnavigation/
+Comment: Recast
+Copyright: 2009, Mikko Mononen
+License: Zlib
+
Files: ./thirdparty/rtaudio/
Comment: RtAudio
Copyright: 2001-2016, Gary P. Scavone
diff --git a/DONORS.md b/DONORS.md
index 09049ede48..57902fb2fc 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -21,7 +21,7 @@ None so far, but your company could be the first! :)
## Mini sponsors
Arron Washington
- Chrisartguy
+ Chris Phyffer
Christian Uldall Pedersen
Hein-Pieter van Braam
Matthieu Huvé
diff --git a/SConstruct b/SConstruct
index 9a3ee03ed5..f2f1ea57f3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -168,6 +168,7 @@ opts.Add('builtin_libwebp', "Use the builtin libwebp library (yes/no)", 'yes')
opts.Add('builtin_openssl', "Use the builtin openssl library (yes/no)", 'yes')
opts.Add('builtin_opus', "Use the builtin opus library (yes/no)", 'yes')
opts.Add('builtin_pcre2', "Use the builtin pcre2 library (yes/no)", 'yes')
+opts.Add('builtin_recast', "Use the builtin recast library (yes/no)", 'yes')
opts.Add('builtin_squish', "Use the builtin squish library (yes/no)", 'yes')
opts.Add('builtin_zlib', "Use the builtin zlib library (yes/no)", 'yes')
@@ -289,7 +290,9 @@ if selected_platform in platform_list:
if (env["warnings"] == 'yes'):
print("WARNING: warnings=yes is deprecated; assuming warnings=all")
+ env.msvc = 0
if (os.name == "nt" and os.getenv("VCINSTALLDIR") and (platform_arg == "windows" or platform_arg == "uwp")): # MSVC, needs to stand out of course
+ env.msvc = 1
disable_nonessential_warnings = ['/wd4267', '/wd4244', '/wd4305', '/wd4800'] # Truncations, narrowing conversions...
if (env["warnings"] == 'extra'):
env.Append(CCFLAGS=['/Wall']) # Implies /W4
@@ -352,6 +355,7 @@ if selected_platform in platform_list:
sys.modules.pop('detect')
env.module_list = []
+ env.doc_class_path={}
for x in module_list:
if env['module_' + x + '_enabled'] != "yes":
@@ -363,6 +367,15 @@ if selected_platform in platform_list:
if (config.can_build(selected_platform)):
config.configure(env)
env.module_list.append(x)
+ try:
+ doc_classes = config.get_doc_classes()
+ doc_path = config.get_doc_path()
+ for c in doc_classes:
+ env.doc_class_path[c]="modules/"+x+"/"+doc_path
+ except:
+ pass
+
+
sys.path.remove(tmppath)
sys.modules.pop('config')
@@ -412,6 +425,16 @@ if selected_platform in platform_list:
if (env['vsproj']) == "yes":
methods.generate_vs_project(env, GetOption("num_jobs"))
+ # Check for the existence of headers
+ conf = Configure(env)
+ if ("check_c_headers" in env):
+ for header in env["check_c_headers"]:
+ if (conf.CheckCHeader(header[0])):
+ if (env.msvc):
+ env.Append(CCFLAGS=['/D' + header[1]])
+ else:
+ env.Append(CCFLAGS=['-D' + header[1]])
+
else:
print("No valid target platform selected.")
diff --git a/core/array.cpp b/core/array.cpp
index c35bf5bf0c..2e3fbf858d 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -210,6 +210,17 @@ const Variant &Array::get(int p_idx) const {
return operator[](p_idx);
}
+Array Array::duplicate() const {
+
+ Array new_arr;
+ int element_count = size();
+ new_arr.resize(element_count);
+ for (int i = 0; i < element_count; i++) {
+ new_arr[i] = get(i);
+ }
+
+ return new_arr;
+}
struct _ArrayVariantSort {
_FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const {
diff --git a/core/array.h b/core/array.h
index 777116ab56..8a647dd13b 100644
--- a/core/array.h
+++ b/core/array.h
@@ -84,6 +84,8 @@ public:
Variant pop_back();
Variant pop_front();
+ Array duplicate() const;
+
Array(const Array &p_from);
Array();
~Array();
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 0f217c8235..cfd7677d6b 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -33,6 +33,7 @@
#include "geometry.h"
#include "io/file_access_compressed.h"
#include "io/file_access_encrypted.h"
+#include "io/json.h"
#include "io/marshalls.h"
#include "os/keyboard.h"
#include "os/os.h"
@@ -440,8 +441,8 @@ bool _OS::is_vsync_enabled() const {
return OS::get_singleton()->is_vsync_enabled();
}
-PowerState _OS::get_power_state() {
- return OS::get_singleton()->get_power_state();
+_OS::PowerState _OS::get_power_state() {
+ return _OS::PowerState(OS::get_singleton()->get_power_state());
}
int _OS::get_power_seconds_left() {
@@ -2600,3 +2601,76 @@ _Engine *_Engine::singleton = NULL;
_Engine::_Engine() {
singleton = this;
}
+
+void JSONParseResult::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_error"), &JSONParseResult::get_error);
+ ClassDB::bind_method(D_METHOD("get_error_string"), &JSONParseResult::get_error_string);
+ ClassDB::bind_method(D_METHOD("get_error_line"), &JSONParseResult::get_error_line);
+ ClassDB::bind_method(D_METHOD("get_result"), &JSONParseResult::get_result);
+
+ ClassDB::bind_method(D_METHOD("set_error", "error"), &JSONParseResult::set_error);
+ ClassDB::bind_method(D_METHOD("set_error_string", "error_string"), &JSONParseResult::set_error_string);
+ ClassDB::bind_method(D_METHOD("set_error_line", "error_line"), &JSONParseResult::set_error_line);
+ ClassDB::bind_method(D_METHOD("set_result", "result"), &JSONParseResult::set_result);
+
+ ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "error", PROPERTY_HINT_NONE, "Error", PROPERTY_USAGE_CLASS_IS_ENUM), "set_error", "get_error");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "error_string"), "set_error_string", "get_error_string");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "error_line"), "set_error_line", "get_error_line");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::NIL, "result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "set_result", "get_result");
+}
+
+void JSONParseResult::set_error(Error p_error) {
+ error = p_error;
+}
+
+Error JSONParseResult::get_error() const {
+ return error;
+}
+
+void JSONParseResult::set_error_string(const String &p_error_string) {
+ error_string = p_error_string;
+}
+
+String JSONParseResult::get_error_string() const {
+ return error_string;
+}
+
+void JSONParseResult::set_error_line(int p_error_line) {
+ error_line = p_error_line;
+}
+
+int JSONParseResult::get_error_line() const {
+ return error_line;
+}
+
+void JSONParseResult::set_result(const Variant &p_result) {
+ result = p_result;
+}
+
+Variant JSONParseResult::get_result() const {
+ return result;
+}
+
+void _JSON::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("print", "value"), &_JSON::print);
+ ClassDB::bind_method(D_METHOD("parse", "json"), &_JSON::parse);
+}
+
+String _JSON::print(const Variant &p_value) {
+ return JSON::print(p_value);
+}
+
+Ref<JSONParseResult> _JSON::parse(const String &p_json) {
+ Ref<JSONParseResult> result;
+ result.instance();
+
+ result->error = JSON::parse(p_json, result->result, result->error_string, result->error_line);
+
+ return result;
+}
+
+_JSON *_JSON::singleton = NULL;
+
+_JSON::_JSON() {
+ singleton = this;
+}
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 1a3782c471..721acf657f 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -36,7 +36,7 @@
#include "io/resource_saver.h"
#include "os/dir_access.h"
#include "os/file_access.h"
-#include "os/power.h"
+#include "os/os.h"
#include "os/semaphore.h"
#include "os/thread.h"
@@ -97,6 +97,14 @@ protected:
static _OS *singleton;
public:
+ enum PowerState {
+ POWERSTATE_UNKNOWN, /**< cannot determine power status */
+ POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
+ POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
+ POWERSTATE_CHARGING, /**< Plugged in, charging battery */
+ POWERSTATE_CHARGED /**< Plugged in, battery charged */
+ };
+
enum Weekday {
DAY_SUNDAY,
DAY_MONDAY,
@@ -312,6 +320,7 @@ public:
_OS();
};
+VARIANT_ENUM_CAST(_OS::PowerState);
VARIANT_ENUM_CAST(_OS::Weekday);
VARIANT_ENUM_CAST(_OS::Month);
VARIANT_ENUM_CAST(_OS::SystemDir);
@@ -660,4 +669,50 @@ public:
_Engine();
};
+class _JSON;
+
+class JSONParseResult : public Reference {
+ GDCLASS(JSONParseResult, Reference)
+
+ friend class _JSON;
+
+ Error error;
+ String error_string;
+ int error_line;
+
+ Variant result;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_error(Error p_error);
+ Error get_error() const;
+
+ void set_error_string(const String &p_error_string);
+ String get_error_string() const;
+
+ void set_error_line(int p_error_line);
+ int get_error_line() const;
+
+ void set_result(const Variant &p_result);
+ Variant get_result() const;
+};
+
+class _JSON : public Object {
+ GDCLASS(_JSON, Object)
+
+protected:
+ static void _bind_methods();
+ static _JSON *singleton;
+
+public:
+ static _JSON *get_singleton() { return singleton; }
+
+ String print(const Variant &p_value);
+ Ref<JSONParseResult> parse(const String &p_json);
+
+ _JSON();
+};
+
#endif // CORE_BIND_H
diff --git a/core/color.cpp b/core/color.cpp
index ab264d31d4..dd8b13c047 100644
--- a/core/color.cpp
+++ b/core/color.cpp
@@ -34,7 +34,7 @@
#include "math_funcs.h"
#include "print_string.h"
-uint32_t Color::to_ARGB32() const {
+uint32_t Color::to_argb32() const {
uint32_t c = (uint8_t)(a * 255);
c <<= 8;
@@ -47,7 +47,7 @@ uint32_t Color::to_ARGB32() const {
return c;
}
-uint32_t Color::to_ABGR32() const {
+uint32_t Color::to_abgr32() const {
uint32_t c = (uint8_t)(a * 255);
c <<= 8;
c |= (uint8_t)(b * 255);
@@ -59,15 +59,15 @@ uint32_t Color::to_ABGR32() const {
return c;
}
-uint32_t Color::to_32() const {
+uint32_t Color::to_rgba32() const {
- uint32_t c = (uint8_t)(a * 255);
- c <<= 8;
- c |= (uint8_t)(r * 255);
+ uint32_t c = (uint8_t)(r * 255);
c <<= 8;
c |= (uint8_t)(g * 255);
c <<= 8;
c |= (uint8_t)(b * 255);
+ c <<= 8;
+ c |= (uint8_t)(a * 255);
return c;
}
@@ -400,3 +400,122 @@ Color::operator String() const {
return rtos(r) + ", " + rtos(g) + ", " + rtos(b) + ", " + rtos(a);
}
+
+Color Color::operator+(const Color &p_color) const {
+
+ return Color(
+ CLAMP(r + p_color.r, 0.0, 1.0),
+ CLAMP(g + p_color.g, 0.0, 1.0),
+ CLAMP(b + p_color.b, 0.0, 1.0),
+ CLAMP(a + p_color.a, 0.0, 1.0));
+}
+
+void Color::operator+=(const Color &p_color) {
+
+ r = CLAMP(r + p_color.r, 0.0, 1.0);
+ g = CLAMP(g + p_color.g, 0.0, 1.0);
+ b = CLAMP(b + p_color.b, 0.0, 1.0);
+ a = CLAMP(a + p_color.a, 0.0, 1.0);
+}
+
+Color Color::operator-(const Color &p_color) const {
+
+ return Color(
+ CLAMP(r - p_color.r, 0.0, 1.0),
+ CLAMP(g - p_color.g, 0.0, 1.0),
+ CLAMP(b - p_color.b, 0.0, 1.0),
+ CLAMP(a - p_color.a, 0.0, 1.0));
+}
+
+void Color::operator-=(const Color &p_color) {
+
+ r = CLAMP(r - p_color.r, 0.0, 1.0);
+ g = CLAMP(g - p_color.g, 0.0, 1.0);
+ b = CLAMP(b - p_color.b, 0.0, 1.0);
+ a = CLAMP(a - p_color.a, 0.0, 1.0);
+}
+
+Color Color::operator*(const Color &p_color) const {
+
+ return Color(
+ CLAMP(r * p_color.r, 0.0, 1.0),
+ CLAMP(g * p_color.g, 0.0, 1.0),
+ CLAMP(b * p_color.b, 0.0, 1.0),
+ CLAMP(a * p_color.a, 0.0, 1.0));
+}
+
+Color Color::operator*(const real_t &rvalue) const {
+
+ return Color(
+ CLAMP(r * rvalue, 0.0, 1.0),
+ CLAMP(g * rvalue, 0.0, 1.0),
+ CLAMP(b * rvalue, 0.0, 1.0),
+ CLAMP(a * rvalue, 0.0, 1.0));
+}
+
+void Color::operator*=(const Color &p_color) {
+
+ r = CLAMP(r * p_color.r, 0.0, 1.0);
+ g = CLAMP(g * p_color.g, 0.0, 1.0);
+ b = CLAMP(b * p_color.b, 0.0, 1.0);
+ a = CLAMP(a * p_color.a, 0.0, 1.0);
+}
+
+void Color::operator*=(const real_t &rvalue) {
+
+ r = CLAMP(r * rvalue, 0.0, 1.0);
+ g = CLAMP(g * rvalue, 0.0, 1.0);
+ b = CLAMP(b * rvalue, 0.0, 1.0);
+ a = CLAMP(a * rvalue, 0.0, 1.0);
+};
+
+Color Color::operator/(const Color &p_color) const {
+
+ return Color(
+ p_color.r == 0 ? 1 : CLAMP(r / p_color.r, 0.0, 1.0),
+ p_color.g == 0 ? 1 : CLAMP(g / p_color.g, 0.0, 1.0),
+ p_color.b == 0 ? 1 : CLAMP(b / p_color.b, 0.0, 1.0),
+ p_color.a == 0 ? 1 : CLAMP(a / p_color.a, 0.0, 1.0));
+}
+
+Color Color::operator/(const real_t &rvalue) const {
+
+ if (rvalue == 0) return Color(1.0, 1.0, 1.0, 1.0);
+ return Color(
+ CLAMP(r / rvalue, 0.0, 1.0),
+ CLAMP(g / rvalue, 0.0, 1.0),
+ CLAMP(b / rvalue, 0.0, 1.0),
+ CLAMP(a / rvalue, 0.0, 1.0));
+}
+
+void Color::operator/=(const Color &p_color) {
+
+ r = p_color.r == 0 ? 1 : CLAMP(r / p_color.r, 0.0, 1.0);
+ g = p_color.g == 0 ? 1 : CLAMP(g / p_color.g, 0.0, 1.0);
+ b = p_color.b == 0 ? 1 : CLAMP(b / p_color.b, 0.0, 1.0);
+ a = p_color.a == 0 ? 1 : CLAMP(a / p_color.a, 0.0, 1.0);
+}
+
+void Color::operator/=(const real_t &rvalue) {
+
+ if (rvalue == 0) {
+ r = 1.0;
+ g = 1.0;
+ b = 1.0;
+ a = 1.0;
+ } else {
+ r = CLAMP(r / rvalue, 0.0, 1.0);
+ g = CLAMP(g / rvalue, 0.0, 1.0);
+ b = CLAMP(b / rvalue, 0.0, 1.0);
+ a = CLAMP(a / rvalue, 0.0, 1.0);
+ }
+};
+
+Color Color::operator-() const {
+
+ return Color(
+ CLAMP(1.0 - r, 0.0, 1.0),
+ CLAMP(1.0 - g, 0.0, 1.0),
+ CLAMP(1.0 - b, 0.0, 1.0),
+ CLAMP(1.0 - a, 0.0, 1.0));
+}
diff --git a/core/color.h b/core/color.h
index cd5510cf01..972b6a1b33 100644
--- a/core/color.h
+++ b/core/color.h
@@ -51,9 +51,9 @@ struct Color {
bool operator==(const Color &p_color) const { return (r == p_color.r && g == p_color.g && b == p_color.b && a == p_color.a); }
bool operator!=(const Color &p_color) const { return (r != p_color.r || g != p_color.g || b != p_color.b || a != p_color.a); }
- uint32_t to_32() const;
- uint32_t to_ARGB32() const;
- uint32_t to_ABGR32() const;
+ uint32_t to_rgba32() const;
+ uint32_t to_argb32() const;
+ uint32_t to_abgr32() const;
float gray() const;
float get_h() const;
float get_s() const;
@@ -67,6 +67,23 @@ struct Color {
return components[idx];
}
+ Color operator+(const Color &p_color) const;
+ void operator+=(const Color &p_color);
+
+ Color operator-() const;
+ Color operator-(const Color &p_color) const;
+ void operator-=(const Color &p_color);
+
+ Color operator*(const Color &p_color) const;
+ Color operator*(const real_t &rvalue) const;
+ void operator*=(const Color &p_color);
+ void operator*=(const real_t &rvalue);
+
+ Color operator/(const Color &p_color) const;
+ Color operator/(const real_t &rvalue) const;
+ void operator/=(const Color &p_color);
+ void operator/=(const real_t &rvalue);
+
void invert();
void contrast();
Color inverted() const;
diff --git a/core/event_queue.cpp b/core/event_queue.cpp
deleted file mode 100644
index 12f9942a07..0000000000
--- a/core/event_queue.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*************************************************************************/
-/* event_queue.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "event_queue.h"
-
-Error EventQueue::push_call(uint32_t p_instance_ID, const StringName &p_method, VARIANT_ARG_DECLARE) {
-
- uint8_t room_needed = sizeof(Event);
- int args = 0;
- if (p_arg5.get_type() != Variant::NIL)
- args = 5;
- else if (p_arg4.get_type() != Variant::NIL)
- args = 4;
- else if (p_arg3.get_type() != Variant::NIL)
- args = 3;
- else if (p_arg2.get_type() != Variant::NIL)
- args = 2;
- else if (p_arg1.get_type() != Variant::NIL)
- args = 1;
- else
- args = 0;
-
- room_needed += sizeof(Variant) * args;
-
- ERR_FAIL_COND_V((buffer_end + room_needed) >= buffer_size, ERR_OUT_OF_MEMORY);
- Event *ev = memnew_placement(&event_buffer[buffer_end], Event);
- ev->args = args;
- ev->instance_ID = p_instance_ID;
- ev->method = p_method;
-
- buffer_end += sizeof(Event);
-
- if (args >= 1) {
-
- Variant *v = memnew_placement(&event_buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = p_arg1;
- }
-
- if (args >= 2) {
-
- Variant *v = memnew_placement(&event_buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = p_arg2;
- }
-
- if (args >= 3) {
-
- Variant *v = memnew_placement(&event_buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = p_arg3;
- }
-
- if (args >= 4) {
-
- Variant *v = memnew_placement(&event_buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = p_arg4;
- }
-
- if (args >= 5) {
-
- Variant *v = memnew_placement(&event_buffer[buffer_end], Variant);
- buffer_end += sizeof(Variant);
- *v = p_arg5;
- }
-
- if (buffer_end > buffer_max_used)
- buffer_max_used = buffer_end;
-
- return OK;
-}
-
-void EventQueue::flush_events() {
-
- uint32_t read_pos = 0;
-
- while (read_pos < buffer_end) {
-
- Event *event = (Event *)&event_buffer[read_pos];
- Variant *args = (Variant *)(event + 1);
- Object *obj = ObjectDB::get_instance(event->instance_ID);
-
- if (obj) {
- // events don't expect a return value
- obj->call(event->method,
- (event->args >= 1) ? args[0] : Variant(),
- (event->args >= 2) ? args[1] : Variant(),
- (event->args >= 3) ? args[2] : Variant(),
- (event->args >= 4) ? args[3] : Variant(),
- (event->args >= 5) ? args[4] : Variant());
- }
-
- if (event->args >= 1) args[0].~Variant();
- if (event->args >= 2) args[1].~Variant();
- if (event->args >= 3) args[2].~Variant();
- if (event->args >= 4) args[3].~Variant();
- if (event->args >= 5) args[4].~Variant();
- event->~Event();
-
- read_pos += sizeof(Event) + sizeof(Variant) * event->args;
- }
-
- buffer_end = 0; // reset buffer
-}
-
-EventQueue::EventQueue(uint32_t p_buffer_size) {
-
- buffer_end = 0;
- buffer_max_used = 0;
- buffer_size = p_buffer_size;
- event_buffer = memnew_arr(uint8_t, buffer_size);
-}
-EventQueue::~EventQueue() {
-
- uint32_t read_pos = 0;
-
- while (read_pos < buffer_end) {
-
- Event *event = (Event *)&event_buffer[read_pos];
- Variant *args = (Variant *)(event + 1);
- for (int i = 0; i < event->args; i++)
- args[i].~Variant();
- event->~Event();
-
- read_pos += sizeof(Event) + sizeof(Variant) * event->args;
- }
-
- memdelete_arr(event_buffer);
- event_buffer = NULL;
-}
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index d8b8c8c200..58ca2d4c58 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -87,6 +87,8 @@ void FileAccessNetworkClient::_thread_func() {
DEBUG_PRINT("SEM WAIT - " + itos(sem->get()));
Error err = sem->wait();
+ if (err != OK)
+ ERR_PRINT("sem->wait() failed");
DEBUG_TIME("sem_unlock");
//DEBUG_PRINT("semwait returned "+itos(werr));
DEBUG_PRINT("MUTEX LOCK " + itos(lockcount));
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index e36ff28220..e511085ac5 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -166,9 +166,9 @@ bool PackedSourcePCK::try_open_pack(const String &p_path) {
uint32_t ver_rev = f->get_32();
ERR_EXPLAIN("Pack version unsupported: " + itos(version));
- ERR_FAIL_COND_V(version != PACK_VERSION, ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(version != PACK_VERSION, false);
ERR_EXPLAIN("Pack created with a newer version of the engine: " + itos(ver_major) + "." + itos(ver_minor) + "." + itos(ver_rev));
- ERR_FAIL_COND_V(ver_major > VERSION_MAJOR || (ver_major == VERSION_MAJOR && ver_minor > VERSION_MINOR), ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(ver_major > VERSION_MAJOR || (ver_major == VERSION_MAJOR && ver_minor > VERSION_MINOR), false);
for (int i = 0; i < 16; i++) {
//reserved
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 084d8ffcab..16ec6cd3c5 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -37,7 +37,7 @@
#include "core/version.h"
//#define print_bl(m_what) print_line(m_what)
-#define print_bl(m_what)
+#define print_bl(m_what) (void)(m_what)
enum {
@@ -854,12 +854,6 @@ void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) {
}
bool big_endian = f->get_32();
-#ifdef BIG_ENDIAN_ENABLED
- endian_swap = !big_endian;
-#else
- bool endian_swap = big_endian;
-#endif
-
bool use_real64 = f->get_32();
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
@@ -869,7 +863,11 @@ void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) {
uint32_t ver_format = f->get_32();
print_bl("big endian: " + itos(big_endian));
- print_bl("endian swap: " + itos(endian_swap));
+#ifdef BIG_ENDIAN_ENABLED
+ print_bl("endian swap: " + itos(!big_endian));
+#else
+ print_bl("endian swap: " + itos(big_endian));
+#endif
print_bl("real64: " + itos(use_real64));
print_bl("major: " + itos(ver_major));
print_bl("minor: " + itos(ver_minor));
@@ -964,18 +962,12 @@ String ResourceInteractiveLoaderBinary::recognize(FileAccess *p_f) {
}
bool big_endian = f->get_32();
-#ifdef BIG_ENDIAN_ENABLED
- endian_swap = !big_endian;
-#else
- bool endian_swap = big_endian;
-#endif
-
- bool use_real64 = f->get_32();
+ f->get_32(); // use_real64
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
uint32_t ver_major = f->get_32();
- uint32_t ver_minor = f->get_32();
+ f->get_32(); // ver_minor
uint32_t ver_format = f->get_32();
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
@@ -993,8 +985,6 @@ ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() {
f = NULL;
stage = 0;
- endian_swap = false;
- use_real64 = false;
error = OK;
translation_remapped = false;
}
@@ -1123,16 +1113,14 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
}
bool big_endian = f->get_32();
-#ifdef BIG_ENDIAN_ENABLED
- endian_swap = !big_endian;
-#else
- bool endian_swap = big_endian;
-#endif
-
bool use_real64 = f->get_32();
f->set_endian_swap(big_endian != 0); //read big endian if saved as big endian
- fw->store_32(endian_swap);
+#ifdef BIG_ENDIAN_ENABLED
+ fw->store_32(!big_endian);
+#else
+ fw->store_32(big_endian);
+#endif
fw->set_endian_swap(big_endian != 0);
fw->store_32(use_real64); //use real64
@@ -1793,8 +1781,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
}
save_unicode_string(p_resource->get_class());
- uint64_t md_at = f->get_pos();
- f->store_64(0); //offset to impoty metadata
+ f->store_64(0); //offset to import metadata
for (int i = 0; i < 14; i++)
f->store_32(0); // reserved
@@ -1814,11 +1801,11 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
if (skip_editor && F->get().name.begins_with("__editor"))
continue;
- if (F->get().usage & PROPERTY_USAGE_STORAGE) {
+ if ((F->get().usage & PROPERTY_USAGE_STORAGE)) {
Property p;
p.name_idx = get_string_index(F->get().name);
p.value = E->get()->get(F->get().name);
- if ((F->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO && p.value.is_zero()) || (F->get().usage & PROPERTY_USAGE_STORE_IF_NONONE && p.value.is_one()))
+ if (((F->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && p.value.is_zero()) || ((F->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && p.value.is_one()))
continue;
p.pi = F->get();
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index ab77c2c9d3..2316f05b3c 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -44,8 +44,6 @@ class ResourceInteractiveLoaderBinary : public ResourceInteractiveLoader {
FileAccess *f;
- bool endian_swap;
- bool use_real64;
uint64_t importmd_ofs;
Vector<char> str_buf;
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index 1006158003..f4f81f0807 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -446,6 +446,7 @@ Error StreamPeerBuffer::get_data(uint8_t *p_buffer, int p_bytes) {
return OK;
}
+
Error StreamPeerBuffer::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
if (pointer + p_bytes > data.size()) {
@@ -463,6 +464,8 @@ Error StreamPeerBuffer::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_
pointer += r_received;
// FIXME: return what? OK or ERR_*
+ // return OK for now so we don't maybe return garbage
+ return OK;
}
int StreamPeerBuffer::get_available_bytes() const {
diff --git a/core/map.h b/core/map.h
index 75a38a3440..a37d898a9c 100644
--- a/core/map.h
+++ b/core/map.h
@@ -453,8 +453,9 @@ private:
if (!rp)
rp = _data._nil;
Element *node = (rp->left == _data._nil) ? rp->right : rp->left;
+ node->parent = rp->parent;
- if (_data._root == (node->parent = rp->parent)) {
+ if (_data._root == node->parent) {
_data._root->left = node;
} else {
if (rp == rp->parent->left) {
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 21516ac768..d1afcec18f 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -129,6 +129,16 @@ bool AStar::has_point(int p_id) const {
return points.has(p_id);
}
+Array AStar::get_points() {
+ Array point_list;
+
+ for (const Map<int, Point *>::Element *E = points.front(); E; E = E->next()) {
+ point_list.push_back(E->key());
+ }
+
+ return point_list;
+}
+
bool AStar::are_points_connected(int p_id, int p_with_id) const {
Segment s(p_id, p_with_id);
@@ -407,6 +417,7 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point);
ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point);
+ ClassDB::bind_method(D_METHOD("get_points"), &AStar::get_points);
ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));
ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 75b860d0a4..38d13d510b 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -105,6 +105,7 @@ public:
real_t get_point_weight_scale(int p_id) const;
void remove_point(int p_id);
bool has_point(int p_id) const;
+ Array get_points();
void connect_points(int p_id, int p_with_id, bool bidirectional = true);
void disconnect_points(int p_id, int p_with_id);
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index 0512cdd798..7132b6573e 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -131,7 +131,6 @@ void CameraMatrix::set_perspective(real_t p_fovy_degrees, real_t p_aspect, real_
void CameraMatrix::set_for_hmd(int p_eye, real_t p_aspect, real_t p_intraocular_dist, real_t p_display_width, real_t p_display_to_lens, real_t p_oversample, real_t p_z_near, real_t p_z_far) {
// we first calculate our base frustum on our values without taking our lens magnification into account.
- real_t display_to_eye = 2.0 * p_display_to_lens;
real_t f1 = (p_intraocular_dist * 0.5) / p_display_to_lens;
real_t f2 = ((p_display_width - p_intraocular_dist) * 0.5) / p_display_to_lens;
real_t f3 = (p_display_width / 4.0) / p_display_to_lens;
@@ -265,75 +264,26 @@ void CameraMatrix::get_viewport_size(real_t &r_width, real_t &r_height) const {
bool CameraMatrix::get_endpoints(const Transform &p_transform, Vector3 *p_8points) const {
- const real_t *matrix = (const real_t *)this->matrix;
-
- ///////--- Near Plane ---///////
- Plane near_plane = Plane(matrix[3] + matrix[2],
- matrix[7] + matrix[6],
- matrix[11] + matrix[10],
- -matrix[15] - matrix[14]);
- near_plane.normalize();
-
- ///////--- Far Plane ---///////
- Plane far_plane = Plane(matrix[2] - matrix[3],
- matrix[6] - matrix[7],
- matrix[10] - matrix[11],
- matrix[15] - matrix[14]);
- far_plane.normalize();
-
- ///////--- Right Plane ---///////
- Plane right_plane = Plane(matrix[0] - matrix[3],
- matrix[4] - matrix[7],
- matrix[8] - matrix[11],
- -matrix[15] + matrix[12]);
- right_plane.normalize();
-
- ///////--- Top Plane ---///////
- Plane top_plane = Plane(matrix[1] - matrix[3],
- matrix[5] - matrix[7],
- matrix[9] - matrix[11],
- -matrix[15] + matrix[13]);
- top_plane.normalize();
-
- Vector3 near_endpoint_left, near_endpoint_right;
- Vector3 far_endpoint_left, far_endpoint_right;
-
- bool res = near_plane.intersect_3(right_plane, top_plane, &near_endpoint_right);
- ERR_FAIL_COND_V(!res, false);
-
- res = far_plane.intersect_3(right_plane, top_plane, &far_endpoint_right);
- ERR_FAIL_COND_V(!res, false);
-
- if ((matrix[8] == 0) && (matrix[9] == 0)) {
- near_endpoint_left = near_endpoint_right;
- near_endpoint_left.x = -near_endpoint_left.x;
-
- far_endpoint_left = far_endpoint_right;
- far_endpoint_left.x = -far_endpoint_left.x;
- } else {
- ///////--- Left Plane ---///////
- Plane left_plane = Plane(matrix[0] + matrix[3],
- matrix[4] + matrix[7],
- matrix[8] + matrix[11],
- -matrix[15] - matrix[12]);
- left_plane.normalize();
+ Vector<Plane> planes = get_projection_planes(Transform());
+ const Planes intersections[8][3] = {
+ { PLANE_FAR, PLANE_LEFT, PLANE_TOP },
+ { PLANE_FAR, PLANE_LEFT, PLANE_BOTTOM },
+ { PLANE_FAR, PLANE_RIGHT, PLANE_TOP },
+ { PLANE_FAR, PLANE_RIGHT, PLANE_BOTTOM },
+ { PLANE_NEAR, PLANE_LEFT, PLANE_TOP },
+ { PLANE_NEAR, PLANE_LEFT, PLANE_BOTTOM },
+ { PLANE_NEAR, PLANE_RIGHT, PLANE_TOP },
+ { PLANE_NEAR, PLANE_RIGHT, PLANE_BOTTOM },
+ };
- res = near_plane.intersect_3(left_plane, top_plane, &near_endpoint_left);
- ERR_FAIL_COND_V(!res, false);
+ for (int i = 0; i < 8; i++) {
- res = far_plane.intersect_3(left_plane, top_plane, &far_endpoint_left);
+ Vector3 point;
+ bool res = planes[intersections[i][0]].intersect_3(planes[intersections[i][1]], planes[intersections[i][2]], &point);
ERR_FAIL_COND_V(!res, false);
+ p_8points[i] = p_transform.xform(point);
}
- p_8points[0] = p_transform.xform(Vector3(near_endpoint_right.x, near_endpoint_right.y, near_endpoint_right.z));
- p_8points[1] = p_transform.xform(Vector3(near_endpoint_right.x, -near_endpoint_right.y, near_endpoint_right.z));
- p_8points[2] = p_transform.xform(Vector3(near_endpoint_left.x, near_endpoint_left.y, near_endpoint_left.z));
- p_8points[3] = p_transform.xform(Vector3(near_endpoint_left.x, -near_endpoint_left.y, near_endpoint_left.z));
- p_8points[4] = p_transform.xform(Vector3(far_endpoint_right.x, far_endpoint_right.y, far_endpoint_right.z));
- p_8points[5] = p_transform.xform(Vector3(far_endpoint_right.x, -far_endpoint_right.y, far_endpoint_right.z));
- p_8points[6] = p_transform.xform(Vector3(far_endpoint_left.x, far_endpoint_left.y, far_endpoint_left.z));
- p_8points[7] = p_transform.xform(Vector3(far_endpoint_left.x, -far_endpoint_left.y, far_endpoint_left.z));
-
return true;
}
@@ -610,6 +560,11 @@ int CameraMatrix::get_pixels_per_meter(int p_for_pixel_width) const {
return int((result.x * 0.5 + 0.5) * p_for_pixel_width);
}
+bool CameraMatrix::is_orthogonal() const {
+
+ return matrix[3][3] == 1.0;
+}
+
real_t CameraMatrix::get_fov() const {
const real_t *matrix = (const real_t *)this->matrix;
diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h
index 175d0cdb1b..3145d73356 100644
--- a/core/math/camera_matrix.h
+++ b/core/math/camera_matrix.h
@@ -69,6 +69,7 @@ struct CameraMatrix {
real_t get_z_near() const;
real_t get_aspect() const;
real_t get_fov() const;
+ bool is_orthogonal() const;
Vector<Plane> get_projection_planes(const Transform &p_transform) const;
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index 614104f698..3b246cb183 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -158,7 +158,7 @@ void TriangleMesh::create(const PoolVector<Vector3> &p_faces) {
max_depth = 0;
int max_alloc = fc;
- int max = _create_bvh(bw.ptr(), bwp.ptr(), 0, fc, 1, max_depth, max_alloc);
+ _create_bvh(bw.ptr(), bwp.ptr(), 0, fc, 1, max_depth, max_alloc);
bw = PoolVector<BVH>::Write(); //clearup
bvh.resize(max_alloc); //resize back
diff --git a/core/object.cpp b/core/object.cpp
index 23e32a214a..b1770f1d7a 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -277,32 +277,32 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name)
: name(p_name),
flags(METHOD_FLAG_NORMAL),
+ return_val(p_ret),
id(0) {
- return_val = p_ret;
}
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1)
: name(p_name),
+ return_val(p_ret),
flags(METHOD_FLAG_NORMAL),
id(0) {
- return_val = p_ret;
arguments.push_back(p_param1);
}
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
: name(p_name),
+ return_val(p_ret),
flags(METHOD_FLAG_NORMAL),
id(0) {
- return_val = p_ret;
arguments.push_back(p_param1);
arguments.push_back(p_param2);
}
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
: name(p_name),
+ return_val(p_ret),
flags(METHOD_FLAG_NORMAL),
id(0) {
- return_val = p_ret;
arguments.push_back(p_param1);
arguments.push_back(p_param2);
arguments.push_back(p_param3);
@@ -310,9 +310,9 @@ MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const Pr
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
: name(p_name),
+ return_val(p_ret),
flags(METHOD_FLAG_NORMAL),
id(0) {
- return_val = p_ret;
arguments.push_back(p_param1);
arguments.push_back(p_param2);
arguments.push_back(p_param3);
@@ -321,9 +321,9 @@ MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const Pr
MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5)
: name(p_name),
+ return_val(p_ret),
flags(METHOD_FLAG_NORMAL),
id(0) {
- return_val = p_ret;
arguments.push_back(p_param1);
arguments.push_back(p_param2);
arguments.push_back(p_param3);
diff --git a/core/object.h b/core/object.h
index 644e2b8270..3070439138 100644
--- a/core/object.h
+++ b/core/object.h
@@ -148,6 +148,7 @@ struct PropertyInfo {
hint(PROPERTY_HINT_NONE),
usage(PROPERTY_USAGE_DEFAULT) {
}
+
PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT, const StringName &p_class_name = StringName())
: type(p_type),
name(p_name),
@@ -161,12 +162,12 @@ struct PropertyInfo {
class_name = p_class_name;
}
}
+
PropertyInfo(const StringName &p_class_name)
: type(Variant::OBJECT),
+ class_name(p_class_name),
hint(PROPERTY_HINT_NONE),
usage(PROPERTY_USAGE_DEFAULT) {
-
- class_name = p_class_name;
}
bool operator<(const PropertyInfo &p_info) const {
diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h
index 3e619d2b2e..9e95f963e1 100644
--- a/core/ordered_hash_map.h
+++ b/core/ordered_hash_map.h
@@ -55,8 +55,8 @@ public:
friend class OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>;
typename InternalList::Element *list_element;
- typename InternalList::Element *next_element;
typename InternalList::Element *prev_element;
+ typename InternalList::Element *next_element;
Element(typename InternalList::Element *p_element) {
list_element = p_element;
@@ -69,7 +69,7 @@ public:
public:
_FORCE_INLINE_ Element()
- : list_element(NULL), next_element(NULL), prev_element(NULL) {
+ : list_element(NULL), prev_element(NULL), next_element(NULL) {
}
Element next() const {
@@ -312,4 +312,4 @@ bool operator!=(const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH
return (first.list_element != second.list_element);
}
-#endif // ORDERED_HASH_MAP_H \ No newline at end of file
+#endif // ORDERED_HASH_MAP_H
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index f24d6d16ca..1437e7cdfc 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -292,7 +292,7 @@ String DirAccess::get_full_path(const String &p_path, AccessType p_access) {
return full;
}
-Error DirAccess::copy(String p_from, String p_to) {
+Error DirAccess::copy(String p_from, String p_to, int chmod_flags) {
//printf("copy %s -> %s\n",p_from.ascii().get_data(),p_to.ascii().get_data());
Error err;
@@ -329,6 +329,11 @@ Error DirAccess::copy(String p_from, String p_to) {
fdst->store_8(fsrc->get_8());
}
+ if (err == OK && chmod_flags != -1) {
+ fdst->close();
+ err = fdst->_chmod(p_to, chmod_flags);
+ }
+
memdelete(fsrc);
memdelete(fdst);
diff --git a/core/os/dir_access.h b/core/os/dir_access.h
index 6ad8b4c49b..7fa3ce5cf1 100644
--- a/core/os/dir_access.h
+++ b/core/os/dir_access.h
@@ -89,7 +89,7 @@ public:
static bool exists(String p_dir);
virtual size_t get_space_left() = 0;
- virtual Error copy(String p_from, String p_to);
+ virtual Error copy(String p_from, String p_to, int chmod_flags = -1);
virtual Error rename(String p_from, String p_to) = 0;
virtual Error remove(String p_name) = 0;
diff --git a/core/os/file_access.h b/core/os/file_access.h
index 8393f0530b..151c41c263 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -140,6 +140,8 @@ public:
virtual Error reopen(const String &p_path, int p_mode_flags); ///< does not change the AccessType
+ virtual Error _chmod(const String &p_path, int p_mod) {}
+
static FileAccess *create(AccessType p_access); /// Create a file access (for the current platform) this is the only portable way of accessing files.
static FileAccess *create_for_path(const String &p_path);
static FileAccess *open(const String &p_path, int p_mode_flags, Error *r_error = NULL); /// Create a file access (for the current platform) this is the only portable way of accessing files.
@@ -174,6 +176,7 @@ struct FileAccessRef {
operator bool() const { return f != NULL; }
FileAccess *f;
+ operator FileAccess *() { return f; }
FileAccessRef(FileAccess *fa) { f = fa; }
~FileAccessRef() {
if (f) memdelete(f);
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 764f7fe6e6..437ce01a5e 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -485,7 +485,7 @@ bool OS::is_vsync_enabled() const {
return true;
}
-PowerState OS::get_power_state() {
+OS::PowerState OS::get_power_state() {
return POWERSTATE_UNKNOWN;
}
int OS::get_power_seconds_left() {
diff --git a/core/os/os.h b/core/os/os.h
index 258708eea2..2fc87e44a0 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -34,7 +34,6 @@
#include "image.h"
#include "list.h"
#include "os/main_loop.h"
-#include "power.h"
#include "ustring.h"
#include "vector.h"
#include <stdarg.h>
@@ -65,6 +64,14 @@ class OS {
public:
typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection);
+ enum PowerState {
+ POWERSTATE_UNKNOWN, /**< cannot determine power status */
+ POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
+ POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
+ POWERSTATE_CHARGING, /**< Plugged in, charging battery */
+ POWERSTATE_CHARGED /**< Plugged in, battery charged */
+ };
+
enum RenderThreadMode {
RENDER_THREAD_UNSAFE,
@@ -279,6 +286,9 @@ public:
bool is_stdout_verbose() const;
+ virtual void disable_crash_handler() {}
+ virtual bool is_disable_crash_handler() const { return false; }
+
enum CursorShape {
CURSOR_ARROW,
CURSOR_IBEAM,
@@ -410,7 +420,7 @@ public:
virtual void set_use_vsync(bool p_enable);
virtual bool is_vsync_enabled() const;
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
@@ -428,6 +438,6 @@ public:
virtual ~OS();
};
-VARIANT_ENUM_CAST(PowerState);
+VARIANT_ENUM_CAST(OS::PowerState);
#endif
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index a74917162b..7ea0d563a6 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -114,7 +114,15 @@ String ProjectSettings::globalize_path(const String &p_path) const {
return p_path.replace("res:/", resource_path);
};
return p_path.replace("res://", "");
- };
+ } else if (p_path.begins_with("user://")) {
+
+ String data_dir = OS::get_singleton()->get_data_dir();
+ if (data_dir != "") {
+
+ return p_path.replace("user:/", data_dir);
+ };
+ return p_path.replace("user://", "");
+ }
return p_path;
}
@@ -262,6 +270,11 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
_load_settings("res://override.cfg");
+#ifdef DEBUG_ENABLED
+ } else {
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Couldn't open project over network");
+#endif
}
return OK;
@@ -279,6 +292,12 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
//load override from location of the main pack
_load_settings(p_main_pack.get_base_dir().plus_file("override.cfg"));
+#ifdef DEBUG_ENABLED
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Successfully loaded " + p_main_pack + "/project.godot or project.binary");
+ } else {
+ print_line("Couldn't load/find " + p_main_pack + "/project.godot or project.binary");
+#endif
}
return OK;
@@ -286,12 +305,43 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
//Attempt with execname.pck
if (exec_path != "") {
+ bool found = false;
- if (_load_resource_pack(exec_path.get_basename() + ".pck")) {
+ // get our filename without our path (note, using exec_path.get_file before get_basename anymore because not all file systems have dots in their file names!)
+ String filebase_name = exec_path.get_file().get_basename();
+ // try to open at the location of executable
+ String datapack_name = exec_path.get_base_dir().plus_file(filebase_name) + ".pck";
+ if (_load_resource_pack(datapack_name)) {
+ found = true;
+ } else {
+#ifdef DEBUG_ENABLED
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Couldn't open " + datapack_name);
+#endif
+ datapack_name = filebase_name + ".pck";
+ if (_load_resource_pack(datapack_name)) {
+ found = true;
+#ifdef DEBUG_ENABLED
+ } else {
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Couldn't open " + datapack_name);
+#endif
+ }
+ }
+
+ // if we opened our package, try and load our project...
+ if (found) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
- //load override from location of executable
+ // load override from location of executable
_load_settings(exec_path.get_base_dir().plus_file("override.cfg"));
+
+#ifdef DEBUG_ENABLED
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Successfully loaded " + datapack_name + "/project.godot or project.binary");
+ } else {
+ print_line("Couldn't load/find " + datapack_name + "/project.godot or project.binary");
+#endif
}
return OK;
@@ -312,6 +362,12 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
_load_settings("res://override.cfg");
+#ifdef DEBUG_ENABLED
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Successfully loaded " + resource_path + "/project.godot or project.binary");
+ } else {
+ print_line("Couldn't load/find " + resource_path + "/project.godot or project.binary");
+#endif
}
return OK;
@@ -337,6 +393,12 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack) {
candidate = current_dir;
found = true;
break;
+#ifdef DEBUG_ENABLED
+ // when debug version of godot is used, provide some feedback to the developer
+ print_line("Successfully loaded " + current_dir + "/project.godot or project.binary");
+ } else {
+ print_line("Couldn't load/find " + current_dir + "/project.godot or project.binary");
+#endif
}
d->change_dir("..");
diff --git a/core/reference.cpp b/core/reference.cpp
index bb70628cbe..7f93922d22 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -33,7 +33,7 @@
bool Reference::init_ref() {
- if (refcount.ref()) {
+ if (reference()) {
// this may fail in the scenario of two threads assigning the pointer for the FIRST TIME
// at the same time, which is never likely to happen (would be crazy to do)
@@ -41,7 +41,7 @@ bool Reference::init_ref() {
if (refcount_init.get() > 0) {
refcount_init.unref();
- refcount.unref(); // first referencing is already 1, so compensate for the ref above
+ unreference(); // first referencing is already 1, so compensate for the ref above
}
return true;
@@ -62,13 +62,16 @@ int Reference::reference_get_count() const {
return refcount.get();
}
-void Reference::reference() {
+bool Reference::reference() {
+ bool success = refcount.ref();
- refcount.ref();
- if (get_script_instance()) {
+ if (success && get_script_instance()) {
get_script_instance()->refcount_incremented();
}
+
+ return success;
}
+
bool Reference::unreference() {
bool die = refcount.unref();
diff --git a/core/reference.h b/core/reference.h
index ca3ae60418..bafc164276 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -51,7 +51,7 @@ protected:
public:
_FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() < 1; }
bool init_ref();
- void reference();
+ bool reference(); // returns false if refcount is at zero and didn't get increased
bool unreference();
int reference_get_count() const;
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 27c31127a4..0e34a3eea5 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -68,6 +68,7 @@ static _Engine *_engine = NULL;
static _ClassDB *_classdb = NULL;
static _Marshalls *_marshalls = NULL;
static TranslationLoaderPO *resource_format_po = NULL;
+static _JSON *_json = NULL;
static IP *ip = NULL;
@@ -162,6 +163,8 @@ void register_core_types() {
ClassDB::register_class<AStar>();
ClassDB::register_class<EncodedObjectAsID>();
+ ClassDB::register_class<JSONParseResult>();
+
ip = IP::create();
_geometry = memnew(_Geometry);
@@ -172,6 +175,7 @@ void register_core_types() {
_engine = memnew(_Engine);
_classdb = memnew(_ClassDB);
_marshalls = memnew(_Marshalls);
+ _json = memnew(_JSON);
}
void register_core_settings() {
@@ -193,6 +197,7 @@ void register_core_singletons() {
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("TranslationServer", TranslationServer::get_singleton()));
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("Input", Input::get_singleton()));
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("InputMap", InputMap::get_singleton()));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JSON", _JSON::get_singleton()));
}
void unregister_core_types() {
@@ -203,6 +208,7 @@ void unregister_core_types() {
memdelete(_engine);
memdelete(_classdb);
memdelete(_marshalls);
+ memdelete(_json);
memdelete(_geometry);
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 8875732b8e..f0097054b1 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -125,6 +125,9 @@ void ScriptDebuggerRemote::_put_variable(const String &p_name, const Variant &p_
packet_peer_stream->put_var(p_name);
int len = 0;
Error err = encode_variant(p_variable, NULL, len);
+ if (err != OK)
+ ERR_PRINT("Failed to encode variant");
+
if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size
packet_peer_stream->put_var(Variant());
} else {
diff --git a/core/script_language.cpp b/core/script_language.cpp
index bde80a30bc..5ead91f26e 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -184,7 +184,6 @@ void ScriptInstance::call_multilevel(const StringName &p_method, VARIANT_ARG_DEC
argc++;
}
- Variant::CallError error;
call_multilevel(p_method, argptr, argc);
}
diff --git a/core/set.h b/core/set.h
index 317e180869..f68d78cea1 100644
--- a/core/set.h
+++ b/core/set.h
@@ -438,8 +438,9 @@ private:
if (!rp)
rp = _data._nil;
Element *node = (rp->left == _data._nil) ? rp->right : rp->left;
+ node->parent = rp->parent;
- if (_data._root == (node->parent = rp->parent)) {
+ if (_data._root == node->parent) {
_data._root->left = node;
} else {
if (rp == rp->parent->left) {
diff --git a/core/type_info.h b/core/type_info.h
index da6047450c..9fb80af0eb 100644
--- a/core/type_info.h
+++ b/core/type_info.h
@@ -39,28 +39,27 @@ struct TypeInherits {
template <class T, typename = void>
struct GetTypeInfo {
- enum { VARIANT_TYPE = Variant::NIL };
-
+ static const Variant::Type VARIANT_TYPE = Variant::NIL;
static inline PropertyInfo get_class_info() {
ERR_PRINT("GetTypeInfo fallback. Bug!");
return PropertyInfo(); // Not "Nil", this is an error
}
};
-#define MAKE_TYPE_INFO(m_type, m_var_type) \
- template <> \
- struct GetTypeInfo<m_type> { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline PropertyInfo get_class_info() { \
- return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
- } \
- }; \
- template <> \
- struct GetTypeInfo<const m_type &> { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline PropertyInfo get_class_info() { \
- return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
- } \
+#define MAKE_TYPE_INFO(m_type, m_var_type) \
+ template <> \
+ struct GetTypeInfo<m_type> { \
+ static const Variant::Type VARIANT_TYPE = m_var_type; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(VARIANT_TYPE, String()); \
+ } \
+ }; \
+ template <> \
+ struct GetTypeInfo<const m_type &> { \
+ static const Variant::Type VARIANT_TYPE = m_var_type; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(VARIANT_TYPE, String()); \
+ } \
};
MAKE_TYPE_INFO(bool, Variant::BOOL)
@@ -108,14 +107,14 @@ MAKE_TYPE_INFO(BSP_Tree, Variant::DICTIONARY)
//for RefPtr
template <>
struct GetTypeInfo<RefPtr> {
- enum { VARIANT_TYPE = Variant::OBJECT };
+ static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
static inline PropertyInfo get_class_info() {
return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference");
}
};
template <>
struct GetTypeInfo<const RefPtr &> {
- enum { VARIANT_TYPE = Variant::OBJECT };
+ static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
static inline PropertyInfo get_class_info() {
return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference");
}
@@ -124,7 +123,7 @@ struct GetTypeInfo<const RefPtr &> {
//for variant
template <>
struct GetTypeInfo<Variant> {
- enum { VARIANT_TYPE = Variant::NIL };
+ static const Variant::Type VARIANT_TYPE = Variant::NIL;
static inline PropertyInfo get_class_info() {
return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
}
@@ -132,26 +131,26 @@ struct GetTypeInfo<Variant> {
template <>
struct GetTypeInfo<const Variant &> {
- enum { VARIANT_TYPE = Variant::NIL };
+ static const Variant::Type VARIANT_TYPE = Variant::NIL;
static inline PropertyInfo get_class_info() {
return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
}
};
-#define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \
- template <> \
- struct GetTypeInfo<m_template<m_type> > { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline PropertyInfo get_class_info() { \
- return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
- } \
- }; \
- template <> \
- struct GetTypeInfo<const m_template<m_type> &> { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline PropertyInfo get_class_info() { \
- return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
- } \
+#define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \
+ template <> \
+ struct GetTypeInfo<m_template<m_type> > { \
+ static const Variant::Type VARIANT_TYPE = m_var_type; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(VARIANT_TYPE, String()); \
+ } \
+ }; \
+ template <> \
+ struct GetTypeInfo<const m_template<m_type> &> { \
+ static const Variant::Type VARIANT_TYPE = m_var_type; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(VARIANT_TYPE, String()); \
+ } \
};
MAKE_TEMPLATE_TYPE_INFO(Vector, uint8_t, Variant::POOL_BYTE_ARRAY)
@@ -171,8 +170,7 @@ MAKE_TEMPLATE_TYPE_INFO(PoolVector, Face3, Variant::POOL_VECTOR3_ARRAY)
template <typename T>
struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
- enum { VARIANT_TYPE = Variant::OBJECT };
-
+ static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
static inline PropertyInfo get_class_info() {
return PropertyInfo(StringName(T::get_class_static()));
}
@@ -180,8 +178,7 @@ struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type>
template <typename T>
struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
- enum { VARIANT_TYPE = Variant::OBJECT };
-
+ static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
static inline PropertyInfo get_class_info() {
return PropertyInfo(StringName(T::get_class_static()));
}
@@ -190,7 +187,7 @@ struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>:
#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
template <> \
struct GetTypeInfo<m_impl> { \
- enum { VARIANT_TYPE = Variant::INT }; \
+ static const Variant::Type VARIANT_TYPE = Variant::INT; \
static inline PropertyInfo get_class_info() { \
return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_CLASS_IS_ENUM, String(#m_enum).replace("::", ".")); \
} \
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 4760047959..27fc73ec63 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -503,6 +503,10 @@ void UndoRedo::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_history"), &UndoRedo::clear_history);
ClassDB::bind_method(D_METHOD("get_current_action_name"), &UndoRedo::get_current_action_name);
ClassDB::bind_method(D_METHOD("get_version"), &UndoRedo::get_version);
+ ClassDB::bind_method(D_METHOD("set_max_steps", "max_steps"), &UndoRedo::set_max_steps);
+ ClassDB::bind_method(D_METHOD("get_max_steps"), &UndoRedo::get_max_steps);
+ ClassDB::bind_method(D_METHOD("redo"), &UndoRedo::redo);
+ ClassDB::bind_method(D_METHOD("undo"), &UndoRedo::undo);
BIND_ENUM_CONSTANT(MERGE_DISABLE);
BIND_ENUM_CONSTANT(MERGE_ENDS);
diff --git a/core/variant.cpp b/core/variant.cpp
index 74f6b6a711..10d86152ee 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -2259,8 +2259,8 @@ Variant::Variant(const RefPtr &p_resource) {
type = OBJECT;
memnew_placement(_data._mem, ObjData);
- REF ref = p_resource;
- _get_obj().obj = ref.ptr();
+ REF *ref = reinterpret_cast<REF *>(p_resource.get_data());
+ _get_obj().obj = ref->ptr();
_get_obj().ref = p_resource;
}
diff --git a/core/variant.h b/core/variant.h
index c44608ebfa..e77e2e93c4 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -43,7 +43,6 @@
#include "math_2d.h"
#include "matrix3.h"
#include "node_path.h"
-#include "os/power.h"
#include "plane.h"
#include "quat.h"
#include "rect3.h"
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index ad15f8f5cb..19d9b0297f 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -428,8 +428,8 @@ struct _VariantCall {
VCALL_LOCALMEM2R(Quat, slerpni);
VCALL_LOCALMEM4R(Quat, cubic_slerp);
- VCALL_LOCALMEM0R(Color, to_32);
- VCALL_LOCALMEM0R(Color, to_ARGB32);
+ VCALL_LOCALMEM0R(Color, to_rgba32);
+ VCALL_LOCALMEM0R(Color, to_argb32);
VCALL_LOCALMEM0R(Color, gray);
VCALL_LOCALMEM0R(Color, inverted);
VCALL_LOCALMEM0R(Color, contrasted);
@@ -481,6 +481,7 @@ struct _VariantCall {
VCALL_LOCALMEM1(Array, erase);
VCALL_LOCALMEM0(Array, sort);
VCALL_LOCALMEM2(Array, sort_custom);
+ VCALL_LOCALMEM0R(Array, duplicate);
VCALL_LOCALMEM0(Array, invert);
static void _call_PoolByteArray_get_string_from_ascii(Variant &r_ret, Variant &p_self, const Variant **p_args) {
@@ -1523,8 +1524,8 @@ void register_variant_methods() {
ADDFUNC2(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
ADDFUNC4(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
- ADDFUNC0(COLOR, INT, Color, to_32, varray());
- ADDFUNC0(COLOR, INT, Color, to_ARGB32, varray());
+ ADDFUNC0(COLOR, INT, Color, to_rgba32, varray());
+ ADDFUNC0(COLOR, INT, Color, to_argb32, varray());
ADDFUNC0(COLOR, REAL, Color, gray, varray());
ADDFUNC0(COLOR, COLOR, Color, inverted, varray());
ADDFUNC0(COLOR, COLOR, Color, contrasted, varray());
@@ -1575,6 +1576,7 @@ void register_variant_methods() {
ADDFUNC0(ARRAY, NIL, Array, sort, varray());
ADDFUNC2(ARRAY, NIL, Array, sort_custom, OBJECT, "obj", STRING, "func", varray());
ADDFUNC0(ARRAY, NIL, Array, invert, varray());
+ ADDFUNC0(ARRAY, ARRAY, Array, duplicate, varray());
ADDFUNC0(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray());
ADDFUNC2(POOL_BYTE_ARRAY, NIL, PoolByteArray, set, INT, "idx", INT, "byte", varray());
@@ -1621,7 +1623,7 @@ void register_variant_methods() {
ADDFUNC2(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_STRING_ARRAY, NIL, PoolStringArray, invert, varray());
- ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "string", varray());
+ ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "delimiter", varray());
ADDFUNC0(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray());
ADDFUNC2(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, set, INT, "idx", VECTOR2, "vector2", varray());
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index b6e114b853..a11169eb8f 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -493,7 +493,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(BASIS);
DEFAULT_OP_FAIL(TRANSFORM);
- DEFAULT_OP_FAIL(COLOR);
+ DEFAULT_OP_LOCALMEM(+, COLOR, Color);
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
@@ -549,7 +549,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(BASIS);
DEFAULT_OP_FAIL(TRANSFORM);
- DEFAULT_OP_FAIL(COLOR);
+ DEFAULT_OP_LOCALMEM(-, COLOR, Color);
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
@@ -645,7 +645,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
r_valid = false;
return;
} break;
- DEFAULT_OP_FAIL(COLOR);
+ DEFAULT_OP_LOCALMEM_NUM(*, COLOR, Color);
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
@@ -717,7 +717,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(BASIS);
DEFAULT_OP_FAIL(TRANSFORM);
- DEFAULT_OP_FAIL(COLOR);
+ DEFAULT_OP_LOCALMEM_NUM(/, COLOR, Color);
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
@@ -797,7 +797,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(BASIS);
DEFAULT_OP_FAIL(TRANSFORM);
- DEFAULT_OP_FAIL(COLOR);
+ DEFAULT_OP_LOCALMEM_NEG(COLOR, Color);
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
deleted file mode 100644
index 8d16585726..0000000000
--- a/doc/base/classes.xml
+++ /dev/null
@@ -1,60265 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<doc version="3.0.alpha.custom_build" name="Engine Types">
-<class name="@GDScript" category="Core">
- <brief_description>
- Built-in GDScript functions.
- </brief_description>
- <description>
- This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.
- </description>
- <methods>
- <method name="Color8">
- <return type="Color">
- </return>
- <argument index="0" name="r8" type="int">
- </argument>
- <argument index="1" name="g8" type="int">
- </argument>
- <argument index="2" name="b8" type="int">
- </argument>
- <argument index="3" name="a8" type="int">
- </argument>
- <description>
- Make a color from red, green, blue and alpha. Arguments can range from 0 to 255.
- </description>
- </method>
- <method name="ColorN">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="alpha" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="abs">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the absolute value of parameter s (i.e. unsigned value, works for integer and float).
- </description>
- </method>
- <method name="acos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the principal value of the arc cosine of s, expressed in radians. In trigonometrics, arc cosine is the inverse operation of cosine.
- </description>
- </method>
- <method name="asin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the principal value of the arc sine of s, expressed in radians. In trigonometrics, arc sine is the inverse operation of sine.
- </description>
- </method>
- <method name="assert">
- <return type="void">
- </return>
- <argument index="0" name="condition" type="bool">
- </argument>
- <description>
- Assert that the condition is true. If the condition is false, generates an error.
- </description>
- </method>
- <method name="atan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the principal value of the arc tangent of s, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, the function cannot determine with certainty in which quadrant the angle falls only by its tangent value. See [method atan2] for an alternative that takes a fractional argument instead.
- </description>
- </method>
- <method name="atan2">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Returns the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant.
- </description>
- </method>
- <method name="bytes2var">
- <return type="Variant">
- </return>
- <argument index="0" name="bytes" type="PoolByteArray">
- </argument>
- <description>
- Decode a byte array back to a value.
- </description>
- </method>
- <method name="ceil">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds s upward, returning the smallest integral value that is not less than s.
- </description>
- </method>
- <method name="char">
- <return type="String">
- </return>
- <argument index="0" name="ascii" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="clamp">
- <return type="float">
- </return>
- <argument index="0" name="val" type="float">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <description>
- Clamps a value between a minimum and maximum value.
- </description>
- </method>
- <method name="convert">
- <return type="Object">
- </return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <description>
- Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope].
- </description>
- </method>
- <method name="cos">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the cosine of an angle of s radians.
- </description>
- </method>
- <method name="cosh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic cosine of s.
- </description>
- </method>
- <method name="db2linear">
- <return type="float">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- Convert from decibels to linear energy (audio).
- </description>
- </method>
- <method name="decimals">
- <return type="float">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Return the amount of decimals in the floating point value.
- </description>
- </method>
- <method name="dectime">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="amount" type="float">
- </argument>
- <argument index="2" name="step" type="float">
- </argument>
- <description>
- Decreases time by a specified amount.
- </description>
- </method>
- <method name="deg2rad">
- <return type="float">
- </return>
- <argument index="0" name="deg" type="float">
- </argument>
- <description>
- Convert from degrees to radians.
- </description>
- </method>
- <method name="dict2inst">
- <return type="Object">
- </return>
- <argument index="0" name="dict" type="Dictionary">
- </argument>
- <description>
- Convert a previously converted instances to dictionary back into an instance. Useful for deserializing.
- </description>
- </method>
- <method name="ease">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="curve" type="float">
- </argument>
- <description>
- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
- </description>
- </method>
- <method name="exp">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the base-e exponential function of s, which is e raised to the power s: e^s.
- </description>
- </method>
- <method name="floor">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Rounds s downward, returning the largest integral value that is not greater than s.
- </description>
- </method>
- <method name="fmod">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Returns the floating-point remainder of x/y (rounded towards zero):
- [codeblock]
- fmod = x - tquot * y
- [/codeblock]
- Where tquot is the truncated (i.e., rounded towards zero) result of: x/y.
- </description>
- </method>
- <method name="fposmod">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Module (remainder of x/y) that wraps equally in positive and negative.
- </description>
- </method>
- <method name="funcref">
- <return type="Object">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <argument index="1" name="funcname" type="String">
- </argument>
- <description>
- Return a reference to the specified function.
- </description>
- </method>
- <method name="hash">
- <return type="int">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Hash the variable passed and return an integer.
- </description>
- </method>
- <method name="inst2dict">
- <return type="Dictionary">
- </return>
- <argument index="0" name="inst" type="Object">
- </argument>
- <description>
- Convert a script class instance to a dictionary (useful for serializing).
- </description>
- </method>
- <method name="instance_from_id">
- <return type="Object">
- </return>
- <argument index="0" name="instance_id" type="int">
- </argument>
- <description>
- Get an object by its ID.
- </description>
- </method>
- <method name="inverse_lerp">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_inf">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether s is an infinity value (either positive infinity or negative infinity).
- </description>
- </method>
- <method name="is_nan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns whether s is a NaN (Not-A-Number) value.
- </description>
- </method>
- <method name="len">
- <return type="int">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="lerp">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <argument index="2" name="weight" type="float">
- </argument>
- <description>
- Linear interpolates between two values by a normalized value.
- </description>
- </method>
- <method name="linear2db">
- <return type="float">
- </return>
- <argument index="0" name="nrg" type="float">
- </argument>
- <description>
- Convert from linear energy to decibels (audio).
- </description>
- </method>
- <method name="load">
- <return type="Object">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Load a resource from the filesystem, pass a valid path as argument.
- </description>
- </method>
- <method name="log">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Natural logarithm.
- </description>
- </method>
- <method name="max">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Return the maximum of two values.
- </description>
- </method>
- <method name="min">
- <return type="float">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <description>
- Return the minimum of two values.
- </description>
- </method>
- <method name="nearest_po2">
- <return type="int">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Return the nearest larger power of 2 for an integer.
- </description>
- </method>
- <method name="parse_json">
- <return type="Variant">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
- Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert every numerical values to [float] types.
- </description>
- </method>
- <method name="pow">
- <return type="float">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Power function, x elevate to y.
- </description>
- </method>
- <method name="preload">
- <return type="Resource">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Preload a resource from the filesystem. The resource is loaded during script parsing.
- </description>
- </method>
- <method name="print" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Print one or more arguments to strings in the best way possible to a console line.
- </description>
- </method>
- <method name="print_stack">
- <return type="void">
- </return>
- <description>
- Print a stack track at code location, only works when running with debugger turned on.
- </description>
- </method>
- <method name="printerr" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Print one or more arguments to strings in the best way possible to standard error line.
- </description>
- </method>
- <method name="printraw" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
- </description>
- </method>
- <method name="prints" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Print one or more arguments to the console with a space between each argument.
- </description>
- </method>
- <method name="printt" qualifiers="vararg">
- <return type="void">
- </return>
- <description>
- Print one or more arguments to the console with a tab between each argument.
- </description>
- </method>
- <method name="rad2deg">
- <return type="float">
- </return>
- <argument index="0" name="rad" type="float">
- </argument>
- <description>
- Convert from radians to degrees.
- </description>
- </method>
- <method name="rand_range">
- <return type="float">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <argument index="1" name="to" type="float">
- </argument>
- <description>
- Random range, any floating point value between 'from' and 'to'.
- </description>
- </method>
- <method name="rand_seed">
- <return type="Array">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
- </description>
- </method>
- <method name="randf">
- <return type="float">
- </return>
- <description>
- Return a random floating point value between 0 and 1.
- </description>
- </method>
- <method name="randi">
- <return type="int">
- </return>
- <description>
- Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20.
- </description>
- </method>
- <method name="randomize">
- <return type="void">
- </return>
- <description>
- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
- </description>
- </method>
- <method name="range" qualifiers="vararg">
- <return type="Array">
- </return>
- <description>
- Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
- </description>
- </method>
- <method name="range_lerp">
- <return type="float">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <argument index="1" name="istart" type="float">
- </argument>
- <argument index="2" name="istop" type="float">
- </argument>
- <argument index="3" name="ostart" type="float">
- </argument>
- <argument index="4" name="ostop" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="round">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the integral value that is nearest to s, with halfway cases rounded away from zero.
- </description>
- </method>
- <method name="seed">
- <return type="void">
- </return>
- <argument index="0" name="seed" type="int">
- </argument>
- <description>
- Set seed for the random number generator.
- </description>
- </method>
- <method name="sign">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Return sign (-1 or +1).
- </description>
- </method>
- <method name="sin">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the sine of an angle of s radians.
- </description>
- </method>
- <method name="sinh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic sine of s.
- </description>
- </method>
- <method name="sqrt">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the square root of s.
- </description>
- </method>
- <method name="stepify">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <argument index="1" name="step" type="float">
- </argument>
- <description>
- Snap float value to a given step.
- </description>
- </method>
- <method name="str" qualifiers="vararg">
- <return type="String">
- </return>
- <description>
- Convert one or more arguments to string in the best way possible.
- </description>
- </method>
- <method name="str2var">
- <return type="Variant">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Convert a formatted string that was returned by [method var2str] to the original value.
- </description>
- </method>
- <method name="tan">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the tangent of an angle of s radians.
- </description>
- </method>
- <method name="tanh">
- <return type="float">
- </return>
- <argument index="0" name="s" type="float">
- </argument>
- <description>
- Returns the hyperbolic tangent of s.
- </description>
- </method>
- <method name="to_json">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Convert a Variant to json text.
- </description>
- </method>
- <method name="type_exists">
- <return type="bool">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="typeof">
- <return type="int">
- </return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <description>
- Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
- </description>
- </method>
- <method name="validate_json">
- <return type="String">
- </return>
- <argument index="0" name="json" type="String">
- </argument>
- <description>
- This method is used to validate the structure and data types of a piece of JSON, similar to XML Schema for XML.
- </description>
- </method>
- <method name="var2bytes">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Encode a variable value to a byte array.
- </description>
- </method>
- <method name="var2str">
- <return type="String">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Convert a value to a formatted string that can later be parsed using [method str2var].
- </description>
- </method>
- <method name="weakref">
- <return type="Object">
- </return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <description>
- Return a weak reference to an object.
- A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
- </description>
- </method>
- <method name="yield">
- <return type="GDFunctionState">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="signal" type="String">
- </argument>
- <description>
- Stop the function execution and return the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state.
- Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PI" value="3.141593" enum="">
- Constant that represents how many times the diameter of a circumference fits around its perimeter.
- </constant>
- <constant name="INF" value="inf" enum="">
- A positive infinity. (For negative infinity, use -INF).
- </constant>
- <constant name="NAN" value="nan" enum="">
- Macro constant that expands to an expression of type float that represents a NaN.
- The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
- </constant>
- </constants>
-</class>
-<class name="@Global Scope" category="Core">
- <brief_description>
- Global scope constants and variables.
- </brief_description>
- <description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much.
- Singletons are also documented here, since they can be accessed from anywhere.
- </description>
- <methods>
- </methods>
- <members>
- <member name="ARVRServer" type="ARVRServer" setter="" getter="" brief="">
- </member>
- <member name="AudioServer" type="AudioServer" setter="" getter="" brief="">
- [AudioServer] singleton
- </member>
- <member name="ClassDB" type="ClassDB" setter="" getter="" brief="">
- [ClassDB] singleton
- </member>
- <member name="Engine" type="Engine" setter="" getter="" brief="">
- [Engine] singleton
- </member>
- <member name="Geometry" type="Geometry" setter="" getter="" brief="">
- [Geometry] singleton
- </member>
- <member name="IP" type="IP" setter="" getter="" brief="">
- [IP] singleton
- </member>
- <member name="Input" type="Input" setter="" getter="" brief="">
- [Input] singleton
- </member>
- <member name="InputMap" type="InputMap" setter="" getter="" brief="">
- [InputMap] singleton
- </member>
- <member name="Marshalls" type="Reference" setter="" getter="" brief="">
- [Marshalls] singleton
- </member>
- <member name="OS" type="OS" setter="" getter="" brief="">
- [OS] singleton
- </member>
- <member name="Performance" type="Performance" setter="" getter="" brief="">
- [Performance] singleton
- </member>
- <member name="Physics2DServer" type="Physics2DServer" setter="" getter="" brief="">
- [Physics2DServer] singleton
- </member>
- <member name="PhysicsServer" type="PhysicsServer" setter="" getter="" brief="">
- [PhysicsServer] singleton
- </member>
- <member name="ProjectSettings" type="ProjectSettings" setter="" getter="" brief="">
- [ProjectSettings] singleton
- </member>
- <member name="ResourceLoader" type="ResourceLoader" setter="" getter="" brief="">
- [ResourceLoader] singleton
- </member>
- <member name="ResourceSaver" type="ResourceSaver" setter="" getter="" brief="">
- [ResourceSaver] singleton
- </member>
- <member name="TranslationServer" type="TranslationServer" setter="" getter="" brief="">
- [TranslationServer] singleton
- </member>
- <member name="VisualServer" type="VisualServer" setter="" getter="" brief="">
- [VisualServer] singleton
- </member>
- </members>
- <constants>
- <constant name="MARGIN_LEFT" value="0">
- Left margin, used usually for [Control] or [StyleBox] derived classes.
- </constant>
- <constant name="MARGIN_TOP" value="1">
- Top margin, used usually for [Control] or [StyleBox] derived classes.
- </constant>
- <constant name="MARGIN_RIGHT" value="2">
- Right margin, used usually for [Control] or [StyleBox] derived classes.
- </constant>
- <constant name="MARGIN_BOTTOM" value="3">
- Bottom margin, used usually for [Control] or [StyleBox] derived classes.
- </constant>
- <constant name="VERTICAL" value="1">
- General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc.
- </constant>
- <constant name="HORIZONTAL" value="0">
- General horizontal alignment, used usually for [Separator], [ScrollBar], [Slider], etc.
- </constant>
- <constant name="HALIGN_LEFT" value="0">
- Horizontal left alignment, usually for text-derived classes.
- </constant>
- <constant name="HALIGN_CENTER" value="1">
- Horizontal center alignment, usually for text-derived classes.
- </constant>
- <constant name="HALIGN_RIGHT" value="2">
- Horizontal right alignment, usually for text-derived classes.
- </constant>
- <constant name="VALIGN_TOP" value="0">
- Vertical top alignment, usually for text-derived classes.
- </constant>
- <constant name="VALIGN_CENTER" value="1">
- Vertical center alignment, usually for text-derived classes.
- </constant>
- <constant name="VALIGN_BOTTOM" value="2">
- Vertical bottom alignment, usually for text-derived classes.
- </constant>
- <constant name="SPKEY" value="16777216" enum="">
- Scancodes with this bit applied are non printable.
- </constant>
- <constant name="KEY_ESCAPE" value="16777217">
- Escape Key
- </constant>
- <constant name="KEY_TAB" value="16777218">
- Tab Key
- </constant>
- <constant name="KEY_BACKTAB" value="16777219">
- Shift-Tab Key
- </constant>
- <constant name="KEY_BACKSPACE" value="16777220">
- Backspace Key
- </constant>
- <constant name="KEY_ENTER" value="16777221">
- Return Key (On Main Keyboard)
- </constant>
- <constant name="KEY_KP_ENTER" value="16777222">
- Enter Key (On Numpad)
- </constant>
- <constant name="KEY_INSERT" value="16777223">
- Insert Key
- </constant>
- <constant name="KEY_DELETE" value="16777224">
- Delete Key
- </constant>
- <constant name="KEY_PAUSE" value="16777225">
- Pause Key
- </constant>
- <constant name="KEY_PRINT" value="16777226">
- Printscreen Key
- </constant>
- <constant name="KEY_SYSREQ" value="16777227">
- </constant>
- <constant name="KEY_CLEAR" value="16777228">
- </constant>
- <constant name="KEY_HOME" value="16777229">
- Home Key
- </constant>
- <constant name="KEY_END" value="16777230">
- End Key
- </constant>
- <constant name="KEY_LEFT" value="16777231">
- Left Arrow Key
- </constant>
- <constant name="KEY_UP" value="16777232">
- Up Arrow Key
- </constant>
- <constant name="KEY_RIGHT" value="16777233">
- Right Arrow Key
- </constant>
- <constant name="KEY_DOWN" value="16777234">
- Down Arrow Key
- </constant>
- <constant name="KEY_PAGEUP" value="16777235">
- Pageup Key
- </constant>
- <constant name="KEY_PAGEDOWN" value="16777236">
- Pagedown Key
- </constant>
- <constant name="KEY_SHIFT" value="16777237">
- Shift Key
- </constant>
- <constant name="KEY_CONTROL" value="16777238">
- Control Key
- </constant>
- <constant name="KEY_META" value="16777239">
- </constant>
- <constant name="KEY_ALT" value="16777240">
- Alt Key
- </constant>
- <constant name="KEY_CAPSLOCK" value="16777241">
- Capslock Key
- </constant>
- <constant name="KEY_NUMLOCK" value="16777242">
- Numlock Key
- </constant>
- <constant name="KEY_SCROLLLOCK" value="16777243">
- Scrolllock Key
- </constant>
- <constant name="KEY_F1" value="16777244">
- F1 Key
- </constant>
- <constant name="KEY_F2" value="16777245">
- F2 Key
- </constant>
- <constant name="KEY_F3" value="16777246">
- F3 Key
- </constant>
- <constant name="KEY_F4" value="16777247">
- F4 Key
- </constant>
- <constant name="KEY_F5" value="16777248">
- F5 Key
- </constant>
- <constant name="KEY_F6" value="16777249">
- F6 Key
- </constant>
- <constant name="KEY_F7" value="16777250">
- F7 Key
- </constant>
- <constant name="KEY_F8" value="16777251">
- F8 Key
- </constant>
- <constant name="KEY_F9" value="16777252">
- F9 Key
- </constant>
- <constant name="KEY_F10" value="16777253">
- F10 Key
- </constant>
- <constant name="KEY_F11" value="16777254">
- F11 Key
- </constant>
- <constant name="KEY_F12" value="16777255">
- F12 Key
- </constant>
- <constant name="KEY_F13" value="16777256">
- F13 Key
- </constant>
- <constant name="KEY_F14" value="16777257">
- F14 Key
- </constant>
- <constant name="KEY_F15" value="16777258">
- F15 Key
- </constant>
- <constant name="KEY_F16" value="16777259">
- F16 Key
- </constant>
- <constant name="KEY_KP_MULTIPLY" value="16777345">
- Multiply Key on Numpad
- </constant>
- <constant name="KEY_KP_DIVIDE" value="16777346">
- Divide Key on Numpad
- </constant>
- <constant name="KEY_KP_SUBTRACT" value="16777347">
- Subtract Key on Numpad
- </constant>
- <constant name="KEY_KP_PERIOD" value="16777348">
- Period Key on Numpad
- </constant>
- <constant name="KEY_KP_ADD" value="16777349">
- Add Key on Numpad
- </constant>
- <constant name="KEY_KP_0" value="16777350">
- Number 0 on Numpad
- </constant>
- <constant name="KEY_KP_1" value="16777351">
- Number 1 on Numpad
- </constant>
- <constant name="KEY_KP_2" value="16777352">
- Number 2 on Numpad
- </constant>
- <constant name="KEY_KP_3" value="16777353">
- Number 3 on Numpad
- </constant>
- <constant name="KEY_KP_4" value="16777354">
- Number 4 on Numpad
- </constant>
- <constant name="KEY_KP_5" value="16777355">
- Number 5 on Numpad
- </constant>
- <constant name="KEY_KP_6" value="16777356">
- Number 6 on Numpad
- </constant>
- <constant name="KEY_KP_7" value="16777357">
- Number 7 on Numpad
- </constant>
- <constant name="KEY_KP_8" value="16777358">
- Number 8 on Numpad
- </constant>
- <constant name="KEY_KP_9" value="16777359">
- Number 9 on Numpad
- </constant>
- <constant name="KEY_SUPER_L" value="16777260">
- Super Left key (windows key)
- </constant>
- <constant name="KEY_SUPER_R" value="16777261">
- Super Left key (windows key)
- </constant>
- <constant name="KEY_MENU" value="16777262">
- Context menu key
- </constant>
- <constant name="KEY_HYPER_L" value="16777263">
- </constant>
- <constant name="KEY_HYPER_R" value="16777264">
- </constant>
- <constant name="KEY_HELP" value="16777265">
- Help key
- </constant>
- <constant name="KEY_DIRECTION_L" value="16777266">
- </constant>
- <constant name="KEY_DIRECTION_R" value="16777267">
- </constant>
- <constant name="KEY_BACK" value="16777280">
- Back key
- </constant>
- <constant name="KEY_FORWARD" value="16777281">
- Forward key
- </constant>
- <constant name="KEY_STOP" value="16777282">
- Stop key
- </constant>
- <constant name="KEY_REFRESH" value="16777283">
- Refresh key
- </constant>
- <constant name="KEY_VOLUMEDOWN" value="16777284">
- Volume down key
- </constant>
- <constant name="KEY_VOLUMEMUTE" value="16777285">
- Mute volume key
- </constant>
- <constant name="KEY_VOLUMEUP" value="16777286">
- Volume up key
- </constant>
- <constant name="KEY_BASSBOOST" value="16777287">
- </constant>
- <constant name="KEY_BASSUP" value="16777288">
- </constant>
- <constant name="KEY_BASSDOWN" value="16777289">
- </constant>
- <constant name="KEY_TREBLEUP" value="16777290">
- </constant>
- <constant name="KEY_TREBLEDOWN" value="16777291">
- </constant>
- <constant name="KEY_MEDIAPLAY" value="16777292">
- Media play key
- </constant>
- <constant name="KEY_MEDIASTOP" value="16777293">
- Media stop key
- </constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777294">
- Previous song key
- </constant>
- <constant name="KEY_MEDIANEXT" value="16777295">
- Next song key
- </constant>
- <constant name="KEY_MEDIARECORD" value="16777296">
- Media record key
- </constant>
- <constant name="KEY_HOMEPAGE" value="16777297">
- Home page key
- </constant>
- <constant name="KEY_FAVORITES" value="16777298">
- Favorites key
- </constant>
- <constant name="KEY_SEARCH" value="16777299">
- Search key
- </constant>
- <constant name="KEY_STANDBY" value="16777300">
- </constant>
- <constant name="KEY_OPENURL" value="16777301">
- </constant>
- <constant name="KEY_LAUNCHMAIL" value="16777302">
- </constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777303">
- </constant>
- <constant name="KEY_LAUNCH0" value="16777304">
- </constant>
- <constant name="KEY_LAUNCH1" value="16777305">
- </constant>
- <constant name="KEY_LAUNCH2" value="16777306">
- </constant>
- <constant name="KEY_LAUNCH3" value="16777307">
- </constant>
- <constant name="KEY_LAUNCH4" value="16777308">
- </constant>
- <constant name="KEY_LAUNCH5" value="16777309">
- </constant>
- <constant name="KEY_LAUNCH6" value="16777310">
- </constant>
- <constant name="KEY_LAUNCH7" value="16777311">
- </constant>
- <constant name="KEY_LAUNCH8" value="16777312">
- </constant>
- <constant name="KEY_LAUNCH9" value="16777313">
- </constant>
- <constant name="KEY_LAUNCHA" value="16777314">
- </constant>
- <constant name="KEY_LAUNCHB" value="16777315">
- </constant>
- <constant name="KEY_LAUNCHC" value="16777316">
- </constant>
- <constant name="KEY_LAUNCHD" value="16777317">
- </constant>
- <constant name="KEY_LAUNCHE" value="16777318">
- </constant>
- <constant name="KEY_LAUNCHF" value="16777319">
- </constant>
- <constant name="KEY_UNKNOWN" value="33554431">
- </constant>
- <constant name="KEY_SPACE" value="32">
- Space Key
- </constant>
- <constant name="KEY_EXCLAM" value="33">
- ! key
- </constant>
- <constant name="KEY_QUOTEDBL" value="34">
- " key
- </constant>
- <constant name="KEY_NUMBERSIGN" value="35">
- # key
- </constant>
- <constant name="KEY_DOLLAR" value="36">
- $ key
- </constant>
- <constant name="KEY_PERCENT" value="37">
- % key
- </constant>
- <constant name="KEY_AMPERSAND" value="38">
- &amp; key
- </constant>
- <constant name="KEY_APOSTROPHE" value="39">
- ' key
- </constant>
- <constant name="KEY_PARENLEFT" value="40">
- ( key
- </constant>
- <constant name="KEY_PARENRIGHT" value="41">
- ) key
- </constant>
- <constant name="KEY_ASTERISK" value="42">
- * key
- </constant>
- <constant name="KEY_PLUS" value="43">
- + key
- </constant>
- <constant name="KEY_COMMA" value="44">
- , key
- </constant>
- <constant name="KEY_MINUS" value="45">
- - key
- </constant>
- <constant name="KEY_PERIOD" value="46">
- . key
- </constant>
- <constant name="KEY_SLASH" value="47">
- / key
- </constant>
- <constant name="KEY_0" value="48">
- Number 0
- </constant>
- <constant name="KEY_1" value="49">
- Number 1
- </constant>
- <constant name="KEY_2" value="50">
- Number 2
- </constant>
- <constant name="KEY_3" value="51">
- Number 3
- </constant>
- <constant name="KEY_4" value="52">
- Number 4
- </constant>
- <constant name="KEY_5" value="53">
- Number 5
- </constant>
- <constant name="KEY_6" value="54">
- Number 6
- </constant>
- <constant name="KEY_7" value="55">
- Number 7
- </constant>
- <constant name="KEY_8" value="56">
- Number 8
- </constant>
- <constant name="KEY_9" value="57">
- Number 9
- </constant>
- <constant name="KEY_COLON" value="58">
- : key
- </constant>
- <constant name="KEY_SEMICOLON" value="59">
- ; key
- </constant>
- <constant name="KEY_LESS" value="60">
- Lower than key
- </constant>
- <constant name="KEY_EQUAL" value="61">
- = key
- </constant>
- <constant name="KEY_GREATER" value="62">
- Greater than key
- </constant>
- <constant name="KEY_QUESTION" value="63">
- ? key
- </constant>
- <constant name="KEY_AT" value="64">
- @ key
- </constant>
- <constant name="KEY_A" value="65">
- A Key
- </constant>
- <constant name="KEY_B" value="66">
- B Key
- </constant>
- <constant name="KEY_C" value="67">
- C Key
- </constant>
- <constant name="KEY_D" value="68">
- D Key
- </constant>
- <constant name="KEY_E" value="69">
- E Key
- </constant>
- <constant name="KEY_F" value="70">
- F Key
- </constant>
- <constant name="KEY_G" value="71">
- G Key
- </constant>
- <constant name="KEY_H" value="72">
- H Key
- </constant>
- <constant name="KEY_I" value="73">
- I Key
- </constant>
- <constant name="KEY_J" value="74">
- J Key
- </constant>
- <constant name="KEY_K" value="75">
- K Key
- </constant>
- <constant name="KEY_L" value="76">
- L Key
- </constant>
- <constant name="KEY_M" value="77">
- M Key
- </constant>
- <constant name="KEY_N" value="78">
- N Key
- </constant>
- <constant name="KEY_O" value="79">
- O Key
- </constant>
- <constant name="KEY_P" value="80">
- P Key
- </constant>
- <constant name="KEY_Q" value="81">
- Q Key
- </constant>
- <constant name="KEY_R" value="82">
- R Key
- </constant>
- <constant name="KEY_S" value="83">
- S Key
- </constant>
- <constant name="KEY_T" value="84">
- T Key
- </constant>
- <constant name="KEY_U" value="85">
- U Key
- </constant>
- <constant name="KEY_V" value="86">
- V Key
- </constant>
- <constant name="KEY_W" value="87">
- W Key
- </constant>
- <constant name="KEY_X" value="88">
- X Key
- </constant>
- <constant name="KEY_Y" value="89">
- Y Key
- </constant>
- <constant name="KEY_Z" value="90">
- Z Key
- </constant>
- <constant name="KEY_BRACKETLEFT" value="91">
- [ key
- </constant>
- <constant name="KEY_BACKSLASH" value="92">
- \ key
- </constant>
- <constant name="KEY_BRACKETRIGHT" value="93">
- ] key
- </constant>
- <constant name="KEY_ASCIICIRCUM" value="94">
- ^ key
- </constant>
- <constant name="KEY_UNDERSCORE" value="95">
- _ key
- </constant>
- <constant name="KEY_QUOTELEFT" value="96">
- </constant>
- <constant name="KEY_BRACELEFT" value="123">
- { key
- </constant>
- <constant name="KEY_BAR" value="124">
- | key
- </constant>
- <constant name="KEY_BRACERIGHT" value="125">
- } key
- </constant>
- <constant name="KEY_ASCIITILDE" value="126">
- ~ key
- </constant>
- <constant name="KEY_NOBREAKSPACE" value="160">
- </constant>
- <constant name="KEY_EXCLAMDOWN" value="161">
- </constant>
- <constant name="KEY_CENT" value="162">
- ¢ key
- </constant>
- <constant name="KEY_STERLING" value="163">
- </constant>
- <constant name="KEY_CURRENCY" value="164">
- </constant>
- <constant name="KEY_YEN" value="165">
- </constant>
- <constant name="KEY_BROKENBAR" value="166">
- ¦ key
- </constant>
- <constant name="KEY_SECTION" value="167">
- § key
- </constant>
- <constant name="KEY_DIAERESIS" value="168">
- ¨ key
- </constant>
- <constant name="KEY_COPYRIGHT" value="169">
- © key
- </constant>
- <constant name="KEY_ORDFEMININE" value="170">
- </constant>
- <constant name="KEY_GUILLEMOTLEFT" value="171">
- « key
- </constant>
- <constant name="KEY_NOTSIGN" value="172">
- » key
- </constant>
- <constant name="KEY_HYPHEN" value="173">
- ‐ key
- </constant>
- <constant name="KEY_REGISTERED" value="174">
- ® key
- </constant>
- <constant name="KEY_MACRON" value="175">
- </constant>
- <constant name="KEY_DEGREE" value="176">
- ° key
- </constant>
- <constant name="KEY_PLUSMINUS" value="177">
- ± key
- </constant>
- <constant name="KEY_TWOSUPERIOR" value="178">
- ² key
- </constant>
- <constant name="KEY_THREESUPERIOR" value="179">
- ³ key
- </constant>
- <constant name="KEY_ACUTE" value="180">
- ´ key
- </constant>
- <constant name="KEY_MU" value="181">
- µ key
- </constant>
- <constant name="KEY_PARAGRAPH" value="182">
- </constant>
- <constant name="KEY_PERIODCENTERED" value="183">
- · key
- </constant>
- <constant name="KEY_CEDILLA" value="184">
- ¬ key
- </constant>
- <constant name="KEY_ONESUPERIOR" value="185">
- </constant>
- <constant name="KEY_MASCULINE" value="186">
- </constant>
- <constant name="KEY_GUILLEMOTRIGHT" value="187">
- </constant>
- <constant name="KEY_ONEQUARTER" value="188">
- </constant>
- <constant name="KEY_ONEHALF" value="189">
- ½ key
- </constant>
- <constant name="KEY_THREEQUARTERS" value="190">
- </constant>
- <constant name="KEY_QUESTIONDOWN" value="191">
- </constant>
- <constant name="KEY_AGRAVE" value="192">
- </constant>
- <constant name="KEY_AACUTE" value="193">
- </constant>
- <constant name="KEY_ACIRCUMFLEX" value="194">
- </constant>
- <constant name="KEY_ATILDE" value="195">
- </constant>
- <constant name="KEY_ADIAERESIS" value="196">
- </constant>
- <constant name="KEY_ARING" value="197">
- </constant>
- <constant name="KEY_AE" value="198">
- </constant>
- <constant name="KEY_CCEDILLA" value="199">
- </constant>
- <constant name="KEY_EGRAVE" value="200">
- </constant>
- <constant name="KEY_EACUTE" value="201">
- </constant>
- <constant name="KEY_ECIRCUMFLEX" value="202">
- </constant>
- <constant name="KEY_EDIAERESIS" value="203">
- </constant>
- <constant name="KEY_IGRAVE" value="204">
- </constant>
- <constant name="KEY_IACUTE" value="205">
- </constant>
- <constant name="KEY_ICIRCUMFLEX" value="206">
- </constant>
- <constant name="KEY_IDIAERESIS" value="207">
- </constant>
- <constant name="KEY_ETH" value="208">
- </constant>
- <constant name="KEY_NTILDE" value="209">
- </constant>
- <constant name="KEY_OGRAVE" value="210">
- </constant>
- <constant name="KEY_OACUTE" value="211">
- </constant>
- <constant name="KEY_OCIRCUMFLEX" value="212">
- </constant>
- <constant name="KEY_OTILDE" value="213">
- </constant>
- <constant name="KEY_ODIAERESIS" value="214">
- </constant>
- <constant name="KEY_MULTIPLY" value="215">
- </constant>
- <constant name="KEY_OOBLIQUE" value="216">
- </constant>
- <constant name="KEY_UGRAVE" value="217">
- </constant>
- <constant name="KEY_UACUTE" value="218">
- </constant>
- <constant name="KEY_UCIRCUMFLEX" value="219">
- </constant>
- <constant name="KEY_UDIAERESIS" value="220">
- </constant>
- <constant name="KEY_YACUTE" value="221">
- </constant>
- <constant name="KEY_THORN" value="222">
- </constant>
- <constant name="KEY_SSHARP" value="223">
- </constant>
- <constant name="KEY_DIVISION" value="247">
- </constant>
- <constant name="KEY_YDIAERESIS" value="255">
- </constant>
- <constant name="KEY_CODE_MASK" value="33554431">
- </constant>
- <constant name="KEY_MODIFIER_MASK" value="-16777216">
- </constant>
- <constant name="KEY_MASK_SHIFT" value="33554432">
- </constant>
- <constant name="KEY_MASK_ALT" value="67108864">
- </constant>
- <constant name="KEY_MASK_META" value="134217728">
- </constant>
- <constant name="KEY_MASK_CTRL" value="268435456">
- </constant>
- <constant name="KEY_MASK_CMD" value="268435456">
- </constant>
- <constant name="KEY_MASK_KPAD" value="536870912">
- </constant>
- <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824">
- </constant>
- <constant name="BUTTON_LEFT" value="1" enum="">
- Left Mouse Button
- </constant>
- <constant name="BUTTON_RIGHT" value="2" enum="">
- Right Mouse Button
- </constant>
- <constant name="BUTTON_MIDDLE" value="3" enum="">
- Middle Mouse Button
- </constant>
- <constant name="BUTTON_WHEEL_UP" value="4" enum="">
- Mouse wheel up
- </constant>
- <constant name="BUTTON_WHEEL_DOWN" value="5" enum="">
- Mouse wheel down
- </constant>
- <constant name="BUTTON_WHEEL_LEFT" value="6" enum="">
- Mouse wheel left button
- </constant>
- <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="">
- Mouse wheel right button
- </constant>
- <constant name="BUTTON_MASK_LEFT" value="1" enum="">
- </constant>
- <constant name="BUTTON_MASK_RIGHT" value="2" enum="">
- </constant>
- <constant name="BUTTON_MASK_MIDDLE" value="4" enum="">
- </constant>
- <constant name="JOY_BUTTON_0" value="0" enum="">
- Joypad Button 0
- </constant>
- <constant name="JOY_BUTTON_1" value="1" enum="">
- Joypad Button 1
- </constant>
- <constant name="JOY_BUTTON_2" value="2" enum="">
- Joypad Button 2
- </constant>
- <constant name="JOY_BUTTON_3" value="3" enum="">
- Joypad Button 3
- </constant>
- <constant name="JOY_BUTTON_4" value="4" enum="">
- Joypad Button 4
- </constant>
- <constant name="JOY_BUTTON_5" value="5" enum="">
- Joypad Button 5
- </constant>
- <constant name="JOY_BUTTON_6" value="6" enum="">
- Joypad Button 6
- </constant>
- <constant name="JOY_BUTTON_7" value="7" enum="">
- Joypad Button 7
- </constant>
- <constant name="JOY_BUTTON_8" value="8" enum="">
- Joypad Button 8
- </constant>
- <constant name="JOY_BUTTON_9" value="9" enum="">
- Joypad Button 9
- </constant>
- <constant name="JOY_BUTTON_10" value="10" enum="">
- Joypad Button 10
- </constant>
- <constant name="JOY_BUTTON_11" value="11" enum="">
- Joypad Button 11
- </constant>
- <constant name="JOY_BUTTON_12" value="12" enum="">
- Joypad Button 12
- </constant>
- <constant name="JOY_BUTTON_13" value="13" enum="">
- Joypad Button 13
- </constant>
- <constant name="JOY_BUTTON_14" value="14" enum="">
- Joypad Button 14
- </constant>
- <constant name="JOY_BUTTON_15" value="15" enum="">
- Joypad Button 15
- </constant>
- <constant name="JOY_BUTTON_MAX" value="16" enum="">
- Joypad Button 16
- </constant>
- <constant name="JOY_SONY_CIRCLE" value="1" enum="">
- DUALSHOCK circle button
- </constant>
- <constant name="JOY_SONY_X" value="0" enum="">
- DUALSHOCK X button
- </constant>
- <constant name="JOY_SONY_SQUARE" value="2" enum="">
- DUALSHOCK square button
- </constant>
- <constant name="JOY_SONY_TRIANGLE" value="3" enum="">
- DUALSHOCK triangle button
- </constant>
- <constant name="JOY_XBOX_B" value="1" enum="">
- XBOX controller B button
- </constant>
- <constant name="JOY_XBOX_A" value="0" enum="">
- XBOX controller A button
- </constant>
- <constant name="JOY_XBOX_X" value="2" enum="">
- XBOX controller X button
- </constant>
- <constant name="JOY_XBOX_Y" value="3" enum="">
- XBOX controller Y button
- </constant>
- <constant name="JOY_DS_A" value="1" enum="">
- </constant>
- <constant name="JOY_DS_B" value="0" enum="">
- </constant>
- <constant name="JOY_DS_X" value="3" enum="">
- </constant>
- <constant name="JOY_DS_Y" value="2" enum="">
- </constant>
- <constant name="JOY_SELECT" value="10" enum="">
- Joypad Button Select
- </constant>
- <constant name="JOY_START" value="11" enum="">
- Joypad Button Start
- </constant>
- <constant name="JOY_DPAD_UP" value="12" enum="">
- Joypad DPad Up
- </constant>
- <constant name="JOY_DPAD_DOWN" value="13" enum="">
- Joypad DPad Down
- </constant>
- <constant name="JOY_DPAD_LEFT" value="14" enum="">
- Joypad DPad Left
- </constant>
- <constant name="JOY_DPAD_RIGHT" value="15" enum="">
- Joypad DPad Right
- </constant>
- <constant name="JOY_L" value="4" enum="">
- Joypad Left Shoulder Button
- </constant>
- <constant name="JOY_L2" value="6" enum="">
- Joypad Left Trigger
- </constant>
- <constant name="JOY_L3" value="8" enum="">
- Joypad Left Stick Click
- </constant>
- <constant name="JOY_R" value="5" enum="">
- Joypad Right Shoulder Button
- </constant>
- <constant name="JOY_R2" value="7" enum="">
- Joypad Right Trigger
- </constant>
- <constant name="JOY_R3" value="9" enum="">
- Joypad Right Stick Click
- </constant>
- <constant name="JOY_AXIS_0" value="0" enum="">
- Joypad Left Stick Horizontal Axis
- </constant>
- <constant name="JOY_AXIS_1" value="1" enum="">
- Joypad Left Stick Vertical Axis
- </constant>
- <constant name="JOY_AXIS_2" value="2" enum="">
- Joypad Right Stick Horizontal Axis
- </constant>
- <constant name="JOY_AXIS_3" value="3" enum="">
- Joypad Right Stick Vertical Axis
- </constant>
- <constant name="JOY_AXIS_4" value="4" enum="">
- </constant>
- <constant name="JOY_AXIS_5" value="5" enum="">
- </constant>
- <constant name="JOY_AXIS_6" value="6" enum="">
- Joypad Left Trigger Analog Axis
- </constant>
- <constant name="JOY_AXIS_7" value="7" enum="">
- Joypad Right Trigger Analog Axis
- </constant>
- <constant name="JOY_AXIS_MAX" value="8" enum="">
- </constant>
- <constant name="JOY_ANALOG_LX" value="0" enum="">
- Joypad Left Stick Horizontal Axis
- </constant>
- <constant name="JOY_ANALOG_LY" value="1" enum="">
- Joypad Left Stick Vertical Axis
- </constant>
- <constant name="JOY_ANALOG_RX" value="2" enum="">
- Joypad Right Stick Horizontal Axis
- </constant>
- <constant name="JOY_ANALOG_RY" value="3" enum="">
- Joypad Right Stick Vertical Axis
- </constant>
- <constant name="JOY_ANALOG_L2" value="6" enum="">
- </constant>
- <constant name="JOY_ANALOG_R2" value="7" enum="">
- </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.
- </constant>
- <constant name="FAILED" value="1">
- Generic fail return error.
- </constant>
- <constant name="ERR_UNAVAILABLE" value="2">
- </constant>
- <constant name="ERR_UNCONFIGURED" value="3">
- </constant>
- <constant name="ERR_UNAUTHORIZED" value="4">
- </constant>
- <constant name="ERR_PARAMETER_RANGE_ERROR" value="5">
- </constant>
- <constant name="ERR_OUT_OF_MEMORY" value="6">
- </constant>
- <constant name="ERR_FILE_NOT_FOUND" value="7">
- </constant>
- <constant name="ERR_FILE_BAD_DRIVE" value="8">
- </constant>
- <constant name="ERR_FILE_BAD_PATH" value="9">
- </constant>
- <constant name="ERR_FILE_NO_PERMISSION" value="10">
- </constant>
- <constant name="ERR_FILE_ALREADY_IN_USE" value="11">
- </constant>
- <constant name="ERR_FILE_CANT_OPEN" value="12">
- </constant>
- <constant name="ERR_FILE_CANT_WRITE" value="13">
- </constant>
- <constant name="ERR_FILE_CANT_READ" value="14">
- </constant>
- <constant name="ERR_FILE_UNRECOGNIZED" value="15">
- </constant>
- <constant name="ERR_FILE_CORRUPT" value="16">
- </constant>
- <constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17">
- </constant>
- <constant name="ERR_FILE_EOF" value="18">
- </constant>
- <constant name="ERR_CANT_OPEN" value="19">
- </constant>
- <constant name="ERR_CANT_CREATE" value="20">
- </constant>
- <constant name="ERR_PARSE_ERROR" value="43">
- </constant>
- <constant name="ERR_QUERY_FAILED" value="21">
- </constant>
- <constant name="ERR_ALREADY_IN_USE" value="22">
- </constant>
- <constant name="ERR_LOCKED" value="23">
- </constant>
- <constant name="ERR_TIMEOUT" value="24">
- </constant>
- <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28">
- </constant>
- <constant name="ERR_INVALID_DATA" value="30">
- </constant>
- <constant name="ERR_INVALID_PARAMETER" value="31">
- </constant>
- <constant name="ERR_ALREADY_EXISTS" value="32">
- </constant>
- <constant name="ERR_DOES_NOT_EXIST" value="33">
- </constant>
- <constant name="ERR_DATABASE_CANT_READ" value="34">
- </constant>
- <constant name="ERR_DATABASE_CANT_WRITE" value="35">
- </constant>
- <constant name="ERR_COMPILATION_FAILED" value="36">
- </constant>
- <constant name="ERR_METHOD_NOT_FOUND" value="37">
- </constant>
- <constant name="ERR_LINK_FAILED" value="38">
- </constant>
- <constant name="ERR_SCRIPT_FAILED" value="39">
- </constant>
- <constant name="ERR_CYCLIC_LINK" value="40">
- </constant>
- <constant name="ERR_BUSY" value="44">
- </constant>
- <constant name="ERR_HELP" value="46">
- </constant>
- <constant name="ERR_BUG" value="47">
- </constant>
- <constant name="ERR_WTF" value="49">
- </constant>
- <constant name="PROPERTY_HINT_NONE" value="0">
- No hint for edited property.
- </constant>
- <constant name="PROPERTY_HINT_RANGE" value="1">
- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
- </constant>
- <constant name="PROPERTY_HINT_EXP_RANGE" value="2">
- Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
- </constant>
- <constant name="PROPERTY_HINT_ENUM" value="3">
- Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties.
- </constant>
- <constant name="PROPERTY_HINT_EXP_EASING" value="4">
- </constant>
- <constant name="PROPERTY_HINT_LENGTH" value="5">
- </constant>
- <constant name="PROPERTY_HINT_KEY_ACCEL" value="7">
- </constant>
- <constant name="PROPERTY_HINT_FLAGS" value="8">
- Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers.
- </constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="9">
- </constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="10">
- </constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11">
- </constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12">
- </constant>
- <constant name="PROPERTY_HINT_FILE" value="13">
- String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc".
- </constant>
- <constant name="PROPERTY_HINT_DIR" value="14">
- String property is a directory (so pop up a file dialog when edited).
- </constant>
- <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15">
- </constant>
- <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16">
- </constant>
- <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17">
- String property is a resource, so open the resource popup menu when edited.
- </constant>
- <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18">
- </constant>
- <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19">
- </constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20">
- </constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21">
- </constant>
- <constant name="PROPERTY_USAGE_STORAGE" value="1">
- Property will be used as storage (default).
- </constant>
- <constant name="PROPERTY_USAGE_EDITOR" value="2">
- Property will be visible in editor (default).
- </constant>
- <constant name="PROPERTY_USAGE_NETWORK" value="4">
- </constant>
- <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8">
- </constant>
- <constant name="PROPERTY_USAGE_CHECKABLE" value="16">
- </constant>
- <constant name="PROPERTY_USAGE_CHECKED" value="32">
- </constant>
- <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64">
- </constant>
- <constant name="PROPERTY_USAGE_GROUP" value="128">
- </constant>
- <constant name="PROPERTY_USAGE_CATEGORY" value="256">
- </constant>
- <constant name="PROPERTY_USAGE_STORE_IF_NONZERO" value="512">
- </constant>
- <constant name="PROPERTY_USAGE_STORE_IF_NONONE" value="1024">
- </constant>
- <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048">
- </constant>
- <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096">
- </constant>
- <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192">
- </constant>
- <constant name="PROPERTY_USAGE_DEFAULT" value="7">
- Default usage (storage and editor).
- </constant>
- <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71">
- </constant>
- <constant name="PROPERTY_USAGE_NOEDITOR" value="5">
- </constant>
- <constant name="METHOD_FLAG_NORMAL" value="1">
- </constant>
- <constant name="METHOD_FLAG_EDITOR" value="2">
- </constant>
- <constant name="METHOD_FLAG_NOSCRIPT" value="4">
- </constant>
- <constant name="METHOD_FLAG_CONST" value="8">
- </constant>
- <constant name="METHOD_FLAG_REVERSE" value="16">
- </constant>
- <constant name="METHOD_FLAG_VIRTUAL" value="32">
- </constant>
- <constant name="METHOD_FLAG_FROM_SCRIPT" value="64">
- </constant>
- <constant name="METHOD_FLAGS_DEFAULT" value="1">
- </constant>
- <constant name="TYPE_NIL" value="0">
- Variable is of type nil (only applied for null).
- </constant>
- <constant name="TYPE_BOOL" value="1">
- Variable is of type [bool].
- </constant>
- <constant name="TYPE_INT" value="2">
- Variable is of type [int].
- </constant>
- <constant name="TYPE_REAL" value="3">
- Variable is of type [float]/real.
- </constant>
- <constant name="TYPE_STRING" value="4">
- Variable is of type [String].
- </constant>
- <constant name="TYPE_VECTOR2" value="5">
- Variable is of type [Vector2].
- </constant>
- <constant name="TYPE_RECT2" value="6">
- Variable is of type [Rect2].
- </constant>
- <constant name="TYPE_VECTOR3" value="7">
- Variable is of type [Vector3].
- </constant>
- <constant name="TYPE_TRANSFORM2D" value="8">
- Variable is of type [Transform2D].
- </constant>
- <constant name="TYPE_PLANE" value="9">
- Variable is of type [Plane].
- </constant>
- <constant name="TYPE_QUAT" value="10">
- Variable is of type [Quat].
- </constant>
- <constant name="TYPE_RECT3" value="11">
- Variable is of type [Rect3].
- </constant>
- <constant name="TYPE_BASIS" value="12">
- Variable is of type [Basis].
- </constant>
- <constant name="TYPE_TRANSFORM" value="13">
- Variable is of type [Transform].
- </constant>
- <constant name="TYPE_COLOR" value="14">
- Variable is of type [Color].
- </constant>
- <constant name="TYPE_NODE_PATH" value="15">
- Variable is of type [NodePath].
- </constant>
- <constant name="TYPE_RID" value="16">
- Variable is of type [RID].
- </constant>
- <constant name="TYPE_OBJECT" value="17">
- Variable is of type [Object].
- </constant>
- <constant name="TYPE_DICTIONARY" value="18">
- Variable is of type [Dictionary].
- </constant>
- <constant name="TYPE_ARRAY" value="19">
- Variable is of type [Array].
- </constant>
- <constant name="TYPE_RAW_ARRAY" value="20">
- </constant>
- <constant name="TYPE_INT_ARRAY" value="21">
- </constant>
- <constant name="TYPE_REAL_ARRAY" value="22">
- </constant>
- <constant name="TYPE_STRING_ARRAY" value="23">
- </constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="24">
- </constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="25">
- </constant>
- <constant name="TYPE_COLOR_ARRAY" value="26">
- </constant>
- <constant name="TYPE_MAX" value="27">
- </constant>
- </constants>
-</class>
-<class name="@NativeScript" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="@VisualScript" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ARVRAnchor" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_anchor_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_anchor_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_anchor_id">
- <return type="void">
- </return>
- <argument index="0" name="anchor_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ARVRCamera" inherits="Camera" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ARVRController" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_controller_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_controller_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_joystick_axis" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="axis" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_joystick_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_button_pressed" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="button" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_controller_id">
- <return type="void">
- </return>
- <argument index="0" name="controller_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id" brief="">
- </member>
- </members>
- <signals>
- <signal name="button_pressed">
- <argument index="0" name="button" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="button_release">
- <argument index="0" name="button" type="int">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="ARVRInterface" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_recommended_render_targetsize">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="hmd_is_present">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="initialize">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_initialized">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_installed">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_primary">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_is_primary">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="supports_hmd">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="uninitialize">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="primary" type="bool" setter="set_is_primary" getter="is_primary" brief="">
- </member>
- </members>
- <constants>
- <constant name="EYE_MONO" value="0">
- </constant>
- <constant name="EYE_LEFT" value="1">
- </constant>
- <constant name="EYE_RIGHT" value="2">
- </constant>
- </constants>
-</class>
-<class name="ARVROrigin" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_world_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_world_scale">
- <return type="void">
- </return>
- <argument index="0" name="world_scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ARVRPositionalTracker" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_joy_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_orientation" qualifiers="const">
- <return type="Basis">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tracks_orientation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tracks_position" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="adjust_by_reference_frame" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_type" qualifiers="const">
- <return type="int" enum="ARVRServer.TrackerType">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ARVRScriptInterface" inherits="ARVRInterface" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="_get_projection_for_eye" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="commit_for_eye" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="eye" type="int">
- </argument>
- <argument index="1" name="render_target" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_recommended_render_targetsize" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transform_for_eye" qualifiers="virtual">
- <return type="Transform">
- </return>
- <argument index="0" name="eye" type="int">
- </argument>
- <argument index="1" name="cam_transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="hmd_is_present" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="initialize" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_initialized" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_installed" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_stereo" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="process" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="supports_hmd" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="uninitialize" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ARVRServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_interface">
- <return type="void">
- </return>
- <argument index="0" name="arg0" type="ARVRInterface">
- </argument>
- <description>
- </description>
- </method>
- <method name="find_interface" qualifiers="const">
- <return type="ARVRInterface">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_interface" qualifiers="const">
- <return type="ARVRInterface">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_interface_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_reference_frame" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tracker" qualifiers="const">
- <return type="ARVRPositionalTracker">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tracker_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_world_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_interface">
- <return type="void">
- </return>
- <argument index="0" name="arg0" type="ARVRInterface">
- </argument>
- <description>
- </description>
- </method>
- <method name="request_reference_frame">
- <return type="void">
- </return>
- <argument index="0" name="ignore_tilt" type="bool">
- </argument>
- <argument index="1" name="keep_height" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_primary_interface">
- <return type="void">
- </return>
- <argument index="0" name="arg0" type="ARVRInterface">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_world_scale">
- <return type="void">
- </return>
- <argument index="0" name="arg0" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" brief="">
- </member>
- </members>
- <signals>
- <signal name="interface_added">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="interface_removed">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tracker_added">
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tracker_removed">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="TRACKER_CONTROLLER" value="1">
- </constant>
- <constant name="TRACKER_BASESTATION" value="2">
- </constant>
- <constant name="TRACKER_ANCHOR" value="4">
- </constant>
- <constant name="TRACKER_UNKNOWN" value="128">
- </constant>
- <constant name="TRACKER_ANY_KNOWN" value="127">
- </constant>
- <constant name="TRACKER_ANY" value="255">
- </constant>
- </constants>
-</class>
-<class name="AStar" inherits="Reference" category="Core">
- <brief_description>
- AStar class representation that uses vectors as edges.
- </brief_description>
- <description>
- A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points.
- You must add points manually with [method AStar.add_point] and create segments manually with [method AStar.connect_points]. So you can test if there is a path between two points with the [method AStar.are_points_connected] function, get the list of existing ids in the found path with [method AStar.get_id_path], or the points list with [method AStar.get_point_path].
- </description>
- <methods>
- <method name="_compute_cost" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="from_id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_estimate_cost" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="from_id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <argument index="2" name="weight_scale" type="float" default="1.0">
- </argument>
- <description>
- Add a new point at the given position [code]pos[/code] with the given identifier [code]id[/code]. The [code]weight_scale[/code] has to be 1 or larger.
- </description>
- </method>
- <method name="are_points_connected" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- Returns if there is a connection/segment between points [code]id[/code] and [code]from_id[/code]
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all the points and segments from AStar instance.
- </description>
- </method>
- <method name="connect_points">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <argument index="2" name="bidirectional" type="bool" default="true">
- </argument>
- <description>
- Create a segment between points [code]id[/code] and [code]to_id[/code].
- </description>
- </method>
- <method name="disconnect_points">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- Deletes a segment between points [code]id[/code] and [code]to_id[/code].
- </description>
- </method>
- <method name="get_available_point_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_closest_point" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="to_pos" type="Vector3">
- </argument>
- <description>
- Returns the id of closest point of given point. -1 is returned if there are no points on AStar.
- </description>
- </method>
- <method name="get_closest_pos_in_segment" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_pos" type="Vector3">
- </argument>
- <description>
- Returns the position of closest point that has segments.
- </description>
- </method>
- <method name="get_id_path">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="from_id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- Returns an array with the point ids of path found by AStar between two given points.
- </description>
- </method>
- <method name="get_point_path">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="from_id" type="int">
- </argument>
- <argument index="1" name="to_id" type="int">
- </argument>
- <description>
- Returns an array with the points of path found by AStar between two given points.
- </description>
- </method>
- <method name="get_point_pos" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the position of point with given id.
- </description>
- </method>
- <method name="get_point_weight_scale" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns the weight scale of point with given id.
- </description>
- </method>
- <method name="has_point" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Returns if the point with given id exists on AStar;
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Removes the point with given id.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AcceptDialog" inherits="WindowDialog" category="Core">
- <brief_description>
- Base dialog for user notification.
- </brief_description>
- <description>
- This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
- </description>
- <methods>
- <method name="add_button">
- <return type="Button">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <argument index="1" name="right" type="bool" default="false">
- </argument>
- <argument index="2" name="action" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Add custom button to the dialog and return the created button.
- The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed.
- </description>
- </method>
- <method name="add_cancel">
- <return type="Button">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Add custom cancel button to the dialog and return the created button.
- </description>
- </method>
- <method name="get_hide_on_ok" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the dialog will be hidden when accepted (default true).
- </description>
- </method>
- <method name="get_label">
- <return type="Label">
- </return>
- <description>
- Return the label used for built-in text.
- </description>
- </method>
- <method name="get_ok">
- <return type="Button">
- </return>
- <description>
- Return the OK Button.
- </description>
- </method>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the built-in label text.
- </description>
- </method>
- <method name="register_text_enter">
- <return type="void">
- </return>
- <argument index="0" name="line_edit" type="Node">
- </argument>
- <description>
- Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
- </description>
- </method>
- <method name="set_hide_on_ok">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether the dialog is hidden when accepted (default true).
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the built-in label text.
- </description>
- </method>
- </methods>
- <members>
- <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" brief="">
- </member>
- <member name="dialog_text" type="String" setter="set_text" getter="get_text" brief="">
- </member>
- </members>
- <signals>
- <signal name="confirmed">
- <description>
- Emitted when accepted.
- </description>
- </signal>
- <signal name="custom_action">
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Emitted with a custom button is added.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="AnimatedSprite" inherits="Node2D" category="Core">
- <brief_description>
- Sprite node that can use multiple textures for animation.
- </brief_description>
- <description>
- Sprite node that can use multiple textures for animation.
- </description>
- <methods>
- <method name="get_animation" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the current animation set to the node.
- </description>
- </method>
- <method name="get_frame" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the visible frame index.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the offset of the sprite in the node origin.
- </description>
- </method>
- <method name="get_sprite_frames" qualifiers="const">
- <return type="SpriteFrames">
- </return>
- <description>
- Get the [SpriteFrames] resource, which contains all frames.
- </description>
- </method>
- <method name="is_centered" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true when centered. See [method set_centered].
- </description>
- </method>
- <method name="is_flipped_h" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if sprite is flipped horizontally.
- </description>
- </method>
- <method name="is_flipped_v" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if sprite is flipped vertically.
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if an animation if currently being played.
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Play the animation set in parameter. If no parameter is provided, the current animation is played.
- </description>
- </method>
- <method name="set_animation">
- <return type="void">
- </return>
- <argument index="0" name="animation" type="String">
- </argument>
- <description>
- Set the current animation of the node and reinits the frame counter of the animation.
- </description>
- </method>
- <method name="set_centered">
- <return type="void">
- </return>
- <argument index="0" name="centered" type="bool">
- </argument>
- <description>
- When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
- </description>
- </method>
- <method name="set_flip_h">
- <return type="void">
- </return>
- <argument index="0" name="flip_h" type="bool">
- </argument>
- <description>
- If true, sprite is flipped horizontally.
- </description>
- </method>
- <method name="set_flip_v">
- <return type="void">
- </return>
- <argument index="0" name="flip_v" type="bool">
- </argument>
- <description>
- If true, sprite is flipped vertically.
- </description>
- </method>
- <method name="set_frame">
- <return type="void">
- </return>
- <argument index="0" name="frame" type="int">
- </argument>
- <description>
- Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
- </description>
- </method>
- <method name="set_sprite_frames">
- <return type="void">
- </return>
- <argument index="0" name="sprite_frames" type="SpriteFrames">
- </argument>
- <description>
- Set the [SpriteFrames] resource, which contains all frames.
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- Stop the current animation (does not reset the frame counter).
- </description>
- </method>
- </methods>
- <members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" brief="">
- </member>
- <member name="centered" type="bool" setter="set_centered" getter="is_centered" brief="">
- </member>
- <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" brief="">
- </member>
- <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" brief="">
- </member>
- <member name="frame" type="int" setter="set_frame" getter="get_frame" brief="">
- </member>
- <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" brief="">
- </member>
- </members>
- <signals>
- <signal name="animation_finished">
- <description>
- Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn, before looping.
- </description>
- </signal>
- <signal name="frame_changed">
- <description>
- Emitted when frame is changed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_animation" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the current animation set to the node.
- </description>
- </method>
- <method name="get_frame" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the visible frame index.
- </description>
- </method>
- <method name="get_sprite_frames" qualifiers="const">
- <return type="SpriteFrames">
- </return>
- <description>
- Get the [SpriteFrames] resource, which contains all frames.
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if an animation if currently being played.
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Play the animation set in parameter. If no parameter is provided, the current animation is played.
- </description>
- </method>
- <method name="set_animation">
- <return type="void">
- </return>
- <argument index="0" name="animation" type="String">
- </argument>
- <description>
- Set the current animation of the node and reinits the frame counter of the animation.
- </description>
- </method>
- <method name="set_frame">
- <return type="void">
- </return>
- <argument index="0" name="frame" type="int">
- </argument>
- <description>
- Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
- </description>
- </method>
- <method name="set_sprite_frames">
- <return type="void">
- </return>
- <argument index="0" name="sprite_frames" type="SpriteFrames">
- </argument>
- <description>
- Set the [SpriteFrames] resource, which contains all frames.
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- Stop the current animation (does not reset the frame counter).
- </description>
- </method>
- </methods>
- <members>
- <member name="animation" type="String" setter="set_animation" getter="get_animation" brief="">
- </member>
- <member name="frame" type="int" setter="set_frame" getter="get_frame" brief="">
- </member>
- <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames" brief="">
- </member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" brief="">
- </member>
- </members>
- <signals>
- <signal name="frame_changed">
- <description>
- Emitted when frame is changed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Animation" inherits="Resource" category="Core">
- <brief_description>
- Contains data used to animate everything in the engine.
- </brief_description>
- <description>
- An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
- Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
- </description>
- <methods>
- <method name="add_track">
- <return type="int">
- </return>
- <argument index="0" name="type" type="int" enum="Animation.TrackType">
- </argument>
- <argument index="1" name="at_pos" type="int" default="-1">
- </argument>
- <description>
- Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the animation (clear all tracks and reset all).
- </description>
- </method>
- <method name="find_track" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- Return the index of the specified track. If the track is not found, return -1.
- </description>
- </method>
- <method name="get_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the total length of the animation (in seconds).
- </description>
- </method>
- <method name="get_step" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the animation step value.
- </description>
- </method>
- <method name="get_track_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of tracks in the animation.
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the animation has the loop flag set.
- </description>
- </method>
- <method name="method_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <argument index="2" name="delta" type="float">
- </argument>
- <description>
- Return all the key indices of a method track, given a position and delta time.
- </description>
- </method>
- <method name="method_track_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Return the method name of a method track.
- </description>
- </method>
- <method name="method_track_get_params" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Return the arguments values to be called on a method track for a given key in a given track.
- </description>
- </method>
- <method name="remove_track">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove a track by specifying the track index.
- </description>
- </method>
- <method name="set_length">
- <return type="void">
- </return>
- <argument index="0" name="time_sec" type="float">
- </argument>
- <description>
- Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
- </description>
- </method>
- <method name="set_step">
- <return type="void">
- </return>
- <argument index="0" name="size_sec" type="float">
- </argument>
- <description>
- Set the animation step value.
- </description>
- </method>
- <method name="track_find_key" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time" type="float">
- </argument>
- <argument index="2" name="exact" type="bool" default="false">
- </argument>
- <description>
- Find the key index by time in a given track. Optionally, only find it if the exact time is given.
- </description>
- </method>
- <method name="track_get_interpolation_loop_wrap" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_get_interpolation_type" qualifiers="const">
- <return type="int" enum="Animation.InterpolationType">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the interpolation type of a given track, from the INTERPOLATION_* enum.
- </description>
- </method>
- <method name="track_get_key_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the amount of keys in a given track.
- </description>
- </method>
- <method name="track_get_key_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Return the time at which the key is located.
- </description>
- </method>
- <method name="track_get_key_transition" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Return the transition curve (easing) for a specific key (see built-in math function "ease").
- </description>
- </method>
- <method name="track_get_key_value" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Return the value of a given key in a given track.
- </description>
- </method>
- <method name="track_get_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the path of a track. for more information on the path format, see [method track_set_path]
- </description>
- </method>
- <method name="track_get_type" qualifiers="const">
- <return type="int" enum="Animation.TrackType">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the type of a track.
- </description>
- </method>
- <method name="track_insert_key">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time" type="float">
- </argument>
- <argument index="2" name="key" type="Variant">
- </argument>
- <argument index="3" name="transition" type="float" default="1">
- </argument>
- <description>
- Insert a generic key in a given track.
- </description>
- </method>
- <method name="track_is_imported" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return true if the given track is imported. Else, return false.
- </description>
- </method>
- <method name="track_move_down">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Move a track down.
- </description>
- </method>
- <method name="track_move_up">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Move a track up.
- </description>
- </method>
- <method name="track_remove_key">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- Remove a key by index in a given track.
- </description>
- </method>
- <method name="track_remove_key_at_pos">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="float">
- </argument>
- <description>
- Remove a key by position (seconds) in a given track.
- </description>
- </method>
- <method name="track_set_imported">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="imported" type="bool">
- </argument>
- <description>
- Set the given track as imported or not.
- </description>
- </method>
- <method name="track_set_interpolation_loop_wrap">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="interpolation" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_set_interpolation_type">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType">
- </argument>
- <description>
- Set the interpolation type of a given track, from the INTERPOLATION_* enum.
- </description>
- </method>
- <method name="track_set_key_transition">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <argument index="2" name="transition" type="float">
- </argument>
- <description>
- Set the transition curve (easing) for a specific key (see built-in math function "ease").
- </description>
- </method>
- <method name="track_set_key_value">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key" type="int">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Set the value of an existing key.
- </description>
- </method>
- <method name="track_set_path">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <description>
- Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
- </description>
- </method>
- <method name="transform_track_insert_key">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time" type="float">
- </argument>
- <argument index="2" name="loc" type="Vector3">
- </argument>
- <argument index="3" name="rot" type="Quat">
- </argument>
- <argument index="4" name="scale" type="Vector3">
- </argument>
- <description>
- Insert a transform key for a transform track.
- </description>
- </method>
- <method name="transform_track_interpolate" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
- </description>
- </method>
- <method name="value_track_get_key_indices" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <argument index="2" name="delta" type="float">
- </argument>
- <description>
- Return all the key indices of a value track, given a position and delta time.
- </description>
- </method>
- <method name="value_track_get_update_mode" qualifiers="const">
- <return type="int" enum="Animation.UpdateMode">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="value_track_set_update_mode">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="TYPE_VALUE" value="0">
- Value tracks set values in node properties, but only those which can be Interpolated.
- </constant>
- <constant name="TYPE_TRANSFORM" value="1">
- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
- </constant>
- <constant name="TYPE_METHOD" value="2">
- Method tracks call functions with given arguments per key.
- </constant>
- <constant name="INTERPOLATION_NEAREST" value="0">
- No interpolation (nearest value).
- </constant>
- <constant name="INTERPOLATION_LINEAR" value="1">
- Linear interpolation.
- </constant>
- <constant name="INTERPOLATION_CUBIC" value="2">
- Cubic interpolation.
- </constant>
- <constant name="UPDATE_CONTINUOUS" value="0">
- </constant>
- <constant name="UPDATE_DISCRETE" value="1">
- </constant>
- <constant name="UPDATE_TRIGGER" value="2">
- </constant>
- </constants>
-</class>
-<class name="AnimationPlayer" inherits="Node" category="Core">
- <brief_description>
- Container and player of [Animation] resources.
- </brief_description>
- <description>
- An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
- </description>
- <methods>
- <method name="add_animation">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="animation" type="Animation">
- </argument>
- <description>
- Add an animation resource to the player, which will be later referenced by the "name" argument.
- </description>
- </method>
- <method name="advance">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip.
- </description>
- </method>
- <method name="animation_get_next" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="anim_from" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_set_next">
- <return type="void">
- </return>
- <argument index="0" name="anim_from" type="String">
- </argument>
- <argument index="1" name="anim_to" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_caches">
- <return type="void">
- </return>
- <description>
- The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
- </description>
- </method>
- <method name="clear_queue">
- <return type="void">
- </return>
- <description>
- If animations are queued to play, clear them.
- </description>
- </method>
- <method name="find_animation" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="animation" type="Animation">
- </argument>
- <description>
- Find an animation name by resource.
- </description>
- </method>
- <method name="get_animation" qualifiers="const">
- <return type="Animation">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Get an [Animation] resource by requesting a name.
- </description>
- </method>
- <method name="get_animation_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Get the list of names of the animations stored in the player.
- </description>
- </method>
- <method name="get_animation_process_mode" qualifiers="const">
- <return type="int" enum="AnimationPlayer.AnimationProcessMode">
- </return>
- <description>
- Return the mode in which the animation player processes. See [method set_animation_process_mode].
- </description>
- </method>
- <method name="get_autoplay" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the animation that will be automatically played when the scene is loaded.
- </description>
- </method>
- <method name="get_blend_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="anim_from" type="String">
- </argument>
- <argument index="1" name="anim_to" type="String">
- </argument>
- <description>
- Get the blend time between two animations, referenced by their names.
- </description>
- </method>
- <method name="get_current_animation" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the animation being played.
- </description>
- </method>
- <method name="get_current_animation_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the length (in seconds) of the currently being played animation.
- </description>
- </method>
- <method name="get_current_animation_pos" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the position (in seconds) of the currently being played animation.
- </description>
- </method>
- <method name="get_default_blend_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the default blend time between animations.
- </description>
- </method>
- <method name="get_pos" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided).
- </description>
- </method>
- <method name="get_root" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- Return path to root node (see [method set_root]).
- </description>
- </method>
- <method name="get_speed_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
- </description>
- </method>
- <method name="has_animation" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Request whether an [Animation] name exist within the player.
- </description>
- </method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the player is active.
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether an animation is playing.
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
- </argument>
- <argument index="1" name="custom_blend" type="float" default="-1">
- </argument>
- <argument index="2" name="custom_speed" type="float" default="1.0">
- </argument>
- <argument index="3" name="from_end" type="bool" default="false">
- </argument>
- <description>
- Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
- </description>
- </method>
- <method name="play_backwards">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String" default="&quot;&quot;">
- </argument>
- <argument index="1" name="custom_blend" type="float" default="-1">
- </argument>
- <description>
- Play a given animation by the animation name in reverse.
- </description>
- </method>
- <method name="queue">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Queue an animation for playback once the current one is done.
- </description>
- </method>
- <method name="remove_animation">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Remove an animation from the player (by supplying the same name used to add it).
- </description>
- </method>
- <method name="rename_animation">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="newname" type="String">
- </argument>
- <description>
- Rename an existing animation.
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="pos_sec" type="float">
- </argument>
- <argument index="1" name="update" type="bool" default="false">
- </argument>
- <description>
- Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
- </description>
- </method>
- <method name="set_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- Set the player as active (playing). If false, it will do nothing.
- </description>
- </method>
- <method name="set_animation_process_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="AnimationPlayer.AnimationProcessMode">
- </argument>
- <description>
- Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
- </description>
- </method>
- <method name="set_autoplay">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Set the name of the animation that will be automatically played when the scene is loaded.
- </description>
- </method>
- <method name="set_blend_time">
- <return type="void">
- </return>
- <argument index="0" name="anim_from" type="String">
- </argument>
- <argument index="1" name="anim_to" type="String">
- </argument>
- <argument index="2" name="sec" type="float">
- </argument>
- <description>
- Specify a blend time (in seconds) between two animations, referenced by their names.
- </description>
- </method>
- <method name="set_current_animation">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play().
- </description>
- </method>
- <method name="set_default_blend_time">
- <return type="void">
- </return>
- <argument index="0" name="sec" type="float">
- </argument>
- <description>
- Set the default blend time between animations.
- </description>
- </method>
- <method name="set_root">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed.
- </description>
- </method>
- <method name="set_speed_scale">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="float">
- </argument>
- <description>
- Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <argument index="0" name="reset" type="bool" default="true">
- </argument>
- <description>
- Stop the currently playing animation.
- </description>
- </method>
- <method name="stop_all">
- <return type="void">
- </return>
- <description>
- Stop playback of animations (deprecated).
- </description>
- </method>
- </methods>
- <members>
- <member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" brief="">
- </member>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="" enum="AnimationPlayer.AnimationProcessMode">
- </member>
- <member name="root_node" type="NodePath" setter="set_root" getter="get_root" brief="">
- </member>
- </members>
- <signals>
- <signal name="animation_changed">
- <argument index="0" name="old_name" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- If the currently being played animation changes, this signal will notify of such change.
- </description>
- </signal>
- <signal name="animation_finished">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Notifies when an animation finished playing.
- </description>
- </signal>
- <signal name="animation_started">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Notifies when an animation starts playing.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ANIMATION_PROCESS_FIXED" value="0">
- Process animation on fixed process. This is specially useful when animating kinematic bodies.
- </constant>
- <constant name="ANIMATION_PROCESS_IDLE" value="1">
- Process animation on idle process.
- </constant>
- </constants>
-</class>
-<class name="AnimationTreePlayer" inherits="Node" category="Core">
- <brief_description>
- Animation Player that uses a node graph for the blending.
- </brief_description>
- <description>
- Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
- </description>
- <methods>
- <method name="add_node">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
- </argument>
- <argument index="1" name="id" type="String">
- </argument>
- <description>
- Add a node of a given type in the graph with given id.
- </description>
- </method>
- <method name="advance">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_get_animation" qualifiers="const">
- <return type="Animation">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_get_master_animation" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_set_animation">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="animation" type="Animation">
- </argument>
- <description>
- Set the animation for an animation node.
- </description>
- </method>
- <method name="animation_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_set_master_animation">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="source" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="are_nodes_connected" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_id" type="String">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend2_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend2_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend2_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend3_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend3_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend4_node_get_amount" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend4_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="blend" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="connect_nodes">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_id" type="String">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="disconnect_nodes">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_animation_process_mode" qualifiers="const">
- <return type="int" enum="AnimationTreePlayer.AnimationProcessMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_master_player" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_list">
- <return type="PoolStringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="mix_node_get_amount" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="mix_node_set_amount">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_exists" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="node" type="String">
- </argument>
- <description>
- Check if a node exists (by name).
- </description>
- </method>
- <method name="node_get_input_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Return the input count for a given node. Different types of nodes have different amount of inputs.
- </description>
- </method>
- <method name="node_get_input_source" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <description>
- Return the input source for a given node input.
- </description>
- </method>
- <method name="node_get_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_get_type" qualifiers="const">
- <return type="int" enum="AnimationTreePlayer.NodeType">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- Get the node type, will return from NODE_* enum.
- </description>
- </method>
- <method name="node_rename">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="node" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- Rename a node in the graph.
- </description>
- </method>
- <method name="node_set_pos">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="screen_pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_delay" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_fadein_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_fadeout_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_has_autorestart" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_delay">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="delay_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_random_delay">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="rand_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_fadein_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_fadeout_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_filter_path">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_start">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_stop">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="recompute_caches">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_node">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="reset">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_active">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_animation_process_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="AnimationTreePlayer.AnimationProcessMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_master_player">
- <return type="void">
- </return>
- <argument index="0" name="nodepath" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="timescale_node_get_scale" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="timescale_node_set_scale">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="timeseek_node_seek">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="pos_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_delete_input">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_current" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_input_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_xfade_time" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_has_input_auto_advance" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_current">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_input_auto_advance">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_input_count">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="count" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_xfade_time">
- <return type="void">
- </return>
- <argument index="0" name="id" type="String">
- </argument>
- <argument index="1" name="time_sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="" enum="AnimationTreePlayer.AnimationProcessMode">
- </member>
- </members>
- <constants>
- <constant name="NODE_OUTPUT" value="0">
- </constant>
- <constant name="NODE_ANIMATION" value="1">
- </constant>
- <constant name="NODE_ONESHOT" value="2">
- </constant>
- <constant name="NODE_MIX" value="3">
- </constant>
- <constant name="NODE_BLEND2" value="4">
- </constant>
- <constant name="NODE_BLEND3" value="5">
- </constant>
- <constant name="NODE_BLEND4" value="6">
- </constant>
- <constant name="NODE_TIMESCALE" value="7">
- </constant>
- <constant name="NODE_TIMESEEK" value="8">
- </constant>
- <constant name="NODE_TRANSITION" value="9">
- </constant>
- </constants>
-</class>
-<class name="Area" inherits="CollisionObject" category="Core">
- <brief_description>
- General purpose area detection and influence for 3D physics.
- </brief_description>
- <description>
- General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
- </description>
- <methods>
- <method name="get_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the angular damp rate.
- </description>
- </method>
- <method name="get_audio_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layer this area is in.
- </description>
- </method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the layer mask.
- </description>
- </method>
- <method name="get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the collision mask.
- </description>
- </method>
- <method name="get_gravity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the gravity intensity.
- </description>
- </method>
- <method name="get_gravity_distance_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the falloff factor for point gravity.
- </description>
- </method>
- <method name="get_gravity_vector" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
- </description>
- </method>
- <method name="get_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the linear damp rate.
- </description>
- </method>
- <method name="get_overlapping_areas" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the areas that are totally or partially inside this area.
- </description>
- </method>
- <method name="get_overlapping_bodies" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area.
- </description>
- </method>
- <method name="get_priority" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the processing order of this area.
- </description>
- </method>
- <method name="get_reverb_amount" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_reverb_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_reverb_uniformity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_space_override_mode" qualifiers="const">
- <return type="int" enum="Area.SpaceOverride">
- </return>
- <description>
- Return the space override mode.
- </description>
- </method>
- <method name="is_gravity_a_point" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
- </description>
- </method>
- <method name="is_monitorable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this area can be detected by other, monitoring, areas.
- </description>
- </method>
- <method name="is_monitoring" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this area detects bodies/areas entering/exiting it.
- </description>
- </method>
- <method name="is_overriding_audio_bus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_using_reverb_bus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="overlaps_area" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="area" type="Node">
- </argument>
- <description>
- Return whether the area passed is totally or partially inside this area.
- </description>
- </method>
- <method name="overlaps_body" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- Return whether the body passed is totally or partially inside this area.
- </description>
- </method>
- <method name="set_angular_damp">
- <return type="void">
- </return>
- <argument index="0" name="angular_damp" type="float">
- </argument>
- <description>
- Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
- </description>
- </method>
- <method name="set_audio_bus">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_audio_bus_override">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="collision_layer" type="int">
- </argument>
- <description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
- </description>
- </method>
- <method name="set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="collision_mask" type="int">
- </argument>
- <description>
- Set the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
- </description>
- </method>
- <method name="set_gravity">
- <return type="void">
- </return>
- <argument index="0" name="gravity" type="float">
- </argument>
- <description>
- Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
- This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
- </description>
- </method>
- <method name="set_gravity_distance_scale">
- <return type="void">
- </return>
- <argument index="0" name="distance_scale" type="float">
- </argument>
- <description>
- Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
- </description>
- </method>
- <method name="set_gravity_is_point">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
- </description>
- </method>
- <method name="set_gravity_vector">
- <return type="void">
- </return>
- <argument index="0" name="vector" type="Vector3">
- </argument>
- <description>
- Set the gravity vector. This vector does not have to be normalized.
- If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
- </description>
- </method>
- <method name="set_linear_damp">
- <return type="void">
- </return>
- <argument index="0" name="linear_damp" type="float">
- </argument>
- <description>
- Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
- </description>
- </method>
- <method name="set_monitorable">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
- </description>
- </method>
- <method name="set_monitoring">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether this area can detect bodies/areas entering/exiting it.
- </description>
- </method>
- <method name="set_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="float">
- </argument>
- <description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
- Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
- </description>
- </method>
- <method name="set_reverb_amount">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_reverb_bus">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_reverb_uniformity">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_space_override_mode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="int" enum="Area.SpaceOverride">
- </argument>
- <description>
- Set the space override mode. This mode controls how an area affects gravity and damp.
- AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
- </description>
- </method>
- <method name="set_use_reverb_bus">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
- </member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="">
- </member>
- <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="">
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
- </member>
- <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="">
- </member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="">
- </member>
- <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="">
- </member>
- <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" brief="">
- </member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
- </member>
- <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="">
- </member>
- <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="">
- </member>
- <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="">
- </member>
- <member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" brief="">
- </member>
- <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" brief="">
- </member>
- <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" brief="">
- </member>
- <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" brief="">
- </member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area.SpaceOverride">
- </member>
- </members>
- <signals>
- <signal name="area_entered">
- <argument index="0" name="area" type="Object">
- </argument>
- <description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
- </description>
- </signal>
- <signal name="area_exited">
- <argument index="0" name="area" type="Object">
- </argument>
- <description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
- </description>
- </signal>
- <signal name="area_shape_entered">
- <argument index="0" name="area_id" type="int">
- </argument>
- <argument index="1" name="area" type="Object">
- </argument>
- <argument index="2" name="area_shape" type="int">
- </argument>
- <argument index="3" name="self_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="area_shape_exited">
- <argument index="0" name="area_id" type="int">
- </argument>
- <argument index="1" name="area" type="Object">
- </argument>
- <argument index="2" name="area_shape" type="int">
- </argument>
- <argument index="3" name="self_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="body_entered">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
- </description>
- </signal>
- <signal name="body_exited">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
- </description>
- </signal>
- <signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="area_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="area_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Area2D" inherits="CollisionObject2D" category="Core">
- <brief_description>
- General purpose area detection and influence for 2D physics.
- </brief_description>
- <description>
- General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
- </description>
- <methods>
- <method name="get_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the angular damp rate.
- </description>
- </method>
- <method name="get_audio_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layer this area is in.
- </description>
- </method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the layer mask.
- </description>
- </method>
- <method name="get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the collision mask.
- </description>
- </method>
- <method name="get_gravity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the gravity intensity.
- </description>
- </method>
- <method name="get_gravity_distance_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the falloff factor for point gravity.
- </description>
- </method>
- <method name="get_gravity_vector" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
- </description>
- </method>
- <method name="get_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the linear damp rate.
- </description>
- </method>
- <method name="get_overlapping_areas" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the areas that are totally or partially inside this area.
- </description>
- </method>
- <method name="get_overlapping_bodies" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area.
- </description>
- </method>
- <method name="get_priority" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the processing order of this area.
- </description>
- </method>
- <method name="get_space_override_mode" qualifiers="const">
- <return type="int" enum="Area2D.SpaceOverride">
- </return>
- <description>
- Return the space override mode.
- </description>
- </method>
- <method name="is_gravity_a_point" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
- </description>
- </method>
- <method name="is_monitorable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this area can be detected by other, monitoring, areas.
- </description>
- </method>
- <method name="is_monitoring" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this area detects bodies/areas entering/exiting it.
- </description>
- </method>
- <method name="is_overriding_audio_bus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="overlaps_area" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="area" type="Node">
- </argument>
- <description>
- Return whether the area passed is totally or partially inside this area.
- </description>
- </method>
- <method name="overlaps_body" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- Return whether the body passed is totally or partially inside this area.
- </description>
- </method>
- <method name="set_angular_damp">
- <return type="void">
- </return>
- <argument index="0" name="angular_damp" type="float">
- </argument>
- <description>
- Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
- </description>
- </method>
- <method name="set_audio_bus">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_audio_bus_override">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="collision_layer" type="int">
- </argument>
- <description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
- </description>
- </method>
- <method name="set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="collision_mask" type="int">
- </argument>
- <description>
- Set the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
- </description>
- </method>
- <method name="set_gravity">
- <return type="void">
- </return>
- <argument index="0" name="gravity" type="float">
- </argument>
- <description>
- Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
- This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
- </description>
- </method>
- <method name="set_gravity_distance_scale">
- <return type="void">
- </return>
- <argument index="0" name="distance_scale" type="float">
- </argument>
- <description>
- Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
- </description>
- </method>
- <method name="set_gravity_is_point">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
- </description>
- </method>
- <method name="set_gravity_vector">
- <return type="void">
- </return>
- <argument index="0" name="vector" type="Vector2">
- </argument>
- <description>
- Set the gravity vector. This vector does not have to be normalized.
- If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
- </description>
- </method>
- <method name="set_linear_damp">
- <return type="void">
- </return>
- <argument index="0" name="linear_damp" type="float">
- </argument>
- <description>
- Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
- In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
- </description>
- </method>
- <method name="set_monitorable">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
- </description>
- </method>
- <method name="set_monitoring">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether this area can detect bodies/areas entering/exiting it.
- </description>
- </method>
- <method name="set_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="float">
- </argument>
- <description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
- Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
- </description>
- </method>
- <method name="set_space_override_mode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="int" enum="Area2D.SpaceOverride">
- </argument>
- <description>
- Set the space override mode. This mode controls how an area affects gravity and damp.
- AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
- </member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="">
- </member>
- <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="">
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
- </member>
- <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="">
- </member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="">
- </member>
- <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="">
- </member>
- <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief="">
- </member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
- </member>
- <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="">
- </member>
- <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="">
- </member>
- <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="">
- </member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area2D.SpaceOverride">
- </member>
- </members>
- <signals>
- <signal name="area_entered">
- <argument index="0" name="area" type="Object">
- </argument>
- <description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
- </description>
- </signal>
- <signal name="area_exited">
- <argument index="0" name="area" type="Object">
- </argument>
- <description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
- </description>
- </signal>
- <signal name="area_shape_entered">
- <argument index="0" name="area_id" type="int">
- </argument>
- <argument index="1" name="area" type="Object">
- </argument>
- <argument index="2" name="area_shape" type="int">
- </argument>
- <argument index="3" name="self_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="area_shape_exited">
- <argument index="0" name="area_id" type="int">
- </argument>
- <argument index="1" name="area" type="Object">
- </argument>
- <argument index="2" name="area_shape" type="int">
- </argument>
- <argument index="3" name="self_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="body_entered">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
- </description>
- </signal>
- <signal name="body_exited">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
- </description>
- </signal>
- <signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="area_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
- </description>
- </signal>
- <signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="area_shape" type="int">
- </argument>
- <description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Array" category="Built-In Types">
- <brief_description>
- Generic array datatype.
- </brief_description>
- <description>
- Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference.
- </description>
- <methods>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolColorArray">
- </argument>
- <description>
- Construct an array from a [PoolColorArray].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolVector3Array">
- </argument>
- <description>
- Construct an array from a [PoolVector3Array].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolVector2Array">
- </argument>
- <description>
- Construct an array from a [PoolVector2Array].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolStringArray">
- </argument>
- <description>
- Construct an array from a [PoolStringArray].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolRealArray">
- </argument>
- <description>
- Construct an array from a [PoolRealArray].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolIntArray">
- </argument>
- <description>
- Construct an array from a [PoolIntArray].
- </description>
- </method>
- <method name="Array">
- <return type="Array">
- </return>
- <argument index="0" name="from" type="PoolByteArray">
- </argument>
- <description>
- Construct an array from a [PoolByteArray].
- </description>
- </method>
- <method name="append">
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="back">
- <description>
- Returns the last element of the array if the array is not empty (size&gt;0).
- </description>
- </method>
- <method name="clear">
- <description>
- Clear the array (resize to 0).
- </description>
- </method>
- <method name="count">
- <return type="int">
- </return>
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Return the amount of times an element is in the array.
- </description>
- </method>
- <method name="empty">
- <return type="bool">
- </return>
- <description>
- Return true if the array is empty (size==0).
- </description>
- </method>
- <method name="erase">
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Remove the first occurrence of a value from the array.
- </description>
- </method>
- <method name="find">
- <return type="int">
- </return>
- <argument index="0" name="what" type="var">
- </argument>
- <argument index="1" name="from" type="int" default="0">
- </argument>
- <description>
- Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.
- </description>
- </method>
- <method name="find_last">
- <return type="int">
- </return>
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Searches the array in reverse order for a value and returns its index or -1 if not found.
- </description>
- </method>
- <method name="front">
- <description>
- Returns the first element of the array if the array is not empty (size&gt;0).
- </description>
- </method>
- <method name="has">
- <return type="bool">
- </return>
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Return true if the array contains given value.
- [codeblock]
- [ "inside", 7 ].has("inside") == true
- [ "inside", 7 ].has("outside") == false
- [ "inside", 7 ].has(7) == true
- [ "inside", 7 ].has("7") == false
- [/codeblock]
- </description>
- </method>
- <method name="hash">
- <return type="int">
- </return>
- <description>
- Return a hashed integer value representing the array contents.
- </description>
- </method>
- <method name="insert">
- <argument index="0" name="pos" type="int">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="pop_back">
- <description>
- Remove the last element of the array.
- </description>
- </method>
- <method name="pop_front">
- <description>
- Remove the first element of the array.
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Append an element at the end of the array.
- </description>
- </method>
- <method name="push_front">
- <argument index="0" name="value" type="var">
- </argument>
- <description>
- Add an element at the beginning of the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
- </description>
- </method>
- <method name="rfind">
- <return type="int">
- </return>
- <argument index="0" name="what" type="var">
- </argument>
- <argument index="1" name="from" type="int" default="-1">
- </argument>
- <description>
- Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the amount of elements in the array.
- </description>
- </method>
- <method name="sort">
- <description>
- Sort the array using natural order.
- </description>
- </method>
- <method name="sort_custom">
- <argument index="0" name="obj" type="Object">
- </argument>
- <argument index="1" name="func" type="String">
- </argument>
- <description>
- Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ArrayMesh" inherits="Mesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_blend_shape">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_surface_from_arrays">
- <return type="void">
- </return>
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
- </argument>
- <argument index="1" name="arrays" type="Array">
- </argument>
- <argument index="2" name="blend_shapes" type="Array" default="[ ]">
- </argument>
- <argument index="3" name="compress_flags" type="int" default="97792">
- </argument>
- <description>
- Create a new surface ([method get_surface_count] that will become surf_idx for this.
- Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
- </description>
- </method>
- <method name="center_geometry">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="clear_blend_shapes">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_blend_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_blend_shape_mode" qualifiers="const">
- <return type="int" enum="Mesh.BlendShapeMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_blend_shape_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_custom_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_surface_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of surfaces that the [ArrayMesh] holds.
- </description>
- </method>
- <method name="regen_normalmaps">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_blend_shape_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_aabb">
- <return type="void">
- </return>
- <argument index="0" name="aabb" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- <method name="surface_get_array_index_len" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the length in indices of the index array in the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_array_len" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_format" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the format mask of the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_material" qualifiers="const">
- <return type="Material">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return a [Material] in a given surface. Surface is rendered using this material.
- </description>
- </method>
- <method name="surface_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="surface_get_primitive_type" qualifiers="const">
- <return type="int" enum="Mesh.PrimitiveType">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the primitive type of the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_remove">
- <return type="void">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
- </description>
- </method>
- <method name="surface_set_material">
- <return type="void">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <argument index="1" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- <method name="surface_set_name">
- <return type="void">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Set a [Material] for a given surface. Surface will be rendered using this material.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NO_INDEX_ARRAY" value="-1" enum="">
- Default value used for index_array_len when no indices are present.
- </constant>
- <constant name="ARRAY_WEIGHTS_SIZE" value="4" enum="">
- Amount of weights/bone indices per vertex (always 4).
- </constant>
- <constant name="ARRAY_VERTEX" value="0">
- Vertex array (array of [Vector3] vertices).
- </constant>
- <constant name="ARRAY_NORMAL" value="1">
- Normal array (array of [Vector3] normals).
- </constant>
- <constant name="ARRAY_TANGENT" value="2">
- Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
- </constant>
- <constant name="ARRAY_COLOR" value="3">
- Vertex array (array of [Color] colors).
- </constant>
- <constant name="ARRAY_TEX_UV" value="4">
- UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
- </constant>
- <constant name="ARRAY_TEX_UV2" value="5">
- Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
- </constant>
- <constant name="ARRAY_BONES" value="6">
- Array of bone indices, as a float array. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_WEIGHTS" value="7">
- Array of bone weights, as a float array. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_INDEX" value="8">
- Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
- </constant>
- <constant name="ARRAY_MAX" value="9">
- </constant>
- <constant name="ARRAY_FORMAT_VERTEX" value="1">
- Array format will include vertices (mandatory).
- </constant>
- <constant name="ARRAY_FORMAT_NORMAL" value="2">
- Array format will include normals
- </constant>
- <constant name="ARRAY_FORMAT_TANGENT" value="4">
- Array format will include tangents
- </constant>
- <constant name="ARRAY_FORMAT_COLOR" value="8">
- Array format will include a color array.
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV" value="16">
- Array format will include UVs.
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
- Array format will include another set of UVs.
- </constant>
- <constant name="ARRAY_FORMAT_BONES" value="64">
- Array format will include bone indices.
- </constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
- Array format will include bone weights.
- </constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256">
- Index array will be used.
- </constant>
- </constants>
-</class>
-<class name="AtlasTexture" inherits="Texture" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_atlas" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_margin" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_atlas">
- <return type="void">
- </return>
- <argument index="0" name="atlas" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region">
- <return type="void">
- </return>
- <argument index="0" name="region" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas" brief="">
- </member>
- <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" brief="">
- </member>
- <member name="region" type="Rect2" setter="set_region" getter="get_region" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioBusLayout" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffect" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_volume_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_volume_db">
- <return type="void">
- </return>
- <argument index="0" name="volume" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectChorus" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_dry" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_voice_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_voice_cutoff_hz" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_voice_delay_ms" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_voice_depth_ms" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_voice_level_db" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_voice_pan" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_voice_rate_hz" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_wet" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_dry">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_count">
- <return type="void">
- </return>
- <argument index="0" name="voices" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_cutoff_hz">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="cutoff_hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_delay_ms">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="delay_ms" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_depth_ms">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="depth_ms" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_level_db">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="level_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_pan">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="pan" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_voice_rate_hz">
- <return type="void">
- </return>
- <argument index="0" name="voice_idx" type="int">
- </argument>
- <argument index="1" name="rate_hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_wet">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="dry" type="float" setter="set_dry" getter="get_dry" brief="">
- </member>
- <member name="voice/1/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" brief="">
- </member>
- <member name="voice/1/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" brief="">
- </member>
- <member name="voice/1/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" brief="">
- </member>
- <member name="voice/1/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" brief="">
- </member>
- <member name="voice/1/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" brief="">
- </member>
- <member name="voice/1/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" brief="">
- </member>
- <member name="voice/2/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" brief="">
- </member>
- <member name="voice/2/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" brief="">
- </member>
- <member name="voice/2/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" brief="">
- </member>
- <member name="voice/2/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" brief="">
- </member>
- <member name="voice/2/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" brief="">
- </member>
- <member name="voice/2/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" brief="">
- </member>
- <member name="voice/3/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" brief="">
- </member>
- <member name="voice/3/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" brief="">
- </member>
- <member name="voice/3/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" brief="">
- </member>
- <member name="voice/3/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" brief="">
- </member>
- <member name="voice/3/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" brief="">
- </member>
- <member name="voice/3/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" brief="">
- </member>
- <member name="voice/4/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" brief="">
- </member>
- <member name="voice/4/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" brief="">
- </member>
- <member name="voice/4/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" brief="">
- </member>
- <member name="voice/4/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" brief="">
- </member>
- <member name="voice/4/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" brief="">
- </member>
- <member name="voice/4/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" brief="">
- </member>
- <member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count" brief="">
- </member>
- <member name="wet" type="float" setter="set_wet" getter="get_wet" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_attack_us" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gain" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mix" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_release_ms" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sidechain" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_threshold" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_attack_us">
- <return type="void">
- </return>
- <argument index="0" name="attack_us" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gain">
- <return type="void">
- </return>
- <argument index="0" name="gain" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mix">
- <return type="void">
- </return>
- <argument index="0" name="mix" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_release_ms">
- <return type="void">
- </return>
- <argument index="0" name="release_ms" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sidechain">
- <return type="void">
- </return>
- <argument index="0" name="sidechain" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_threshold">
- <return type="void">
- </return>
- <argument index="0" name="threshold" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" brief="">
- </member>
- <member name="gain" type="float" setter="set_gain" getter="get_gain" brief="">
- </member>
- <member name="mix" type="float" setter="set_mix" getter="get_mix" brief="">
- </member>
- <member name="ratio" type="float" setter="set_ratio" getter="get_ratio" brief="">
- </member>
- <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" brief="">
- </member>
- <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" brief="">
- </member>
- <member name="threshold" type="float" setter="set_threshold" getter="get_threshold" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectDelay" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_dry">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_feedback_delay_ms" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_feedback_level_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_feedback_lowpass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap1_delay_ms" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap1_level_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap1_pan" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap2_delay_ms" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap2_level_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tap2_pan" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_feedback_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_tap1_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_tap2_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_dry">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feedback_active">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feedback_delay_ms">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feedback_level_db">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feedback_lowpass">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap1_active">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap1_delay_ms">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap1_level_db">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap1_pan">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap2_active">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap2_delay_ms">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap2_level_db">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tap2_pan">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="dry" type="float" setter="set_dry" getter="get_dry" brief="">
- </member>
- <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active" brief="">
- </member>
- <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" brief="">
- </member>
- <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" brief="">
- </member>
- <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" brief="">
- </member>
- <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active" brief="">
- </member>
- <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" brief="">
- </member>
- <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" brief="">
- </member>
- <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" brief="">
- </member>
- <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active" brief="">
- </member>
- <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" brief="">
- </member>
- <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" brief="">
- </member>
- <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_drive" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_keep_hf_hz" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="AudioEffectDistortion.Mode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_post_gain" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pre_gain" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_drive">
- <return type="void">
- </return>
- <argument index="0" name="drive" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_keep_hf_hz">
- <return type="void">
- </return>
- <argument index="0" name="keep_hf_hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="AudioEffectDistortion.Mode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_post_gain">
- <return type="void">
- </return>
- <argument index="0" name="post_gain" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pre_gain">
- <return type="void">
- </return>
- <argument index="0" name="pre_gain" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="drive" type="float" setter="set_drive" getter="get_drive" brief="">
- </member>
- <member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="AudioEffectDistortion.Mode">
- </member>
- <member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain" brief="">
- </member>
- <member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectEQ" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_band_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_band_gain_db" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="band_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_band_gain_db">
- <return type="void">
- </return>
- <argument index="0" name="band_idx" type="int">
- </argument>
- <argument index="1" name="volume_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectFilter" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_cutoff" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_db" qualifiers="const">
- <return type="int" enum="AudioEffectFilter.FilterDB">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gain" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_resonance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_cutoff">
- <return type="void">
- </return>
- <argument index="0" name="freq" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_db">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int" enum="AudioEffectFilter.FilterDB">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gain">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_resonance">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" brief="">
- </member>
- <member name="dB" type="int" setter="set_db" getter="get_db" brief="" enum="AudioEffectFilter.FilterDB">
- </member>
- <member name="gain" type="float" setter="set_gain" getter="get_gain" brief="">
- </member>
- <member name="resonance" type="float" setter="set_resonance" getter="get_resonance" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_ceiling_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_soft_clip_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_soft_clip_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_threshold_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_ceiling_db">
- <return type="void">
- </return>
- <argument index="0" name="ceiling" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_soft_clip_db">
- <return type="void">
- </return>
- <argument index="0" name="soft_clip" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_soft_clip_ratio">
- <return type="void">
- </return>
- <argument index="0" name="soft_clip" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_threshold_db">
- <return type="void">
- </return>
- <argument index="0" name="threshold" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" brief="">
- </member>
- <member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db" brief="">
- </member>
- <member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio" brief="">
- </member>
- <member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectPanner" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_pan" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_pan">
- <return type="void">
- </return>
- <argument index="0" name="cpanume" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="pan" type="float" setter="set_pan" getter="get_pan" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_depth" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_feedback" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_range_max_hz" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_range_min_hz" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rate_hz" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_depth">
- <return type="void">
- </return>
- <argument index="0" name="depth" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feedback">
- <return type="void">
- </return>
- <argument index="0" name="fbk" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range_max_hz">
- <return type="void">
- </return>
- <argument index="0" name="hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range_min_hz">
- <return type="void">
- </return>
- <argument index="0" name="hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rate_hz">
- <return type="void">
- </return>
- <argument index="0" name="hz" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="depth" type="float" setter="set_depth" getter="get_depth" brief="">
- </member>
- <member name="feedback" type="float" setter="set_feedback" getter="get_feedback" brief="">
- </member>
- <member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz" brief="">
- </member>
- <member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz" brief="">
- </member>
- <member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_pitch_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_pitch_scale">
- <return type="void">
- </return>
- <argument index="0" name="rate" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectReverb" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_damping" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dry" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_hpf" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_predelay_feedback" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_predelay_msec" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_room_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_spread" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_wet" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_damping">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dry">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hpf">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_predelay_feedback">
- <return type="void">
- </return>
- <argument index="0" name="feedback" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_predelay_msec">
- <return type="void">
- </return>
- <argument index="0" name="msec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_room_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_spread">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_wet">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="damping" type="float" setter="set_damping" getter="get_damping" brief="">
- </member>
- <member name="dry" type="float" setter="set_dry" getter="get_dry" brief="">
- </member>
- <member name="hipass" type="float" setter="set_hpf" getter="get_hpf" brief="">
- </member>
- <member name="predelay_feedback" type="float" setter="set_predelay_msec" getter="get_predelay_msec" brief="">
- </member>
- <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec" brief="">
- </member>
- <member name="room_size" type="float" setter="set_room_size" getter="get_room_size" brief="">
- </member>
- <member name="spread" type="float" setter="set_spread" getter="get_spread" brief="">
- </member>
- <member name="wet" type="float" setter="set_wet" getter="get_wet" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_pan_pullout" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_surround" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_time_pullout" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_pan_pullout">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_surround">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_time_pullout">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" brief="">
- </member>
- <member name="surround" type="float" setter="set_surround" getter="get_surround" brief="">
- </member>
- <member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioServer" inherits="Object" category="Core">
- <brief_description>
- Server interface for low level audio access.
- </brief_description>
- <description>
- AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
- </description>
- <methods>
- <method name="add_bus">
- <return type="void">
- </return>
- <argument index="0" name="at_pos" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_bus_effect">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect" type="AudioEffect">
- </argument>
- <argument index="2" name="at_pos" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="generate_bus_layout" qualifiers="const">
- <return type="AudioBusLayout">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bus_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bus_effect">
- <return type="AudioEffect">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_effect_count">
- <return type="int">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="bus_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_peak_volume_left_db" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="channel" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_peak_volume_right_db" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="channel" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_send" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bus_volume_db" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_mix_rate" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_speaker_mode" qualifiers="const">
- <return type="int" enum="AudioServer.SpeakerMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_bus_bypassing_effects" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_bus_effect_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_bus_mute" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_bus_solo" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="lock">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="move_bus">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="to_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_bus">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_bus_effect">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_bypass_effects">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_count">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_effect_enabled">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect_idx" type="int">
- </argument>
- <argument index="2" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_layout">
- <return type="void">
- </return>
- <argument index="0" name="bus_layout" type="AudioBusLayout">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_mute">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_name">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_send">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="send" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_solo">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus_volume_db">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="volume_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="swap_bus_effects">
- <return type="void">
- </return>
- <argument index="0" name="bus_idx" type="int">
- </argument>
- <argument index="1" name="effect_idx" type="int">
- </argument>
- <argument index="2" name="by_effect_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="unlock">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="bus_layout_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="AudioStream" inherits="Resource" category="Core">
- <brief_description>
- Base class for audio streams.
- </brief_description>
- <description>
- Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core">
- <brief_description>
- OGG Vorbis audio stream driver.
- </brief_description>
- <description>
- OGG Vorbis audio stream driver.
- </description>
- <methods>
- <method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_data">
- <return type="void">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop_offset">
- <return type="void">
- </return>
- <argument index="0" name="seconds" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" brief="">
- </member>
- <member name="loop" type="bool" setter="set_loop" getter="has_loop" brief="">
- </member>
- <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamPlayback" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamPlayer" inherits="Node" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mix_target" qualifiers="const">
- <return type="int" enum="AudioStreamPlayer.MixTarget">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream" qualifiers="const">
- <return type="AudioStream">
- </return>
- <description>
- </description>
- </method>
- <method name="get_volume_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_autoplay_enabled">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="from_pos" type="float" default="0.0">
- </argument>
- <description>
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="to_pos" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_autoplay">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus">
- <return type="void">
- </return>
- <argument index="0" name="bus" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mix_target">
- <return type="void">
- </return>
- <argument index="0" name="mix_target" type="int" enum="AudioStreamPlayer.MixTarget">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stream">
- <return type="void">
- </return>
- <argument index="0" name="stream" type="AudioStream">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_volume_db">
- <return type="void">
- </return>
- <argument index="0" name="volume_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" brief="">
- </member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" brief="">
- </member>
- <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" brief="" enum="AudioStreamPlayer.MixTarget">
- </member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_active" brief="">
- </member>
- <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" brief="">
- </member>
- <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
- </member>
- </members>
- <signals>
- <signal name="finished">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_area_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_attenuation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream" qualifiers="const">
- <return type="AudioStream">
- </return>
- <description>
- </description>
- </method>
- <method name="get_volume_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_autoplay_enabled">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="from_pos" type="float" default="0.0">
- </argument>
- <description>
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="to_pos" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_area_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_attenuation">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_autoplay">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus">
- <return type="void">
- </return>
- <argument index="0" name="bus" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_distance">
- <return type="void">
- </return>
- <argument index="0" name="pixels" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stream">
- <return type="void">
- </return>
- <argument index="0" name="stream" type="AudioStream">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_volume_db">
- <return type="void">
- </return>
- <argument index="0" name="volume_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" brief="">
- </member>
- <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" brief="">
- </member>
- <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" brief="">
- </member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" brief="">
- </member>
- <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" brief="">
- </member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_active" brief="">
- </member>
- <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" brief="">
- </member>
- <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
- </member>
- </members>
- <signals>
- <signal name="finished">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_area_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_attenuation_filter_cutoff_hz" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_attenuation_filter_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_attenuation_model" qualifiers="const">
- <return type="int" enum="AudioStreamPlayer3D.AttenuationModel">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bus" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_doppler_tracking" qualifiers="const">
- <return type="int" enum="AudioStreamPlayer3D.DopplerTracking">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_angle" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_angle_filter_attenuation_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_out_of_range_mode" qualifiers="const">
- <return type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream" qualifiers="const">
- <return type="AudioStream">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unit_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unit_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_autoplay_enabled">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_emission_angle_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <argument index="0" name="from_pos" type="float" default="0.0">
- </argument>
- <description>
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="to_pos" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_area_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_attenuation_filter_cutoff_hz">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_attenuation_filter_db">
- <return type="void">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_attenuation_model">
- <return type="void">
- </return>
- <argument index="0" name="model" type="int" enum="AudioStreamPlayer3D.AttenuationModel">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_autoplay">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bus">
- <return type="void">
- </return>
- <argument index="0" name="bus" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_doppler_tracking">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.DopplerTracking">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_angle">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_angle_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_angle_filter_attenuation_db">
- <return type="void">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_db">
- <return type="void">
- </return>
- <argument index="0" name="max_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_distance">
- <return type="void">
- </return>
- <argument index="0" name="metres" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_out_of_range_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stream">
- <return type="void">
- </return>
- <argument index="0" name="stream" type="AudioStream">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_unit_db">
- <return type="void">
- </return>
- <argument index="0" name="unit_db" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_unit_size">
- <return type="void">
- </return>
- <argument index="0" name="unit_size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" brief="">
- </member>
- <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz" brief="">
- </member>
- <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db" brief="">
- </member>
- <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" brief="" enum="AudioStreamPlayer3D.AttenuationModel">
- </member>
- <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" brief="">
- </member>
- <member name="bus" type="String" setter="set_bus" getter="get_bus" brief="">
- </member>
- <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" brief="" enum="AudioStreamPlayer3D.DopplerTracking">
- </member>
- <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle" brief="">
- </member>
- <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled" brief="">
- </member>
- <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db" brief="">
- </member>
- <member name="max_db" type="float" setter="set_max_db" getter="get_max_db" brief="">
- </member>
- <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" brief="">
- </member>
- <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" brief="" enum="AudioStreamPlayer3D.OutOfRangeMode">
- </member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_active" brief="">
- </member>
- <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" brief="">
- </member>
- <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" brief="">
- </member>
- <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" brief="">
- </member>
- </members>
- <signals>
- <signal name="finished">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
- </constant>
- <constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1">
- </constant>
- <constant name="ATTENUATION_LOGARITHMIC" value="2">
- </constant>
- <constant name="OUT_OF_RANGE_MIX" value="0">
- </constant>
- <constant name="OUT_OF_RANGE_PAUSE" value="1">
- </constant>
- <constant name="DOPPLER_TRACKING_DISABLED" value="0">
- </constant>
- <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
- </constant>
- <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
- </constant>
- </constants>
-</class>
-<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_audio_stream" qualifiers="const">
- <return type="AudioStream">
- </return>
- <description>
- </description>
- </method>
- <method name="get_random_pitch" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_audio_stream">
- <return type="void">
- </return>
- <argument index="0" name="stream" type="AudioStream">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_random_pitch">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream" brief="">
- </member>
- <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="AudioStreamSample" inherits="AudioStream" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_format" qualifiers="const">
- <return type="int" enum="AudioStreamSample.Format">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_begin" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_end" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_mode" qualifiers="const">
- <return type="int" enum="AudioStreamSample.LoopMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mix_rate" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_stereo" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_data">
- <return type="void">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_format">
- <return type="void">
- </return>
- <argument index="0" name="format" type="int" enum="AudioStreamSample.Format">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop_begin">
- <return type="void">
- </return>
- <argument index="0" name="loop_begin" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop_end">
- <return type="void">
- </return>
- <argument index="0" name="loop_end" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop_mode">
- <return type="void">
- </return>
- <argument index="0" name="loop_mode" type="int" enum="AudioStreamSample.LoopMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mix_rate">
- <return type="void">
- </return>
- <argument index="0" name="mix_rate" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stereo">
- <return type="void">
- </return>
- <argument index="0" name="stereo" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" brief="">
- </member>
- <member name="format" type="int" setter="set_format" getter="get_format" brief="" enum="AudioStreamSample.Format">
- </member>
- <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" brief="">
- </member>
- <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" brief="">
- </member>
- <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" brief="" enum="AudioStreamSample.LoopMode">
- </member>
- <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" brief="">
- </member>
- <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="BackBufferCopy" inherits="Node2D" category="Core">
- <brief_description>
- Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
- </brief_description>
- <description>
- Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction.
- </description>
- <methods>
- <method name="get_copy_mode" qualifiers="const">
- <return type="int" enum="BackBufferCopy.CopyMode">
- </return>
- <description>
- Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
- </description>
- </method>
- <method name="get_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return the area covered by the BackBufferCopy.
- </description>
- </method>
- <method name="set_copy_mode">
- <return type="void">
- </return>
- <argument index="0" name="copy_mode" type="int" enum="BackBufferCopy.CopyMode">
- </argument>
- <description>
- Set the copy mode of the BackBufferCopy (refer to constants section).
- </description>
- </method>
- <method name="set_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- Defines the area covered by the BackBufferCopy.
- </description>
- </method>
- </methods>
- <members>
- <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" brief="" enum="BackBufferCopy.CopyMode">
- </member>
- <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" brief="">
- </member>
- </members>
- <constants>
- <constant name="COPY_MODE_DISABLED" value="0">
- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
- </constant>
- <constant name="COPY_MODE_RECT" value="1">
- Sets the copy mode to a region.
- </constant>
- <constant name="COPY_MODE_VIEWPORT" value="2">
- Sets the copy mode to the entire screen.
- </constant>
- </constants>
-</class>
-<class name="BaseButton" inherits="Control" category="Core">
- <brief_description>
- Provides a 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.
- </description>
- <methods>
- <method name="_pressed" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Called when button is pressed.
- </description>
- </method>
- <method name="_toggled" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- Called when button is toggled (only if toggle_mode is active).
- </description>
- </method>
- <method name="get_action_mode" qualifiers="const">
- <return type="int" enum="BaseButton.ActionMode">
- </return>
- <description>
- Return the current mode of action (see [method set_action_mode]) (one of the ACTION_MODE_* constants).
- </description>
- </method>
- <method name="get_button_group" qualifiers="const">
- <return type="ButtonGroup">
- </return>
- <description>
- </description>
- </method>
- <method name="get_draw_mode" qualifiers="const">
- <return type="int" enum="BaseButton.DrawMode">
- </return>
- <description>
- Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
- </description>
- </method>
- <method name="get_enabled_focus_mode" qualifiers="const">
- <return type="int" enum="Control.FocusMode">
- </return>
- <description>
- Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
- </description>
- </method>
- <method name="get_shortcut" qualifiers="const">
- <return type="ShortCut">
- </return>
- <description>
- </description>
- </method>
- <method name="is_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the button is in disabled state (see [method set_disabled]).
- </description>
- </method>
- <method name="is_hovered" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if mouse entered the button before it exit.
- </description>
- </method>
- <method name="is_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down.
- </description>
- </method>
- <method name="is_toggle_mode" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the toggle_mode property (see [method set_toggle_mode]).
- </description>
- </method>
- <method name="set_action_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="BaseButton.ActionMode">
- </argument>
- <description>
- Set the current mode of action, determining when the button is considered clicked (see the ACTION_MODE_* constants).
- </description>
- </method>
- <method name="set_button_group">
- <return type="void">
- </return>
- <argument index="0" name="button_group" type="ButtonGroup">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="disabled" type="bool">
- </argument>
- <description>
- Set the button into disabled state. When a button is disabled, it can't be clicked or toggled.
- </description>
- </method>
- <method name="set_enabled_focus_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Control.FocusMode">
- </argument>
- <description>
- Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- Set the button to pressed state (only if toggle_mode is active).
- </description>
- </method>
- <method name="set_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="shortcut" type="ShortCut">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_toggle_mode">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
- </description>
- </method>
- </methods>
- <members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="" enum="BaseButton.ActionMode">
- </member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
- </member>
- <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" brief="" enum="Control.FocusMode">
- </member>
- <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group" brief="">
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- </member>
- <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut" brief="">
- </member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" brief="">
- </member>
- </members>
- <signals>
- <signal name="button_down">
- <description>
- Emitted when the button starts being held down.
- </description>
- </signal>
- <signal name="button_up">
- <description>
- Emitted when the button stops being held down.
- </description>
- </signal>
- <signal name="pressed">
- <description>
- This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise).
- </description>
- </signal>
- <signal name="toggled">
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="DRAW_NORMAL" value="0">
- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
- </constant>
- <constant name="DRAW_PRESSED" value="1">
- The state of buttons are pressed.
- </constant>
- <constant name="DRAW_HOVER" value="2">
- The state of buttons are hovered.
- </constant>
- <constant name="DRAW_DISABLED" value="3">
- The state of buttons are disabled.
- </constant>
- <constant name="ACTION_MODE_BUTTON_PRESS" value="0">
- Require just a press to consider the button clicked.
- </constant>
- <constant name="ACTION_MODE_BUTTON_RELEASE" value="1">
- Require a press and a subsequent release before considering the button clicked.
- </constant>
- </constants>
-</class>
-<class name="Basis" category="Built-In Types">
- <brief_description>
- 3x3 matrix datatype.
- </brief_description>
- <description>
- 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized. Almost always used as orthogonal basis for a [Transform].
- For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
- </description>
- <methods>
- <method name="Basis">
- <return type="Basis">
- </return>
- <argument index="0" name="from" type="Quat">
- </argument>
- <description>
- Create a rotation matrix from the given quaternion.
- </description>
- </method>
- <method name="Basis">
- <return type="Basis">
- </return>
- <argument index="0" name="euler" type="Vector3">
- </argument>
- <description>
- Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle).
- </description>
- </method>
- <method name="Basis">
- <return type="Basis">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="phi" type="float">
- </argument>
- <description>
- Create a rotation matrix which rotates around the given axis by the specified angle. The axis must be a normalized vector.
- </description>
- </method>
- <method name="Basis">
- <return type="Basis">
- </return>
- <argument index="0" name="x_axis" type="Vector3">
- </argument>
- <argument index="1" name="y_axis" type="Vector3">
- </argument>
- <argument index="2" name="z_axis" type="Vector3">
- </argument>
- <description>
- Create a matrix from 3 axis vectors.
- </description>
- </method>
- <method name="determinant">
- <return type="float">
- </return>
- <description>
- Return the determinant of the matrix.
- </description>
- </method>
- <method name="get_euler">
- <return type="Vector3">
- </return>
- <description>
- Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle).
- </description>
- </method>
- <method name="get_orthogonal_index">
- <return type="int">
- </return>
- <description>
- This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code.
- </description>
- </method>
- <method name="get_scale">
- <return type="Vector3">
- </return>
- <description>
- Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
- </description>
- </method>
- <method name="inverse">
- <return type="Basis">
- </return>
- <description>
- Return the inverse of the matrix.
- </description>
- </method>
- <method name="orthonormalized">
- <return type="Basis">
- </return>
- <description>
- Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
- </description>
- </method>
- <method name="rotated">
- <return type="Basis">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="phi" type="float">
- </argument>
- <description>
- Introduce an additional rotation around the given axis by phi (radians). Only relevant when the matrix is being used as a part of [Transform]. The axis must be a normalized vector.
- </description>
- </method>
- <method name="scaled">
- <return type="Basis">
- </return>
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform].
- </description>
- </method>
- <method name="tdotx">
- <return type="float">
- </return>
- <argument index="0" name="with" type="Vector3">
- </argument>
- <description>
- Transposed dot product with the x axis of the matrix.
- </description>
- </method>
- <method name="tdoty">
- <return type="float">
- </return>
- <argument index="0" name="with" type="Vector3">
- </argument>
- <description>
- Transposed dot product with the y axis of the matrix.
- </description>
- </method>
- <method name="tdotz">
- <return type="float">
- </return>
- <argument index="0" name="with" type="Vector3">
- </argument>
- <description>
- Transposed dot product with the z axis of the matrix.
- </description>
- </method>
- <method name="transposed">
- <return type="Basis">
- </return>
- <description>
- Return the transposed version of the matrix.
- </description>
- </method>
- <method name="xform">
- <return type="Vector3">
- </return>
- <argument index="0" name="v" type="Vector3">
- </argument>
- <description>
- Return a vector transformed (multiplied) by the matrix.
- </description>
- </method>
- <method name="xform_inv">
- <return type="Vector3">
- </return>
- <argument index="0" name="v" type="Vector3">
- </argument>
- <description>
- Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection.
- </description>
- </method>
- </methods>
- <members>
- <member name="x" type="Vector3" setter="" getter="" brief="">
- </member>
- <member name="y" type="Vector3" setter="" getter="" brief="">
- </member>
- <member name="z" type="Vector3" setter="" getter="" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="BitMap" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_from_image_alpha">
- <return type="void">
- </return>
- <argument index="0" name="image" type="Image">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_true_bit_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bit">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="bit" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bit_rect">
- <return type="void">
- </return>
- <argument index="0" name="p_rect" type="Rect2">
- </argument>
- <argument index="1" name="bit" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="BitmapFont" inherits="Font" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_char">
- <return type="void">
- </return>
- <argument index="0" name="character" type="int">
- </argument>
- <argument index="1" name="texture" type="int">
- </argument>
- <argument index="2" name="rect" type="Rect2">
- </argument>
- <argument index="3" name="align" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="4" name="advance" type="float" default="-1">
- </argument>
- <description>
- Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance.
- </description>
- </method>
- <method name="add_kerning_pair">
- <return type="void">
- </return>
- <argument index="0" name="char_a" type="int">
- </argument>
- <argument index="1" name="char_b" type="int">
- </argument>
- <argument index="2" name="kerning" type="int">
- </argument>
- <description>
- Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
- </description>
- </method>
- <method name="add_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- Add a texture to the [BitmapFont].
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all the font data.
- </description>
- </method>
- <method name="create_from_fnt">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_char_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="char" type="int">
- </argument>
- <argument index="1" name="next" type="int" default="0">
- </argument>
- <description>
- Return the size of a character, optionally taking kerning into account if the next character is provided.
- </description>
- </method>
- <method name="get_fallback" qualifiers="const">
- <return type="BitmapFont">
- </return>
- <description>
- </description>
- </method>
- <method name="get_kerning_pair" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="char_a" type="int">
- </argument>
- <argument index="1" name="char_b" type="int">
- </argument>
- <description>
- Return a kerning pair as a difference.
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_ascent">
- <return type="void">
- </return>
- <argument index="0" name="px" type="float">
- </argument>
- <description>
- Set the font ascent (number of pixels above the baseline).
- </description>
- </method>
- <method name="set_distance_field_hint">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fallback">
- <return type="void">
- </return>
- <argument index="0" name="fallback" type="BitmapFont">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="px" type="float">
- </argument>
- <description>
- Set the total font height (ascent plus descent) in pixels.
- </description>
- </method>
- </methods>
- <members>
- <member name="ascent" type="float" setter="set_ascent" getter="get_ascent" brief="">
- </member>
- <member name="chars" type="PoolIntArray" setter="_set_chars" getter="_get_chars" brief="">
- </member>
- <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint" brief="">
- </member>
- <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback" brief="">
- </member>
- <member name="height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="kernings" type="PoolIntArray" setter="_set_kernings" getter="_get_kernings" brief="">
- </member>
- <member name="textures" type="Array" setter="_set_textures" getter="_get_textures" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="BoneAttachment" inherits="Spatial" category="Core">
- <brief_description>
- A node that will attach to a bone.
- </brief_description>
- <description>
- This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
- </description>
- <methods>
- <method name="get_bone_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bone_name">
- <return type="void">
- </return>
- <argument index="0" name="bone_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BoxContainer" inherits="Container" category="Core">
- <brief_description>
- Base class for Box containers.
- </brief_description>
- <description>
- Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
- </description>
- <methods>
- <method name="add_spacer">
- <return type="void">
- </return>
- <argument index="0" name="begin" type="bool">
- </argument>
- <description>
- Add a control to the box as a spacer.
- If [i]begin[/i] is true the spacer control will be inserted in front of other children.
- </description>
- </method>
- <method name="get_alignment" qualifiers="const">
- <return type="int" enum="BoxContainer.AlignMode">
- </return>
- <description>
- Return the alignment of children in the container.
- </description>
- </method>
- <method name="set_alignment">
- <return type="void">
- </return>
- <argument index="0" name="alignment" type="int" enum="BoxContainer.AlignMode">
- </argument>
- <description>
- Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).
- </description>
- </method>
- </methods>
- <members>
- <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" brief="" enum="BoxContainer.AlignMode">
- </member>
- </members>
- <constants>
- <constant name="ALIGN_BEGIN" value="0">
- Align children with beginning of the container.
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- Align children with center of the container.
- </constant>
- <constant name="ALIGN_END" value="2">
- Align children with end of the container.
- </constant>
- </constants>
-</class>
-<class name="BoxShape" inherits="Shape" category="Core">
- <brief_description>
- Box shape resource.
- </brief_description>
- <description>
- Box shape resource, which can be set into a [PhysicsBody] or area.
- </description>
- <methods>
- <method name="get_extents" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the half extents of the shape.
- </description>
- </method>
- <method name="set_extents">
- <return type="void">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- Set the half extents for the shape.
- </description>
- </method>
- </methods>
- <members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Button" inherits="BaseButton" category="Core">
- <brief_description>
- Standard themed Button.
- </brief_description>
- <description>
- Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
- </description>
- <methods>
- <method name="get_button_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- Return the button icon.
- </description>
- </method>
- <method name="get_clip_text" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the state of the [i]clip_text[/i] property (see [method set_clip_text])
- </description>
- </method>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the button text.
- </description>
- </method>
- <method name="get_text_align" qualifiers="const">
- <return type="int" enum="Button.TextAlign">
- </return>
- <description>
- Return the text alignment policy.
- </description>
- </method>
- <method name="is_flat" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the state of the [i]flat[/i] property (see [method set_flat]).
- </description>
- </method>
- <method name="set_button_icon">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- Set the icon that will be displayed next to the text inside the button area.
- </description>
- </method>
- <method name="set_clip_text">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
- </description>
- </method>
- <method name="set_flat">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed.
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the button text, which will be displayed inside the button area.
- </description>
- </method>
- <method name="set_text_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="Button.TextAlign">
- </argument>
- <description>
- Set the text alignment policy, using one of the ALIGN_* constants.
- </description>
- </method>
- </methods>
- <members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign">
- </member>
- <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief="">
- </member>
- <member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="">
- </member>
- <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" brief="">
- </member>
- <member name="text" type="String" setter="set_text" getter="get_text" brief="">
- </member>
- </members>
- <constants>
- <constant name="ALIGN_LEFT" value="0">
- Align the text to the left.
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- Center the text.
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- Align the text to the right.
- </constant>
- </constants>
- <theme_items>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="ButtonGroup" inherits="Resource" category="Core">
- <brief_description>
- Group of Buttons.
- </brief_description>
- <description>
- Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed.
- </description>
- <methods>
- <method name="get_pressed_button">
- <return type="BaseButton">
- </return>
- <description>
- Return the pressed button.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="Camera" inherits="Spatial" category="Core">
- <brief_description>
- Camera node, displays from a point of view.
- </brief_description>
- <description>
- Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
- </description>
- <methods>
- <method name="clear_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_camera_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
- </description>
- </method>
- <method name="get_cull_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_doppler_tracking" qualifiers="const">
- <return type="int" enum="Camera.DopplerTracking">
- </return>
- <description>
- </description>
- </method>
- <method name="get_environment" qualifiers="const">
- <return type="Environment">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fov" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_keep_aspect_mode" qualifiers="const">
- <return type="int" enum="Camera.KeepAspect">
- </return>
- <description>
- </description>
- </method>
- <method name="get_projection" qualifiers="const">
- <return type="int" enum="Camera.Projection">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_zfar" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_znear" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_current" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
- </description>
- </method>
- <method name="is_position_behind" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="world_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_current">
- <return type="void">
- </return>
- <description>
- Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
- </description>
- </method>
- <method name="project_local_ray_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="project_position" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="project_ray_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
- </description>
- </method>
- <method name="project_ray_origin" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
- </description>
- </method>
- <method name="set_cull_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_doppler_tracking">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_environment">
- <return type="void">
- </return>
- <argument index="0" name="env" type="Environment">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_keep_aspect_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_orthogonal">
- <return type="void">
- </return>
- <argument index="0" name="size" type="float">
- </argument>
- <argument index="1" name="z_near" type="float">
- </argument>
- <argument index="2" name="z_far" type="float">
- </argument>
- <description>
- Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
- </description>
- </method>
- <method name="set_perspective">
- <return type="void">
- </return>
- <argument index="0" name="fov" type="float">
- </argument>
- <argument index="1" name="z_near" type="float">
- </argument>
- <argument index="2" name="z_far" type="float">
- </argument>
- <description>
- Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="unproject_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="world_point" type="Vector3">
- </argument>
- <description>
- Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PROJECTION_PERSPECTIVE" value="0">
- Perspective Projection (object's size on the screen becomes smaller when far away).
- </constant>
- <constant name="PROJECTION_ORTHOGONAL" value="1">
- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
- </constant>
- <constant name="KEEP_WIDTH" value="0">
- </constant>
- <constant name="KEEP_HEIGHT" value="1">
- </constant>
- <constant name="DOPPLER_TRACKING_DISABLED" value="0">
- </constant>
- <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
- </constant>
- <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
- </constant>
- </constants>
-</class>
-<class name="Camera2D" inherits="Node2D" category="Core">
- <brief_description>
- Camera node for 2D scenes.
- </brief_description>
- <description>
- Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes.
- This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
- </description>
- <methods>
- <method name="align">
- <return type="void">
- </return>
- <description>
- Align the camera to the tracked node
- </description>
- </method>
- <method name="clear_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="force_update_scroll">
- <return type="void">
- </return>
- <description>
- Force the camera to update scroll immediately.
- </description>
- </method>
- <method name="get_anchor_mode" qualifiers="const">
- <return type="int" enum="Camera2D.AnchorMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_camera_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the camera position.
- </description>
- </method>
- <method name="get_camera_screen_center" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_custom_viewport" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_drag_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the margins needed to drag the camera (see [method set_drag_margin]).
- </description>
- </method>
- <method name="get_follow_smoothing" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_limit" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the scrolling limit in pixels.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the scroll offset.
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_zoom" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="is_current" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true of this is the current camera (see [method make_current]).
- </description>
- </method>
- <method name="is_follow_smoothing_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_h_drag_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_limit_drawing_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_limit_smoothing_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_margin_drawing_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_rotating" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_screen_drawing_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_v_drag_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="make_current">
- <return type="void">
- </return>
- <description>
- Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
- </description>
- </method>
- <method name="reset_smoothing">
- <return type="void">
- </return>
- <description>
- Set the camera's position immediately to its current smoothing destination.
- This has no effect if smoothing is disabled.
- </description>
- </method>
- <method name="set_anchor_mode">
- <return type="void">
- </return>
- <argument index="0" name="anchor_mode" type="int" enum="Camera2D.AnchorMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_viewport">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_drag_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="drag_margin" type="float">
- </argument>
- <description>
- Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges.
- </description>
- </method>
- <method name="set_enable_follow_smoothing">
- <return type="void">
- </return>
- <argument index="0" name="follow_smoothing" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_follow_smoothing">
- <return type="void">
- </return>
- <argument index="0" name="follow_smoothing" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_drag_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_limit">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="limit" type="int">
- </argument>
- <description>
- Set the scrolling limit in pixels.
- </description>
- </method>
- <method name="set_limit_drawing_enabled">
- <return type="void">
- </return>
- <argument index="0" name="limit_drawing_enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_limit_smoothing_enabled">
- <return type="void">
- </return>
- <argument index="0" name="limit_smoothing_enabled" type="bool">
- </argument>
- <description>
- Smooth camera when reaching camera limits.
- This requires camera smoothing being enabled to have a noticeable effect.
- </description>
- </method>
- <method name="set_margin_drawing_enabled">
- <return type="void">
- </return>
- <argument index="0" name="margin_drawing_enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the scroll offset. Useful for looking around or camera shake animations.
- </description>
- </method>
- <method name="set_rotating">
- <return type="void">
- </return>
- <argument index="0" name="rotating" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_screen_drawing_enabled">
- <return type="void">
- </return>
- <argument index="0" name="screen_drawing_enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_drag_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_zoom">
- <return type="void">
- </return>
- <argument index="0" name="zoom" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" brief="" enum="Camera2D.AnchorMode">
- </member>
- <member name="current" type="bool" setter="_set_current" getter="is_current" brief="">
- </member>
- <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin" brief="">
- </member>
- <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" brief="">
- </member>
- <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin" brief="">
- </member>
- <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin" brief="">
- </member>
- <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin" brief="">
- </member>
- <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled" brief="">
- </member>
- <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" brief="">
- </member>
- <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled" brief="">
- </member>
- <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled" brief="">
- </member>
- <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" brief="">
- </member>
- <member name="limit_left" type="int" setter="set_limit" getter="get_limit" brief="">
- </member>
- <member name="limit_right" type="int" setter="set_limit" getter="get_limit" brief="">
- </member>
- <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" brief="">
- </member>
- <member name="limit_top" type="int" setter="set_limit" getter="get_limit" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" brief="">
- </member>
- <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" brief="">
- </member>
- <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" brief="">
- </member>
- <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" brief="">
- </member>
- </members>
- <constants>
- <constant name="ANCHOR_MODE_DRAG_CENTER" value="1">
- </constant>
- <constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0">
- </constant>
- </constants>
-</class>
-<class name="CanvasItem" inherits="Node" category="Core">
- <brief_description>
- Base class of anything 2D.
- </brief_description>
- <description>
- Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related.
- Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though.
- Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though).
- Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode.
- Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
- </description>
- <methods>
- <method name="_draw" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Called (if exists) to draw the canvas item.
- </description>
- </method>
- <method name="draw_char">
- <return type="float">
- </return>
- <argument index="0" name="font" type="Font">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="char" type="String">
- </argument>
- <argument index="3" name="next" type="String">
- </argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <description>
- Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
- </description>
- </method>
- <method name="draw_circle">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="radius" type="float">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <description>
- Draw a colored circle.
- </description>
- </method>
- <method name="draw_colored_polygon">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="3" name="texture" type="Texture" default="null">
- </argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
- </argument>
- <argument index="5" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Draw a colored polygon of any amount of points, convex or concave.
- </description>
- </method>
- <method name="draw_line">
- <return type="void">
- </return>
- <argument index="0" name="from" type="Vector2">
- </argument>
- <argument index="1" name="to" type="Vector2">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <argument index="3" name="width" type="float" default="1.0">
- </argument>
- <argument index="4" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Draw a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
- </description>
- </method>
- <method name="draw_polygon">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="colors" type="PoolColorArray">
- </argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="3" name="texture" type="Texture" default="null">
- </argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
- </argument>
- <argument index="5" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- Draw a polygon of any amount of points, convex or concave.
- </description>
- </method>
- <method name="draw_polyline">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="width" type="float" default="1.0">
- </argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_polyline_colors">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="colors" type="PoolColorArray">
- </argument>
- <argument index="2" name="width" type="float" default="1.0">
- </argument>
- <argument index="3" name="antialiased" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_primitive">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="colors" type="PoolColorArray">
- </argument>
- <argument index="2" name="uvs" type="PoolVector2Array">
- </argument>
- <argument index="3" name="texture" type="Texture" default="null">
- </argument>
- <argument index="4" name="width" type="float" default="1.0">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
- </description>
- </method>
- <method name="draw_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="filled" type="bool" default="true">
- </argument>
- <description>
- Draw a colored rectangle.
- </description>
- </method>
- <method name="draw_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="rot" type="float">
- </argument>
- <argument index="2" name="scale" type="Vector2">
- </argument>
- <description>
- Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
- </description>
- </method>
- <method name="draw_set_transform_matrix">
- <return type="void">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_string">
- <return type="void">
- </return>
- <argument index="0" name="font" type="Font">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="text" type="String">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="clip_w" type="int" default="-1">
- </argument>
- <description>
- Draw a string using a custom font.
- </description>
- </method>
- <method name="draw_style_box">
- <return type="void">
- </return>
- <argument index="0" name="style_box" type="StyleBox">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- Draw a styled rectangle.
- </description>
- </method>
- <method name="draw_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="3" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- Draw a texture at a given position.
- </description>
- </method>
- <method name="draw_texture_rect">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="tile" type="bool">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
- </description>
- </method>
- <method name="draw_texture_rect_region">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="src_rect" type="Rect2">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
- </argument>
- <description>
- Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
- </description>
- </method>
- <method name="edit_get_state" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- Used for editing, returns an opaque value representing the transform state.
- </description>
- </method>
- <method name="edit_rotate">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- Used for editing, handle rotation.
- </description>
- </method>
- <method name="edit_set_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="edit_set_state">
- <return type="void">
- </return>
- <argument index="0" name="state" type="Variant">
- </argument>
- <description>
- Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation (radians) and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size.
- </description>
- </method>
- <method name="get_canvas" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Return the [RID] of the [World2D] canvas where this item is in.
- </description>
- </method>
- <method name="get_canvas_item" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Return the canvas item RID used by [VisualServer] for this item.
- </description>
- </method>
- <method name="get_canvas_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the transform matrix of this item's canvas.
- </description>
- </method>
- <method name="get_global_mouse_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Get the global position of the mouse.
- </description>
- </method>
- <method name="get_global_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the global transform matrix of this item.
- </description>
- </method>
- <method name="get_global_transform_with_canvas" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the global transform matrix of this item in relation to the canvas.
- </description>
- </method>
- <method name="get_item_and_children_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Get a [Rect2] with the boundaries of this item and its children.
- </description>
- </method>
- <method name="get_item_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return a rect containing the editable boundaries of the item.
- </description>
- </method>
- <method name="get_light_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get this item's light mask number.
- </description>
- </method>
- <method name="get_local_mouse_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Get the mouse position relative to this item's position.
- </description>
- </method>
- <method name="get_material" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- Get the material of this item.
- </description>
- </method>
- <method name="get_modulate" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Get the modulate of the CanvasItem, which affects children items too.
- </description>
- </method>
- <method name="get_self_modulate" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Get the self-modulate of the CanvasItem.
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the transform matrix of this item.
- </description>
- </method>
- <method name="get_use_parent_material" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether this item uses its parent's material.
- </description>
- </method>
- <method name="get_viewport_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Get the viewport's boundaries as a [Rect2].
- </description>
- </method>
- <method name="get_viewport_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get this item's transform in relation to the viewport.
- </description>
- </method>
- <method name="get_world_2d" qualifiers="const">
- <return type="World2D">
- </return>
- <description>
- Get the [World2D] where this item is in.
- </description>
- </method>
- <method name="hide">
- <return type="void">
- </return>
- <description>
- Hide the CanvasItem currently visible.
- </description>
- </method>
- <method name="is_draw_behind_parent_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the item is drawn behind its parent.
- </description>
- </method>
- <method name="is_local_transform_notification_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_set_as_toplevel" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if set as toplevel. See [method set_as_toplevel].
- </description>
- </method>
- <method name="is_transform_notification_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
- </description>
- </method>
- <method name="is_visible_in_tree" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="make_canvas_pos_local" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_input_local" qualifiers="const">
- <return type="InputEvent">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_as_toplevel">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set as top level. This means that it will not inherit transform from parent canvas items.
- </description>
- </method>
- <method name="set_draw_behind_parent">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether the canvas item is drawn behind its parent.
- </description>
- </method>
- <method name="set_light_mask">
- <return type="void">
- </return>
- <argument index="0" name="light_mask" type="int">
- </argument>
- <description>
- Set the ligtht mask number of this item.
- </description>
- </method>
- <method name="set_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- Set the material of this item.
- </description>
- </method>
- <method name="set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="modulate" type="Color">
- </argument>
- <description>
- Set the modulate of the CanvasItem. This [i]affects[/i] the modulation of children items.
- </description>
- </method>
- <method name="set_notify_local_transform">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_notify_transform">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_self_modulate">
- <return type="void">
- </return>
- <argument index="0" name="self_modulate" type="Color">
- </argument>
- <description>
- Set the self-modulate of the CanvasItem. This does not affect the modulation of children items.
- </description>
- </method>
- <method name="set_use_parent_material">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether or not this item should use its parent's material.
- </description>
- </method>
- <method name="set_visible">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- Set whether this item should be visible or not.
- Note that a hidden CanvasItem will make all children hidden too, so no matter what is set here this item won't be shown if its parent or grandparents nodes are hidden.
- </description>
- </method>
- <method name="show">
- <return type="void">
- </return>
- <description>
- Show the CanvasItem currently hidden.
- </description>
- </method>
- <method name="update">
- <return type="void">
- </return>
- <description>
- Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
- </description>
- </method>
- </methods>
- <members>
- <member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" brief="">
- </member>
- <member name="material" type="Material" setter="set_material" getter="get_material" brief="">
- </member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" brief="">
- </member>
- <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" brief="">
- </member>
- <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" brief="">
- </member>
- <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top" brief="">
- </member>
- <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" brief="">
- </member>
- <member name="visible" type="bool" setter="set_visible" getter="is_visible" brief="">
- </member>
- </members>
- <signals>
- <signal name="draw">
- <description>
- Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing.
- </description>
- </signal>
- <signal name="hide">
- <description>
- Emitted when becoming hidden.
- </description>
- </signal>
- <signal name="item_rect_changed">
- <description>
- Emitted when the item rect has changed.
- </description>
- </signal>
- <signal name="visibility_changed">
- <description>
- Emitted when the visibility (hidden/visible) changes.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="BLEND_MODE_MIX" value="0">
- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
- </constant>
- <constant name="BLEND_MODE_ADD" value="1">
- Additive blending mode.
- </constant>
- <constant name="BLEND_MODE_SUB" value="2">
- Subtractive blending mode.
- </constant>
- <constant name="BLEND_MODE_MUL" value="3">
- Multiplicative blending mode.
- </constant>
- <constant name="BLEND_MODE_PREMULT_ALPHA" value="4">
- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
- </constant>
- <constant name="NOTIFICATION_DRAW" value="30" enum="">
- CanvasItem is requested to draw.
- </constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31" enum="">
- Canvas item visibility has changed.
- </constant>
- <constant name="NOTIFICATION_ENTER_CANVAS" value="32" enum="">
- Canvas item has entered the canvas.
- </constant>
- <constant name="NOTIFICATION_EXIT_CANVAS" value="33" enum="">
- Canvas item has exited the canvas.
- </constant>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
- Canvas item transform has changed. Only received if requested.
- </constant>
- </constants>
-</class>
-<class name="CanvasItemMaterial" inherits="Material" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_blend_mode" qualifiers="const">
- <return type="int" enum="CanvasItemMaterial.BlendMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_light_mode" qualifiers="const">
- <return type="int" enum="CanvasItemMaterial.LightMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_blend_mode">
- <return type="void">
- </return>
- <argument index="0" name="blend_mode" type="int" enum="CanvasItemMaterial.BlendMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_light_mode">
- <return type="void">
- </return>
- <argument index="0" name="light_mode" type="int" enum="CanvasItemMaterial.LightMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="" enum="CanvasItemMaterial.BlendMode">
- </member>
- <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" brief="" enum="CanvasItemMaterial.LightMode">
- </member>
- </members>
- <constants>
- <constant name="BLEND_MODE_MIX" value="0">
- </constant>
- <constant name="BLEND_MODE_ADD" value="1">
- </constant>
- <constant name="BLEND_MODE_SUB" value="2">
- </constant>
- <constant name="BLEND_MODE_MUL" value="3">
- </constant>
- <constant name="BLEND_MODE_PREMULT_ALPHA" value="4">
- </constant>
- <constant name="LIGHT_MODE_NORMAL" value="0">
- </constant>
- <constant name="LIGHT_MODE_UNSHADED" value="1">
- </constant>
- <constant name="LIGHT_MODE_LIGHT_ONLY" value="2">
- </constant>
- </constants>
-</class>
-<class name="CanvasLayer" inherits="Node" category="Core">
- <brief_description>
- Canvas Item layer.
- </brief_description>
- <description>
- Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
- </description>
- <methods>
- <method name="get_custom_viewport" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the layer index, determines the draw order, a lower value will be below a higher one.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the base offset for this layer (helper).
- </description>
- </method>
- <method name="get_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the base rotation for this layer in radians (helper).
- </description>
- </method>
- <method name="get_rotationd" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the base rotation for this layer in degrees.
- </description>
- </method>
- <method name="get_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the base scale for this layer (helper).
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Return the base transform for this layer.
- </description>
- </method>
- <method name="get_world_2d" qualifiers="const">
- <return type="World2D">
- </return>
- <description>
- Return the [World2D] used by this layer.
- </description>
- </method>
- <method name="set_custom_viewport">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the layer index, determines the draw order, a lower value will be below a higher one.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the base offset for this layer (helper).
- </description>
- </method>
- <method name="set_rotation">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Set the base rotation for this layer in radians (helper).
- </description>
- </method>
- <method name="set_rotationd">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- Set the base rotation for this layer in degrees (helper).
- </description>
- </method>
- <method name="set_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- Set the base scale for this layer (helper).
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="transform" type="Transform2D">
- </argument>
- <description>
- Set the base transform for this layer.
- </description>
- </method>
- </methods>
- <members>
- <member name="layer" type="int" setter="set_layer" getter="get_layer" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="rotation" type="float" setter="set_rotationd" getter="get_rotationd" brief="">
- </member>
- <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CanvasModulate" inherits="Node2D" category="Core">
- <brief_description>
- Tint the entire canvas
- </brief_description>
- <description>
- CanvasModulate tints the canvas elements using its assigned color
- </description>
- <methods>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Gets the canvas tint color
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Sets the canvas tint color
- </description>
- </method>
- </methods>
- <members>
- <member name="color" type="Color" setter="set_color" getter="get_color" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_mid_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radial_segments" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rings" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_mid_height">
- <return type="void">
- </return>
- <argument index="0" name="mid_height" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radial_segments">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rings">
- <return type="void">
- </return>
- <argument index="0" name="rings" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" brief="">
- </member>
- <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
- </member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- <member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CapsuleShape" inherits="Shape" category="Core">
- <brief_description>
- Capsule shape resource.
- </brief_description>
- <description>
- Capsule shape resource, which can be set into a [PhysicsBody] or area.
- </description>
- <methods>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the capsule height.
- </description>
- </method>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the capsule radius.
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- Set the capsule height.
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- Set the capsule radius.
- </description>
- </method>
- </methods>
- <members>
- <member name="height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CapsuleShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Capsule 2D shape resource for physics.
- </brief_description>
- <description>
- Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters.
- </description>
- <methods>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the height of the [CapsuleShape2D].
- </description>
- </method>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the radius of the [CapsuleShape2D].
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- Set the height of the [CapsuleShape2D].
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- Set the radius of the [CapsuleShape2D].
- </description>
- </method>
- </methods>
- <members>
- <member name="height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CenterContainer" inherits="Container" category="Core">
- <brief_description>
- Keeps children controls centered.
- </brief_description>
- <description>
- CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center.
- </description>
- <methods>
- <method name="is_using_top_left" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Should put children to the top left corner instead of center of the container.
- </description>
- </method>
- <method name="set_use_top_left">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container).
- </description>
- </method>
- </methods>
- <members>
- <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CheckBox" inherits="Button" category="Core">
- <brief_description>
- Binary choice user interface widget
- </brief_description>
- <description>
- A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="check_vadjust" type="int">
- </theme_item>
- <theme_item name="checked" type="Texture">
- </theme_item>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- <theme_item name="radio_checked" type="Texture">
- </theme_item>
- <theme_item name="radio_unchecked" type="Texture">
- </theme_item>
- <theme_item name="unchecked" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="CheckButton" inherits="Button" category="Core">
- <brief_description>
- Checkable button.
- </brief_description>
- <description>
- CheckButton is a toggle button displayed as a check field.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="check_vadjust" type="int">
- </theme_item>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="off" type="Texture">
- </theme_item>
- <theme_item name="on" type="Texture">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="CircleShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Circular Shape for 2D Physics.
- </brief_description>
- <description>
- Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast.
- </description>
- <methods>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the radius of the circle shape.
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- Set the radius of the circle shape.
- </description>
- </method>
- </methods>
- <members>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ClassDB" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="can_instance" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_exists" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_category" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_integer_constant" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_integer_constant_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_method_list" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_property" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_property_list" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_signal" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_get_signal_list" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_has_integer_constant" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_has_method" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <argument index="2" name="no_inheritance" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_has_signal" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="class_set_property" qualifiers="const">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_class_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_inheriters_from_class" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_parent_class" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_class_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_parent_class" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="class" type="String">
- </argument>
- <argument index="1" name="inherits" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="CollisionObject" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="_input_event" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="camera" type="Object">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <argument index="2" name="click_pos" type="Vector3">
- </argument>
- <argument index="3" name="click_normal" type="Vector3">
- </argument>
- <argument index="4" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_shape_owner">
- <return type="int">
- </return>
- <argument index="0" name="owner" type="Object">
- </argument>
- <description>
- Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use.
- </description>
- </method>
- <method name="get_capture_input_on_drag" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shape_owners">
- <return type="Array">
- </return>
- <description>
- Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
- </description>
- </method>
- <method name="is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_shape_owner_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_shape_owner">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_capture_input_on_drag">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ray_pickable">
- <return type="void">
- </return>
- <argument index="0" name="ray_pickable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_find_owner" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="shape_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Will remove all the shapes associated with given owner.
- </description>
- </method>
- <method name="shape_owner_get_owner" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_get_shape" qualifiers="const">
- <return type="Shape">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
- </description>
- </method>
- <method name="shape_owner_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Returns number of shapes to which given owner is associated to.
- </description>
- </method>
- <method name="shape_owner_get_shape_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Will return [Transform] of an owner node.
- </description>
- </method>
- <method name="shape_owner_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Removes related shape from the owner.
- </description>
- </method>
- <method name="shape_owner_set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" brief="">
- </member>
- <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" brief="">
- </member>
- </members>
- <signals>
- <signal name="input_event">
- <argument index="0" name="camera" type="Object">
- </argument>
- <argument index="1" name="event" type="Object">
- </argument>
- <argument index="2" name="click_pos" type="Vector3">
- </argument>
- <argument index="3" name="click_normal" type="Vector3">
- </argument>
- <argument index="4" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="mouse_entered">
- <description>
- </description>
- </signal>
- <signal name="mouse_exited">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="CollisionObject2D" inherits="Node2D" category="Core">
- <brief_description>
- Base node for 2D collisionables.
- </brief_description>
- <description>
- CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
- </description>
- <methods>
- <method name="_input_event" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="Object">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <argument index="2" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_shape_owner">
- <return type="int">
- </return>
- <argument index="0" name="owner" type="Object">
- </argument>
- <description>
- Creates new holder for the shapes. Argument is a [CollisionShape2D] node. It will return owner_id which usually you will want to save for later use.
- </description>
- </method>
- <method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Return the RID of this object.
- </description>
- </method>
- <method name="get_shape_owners">
- <return type="Array">
- </return>
- <description>
- Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
- </description>
- </method>
- <method name="is_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this object is pickable.
- </description>
- </method>
- <method name="is_shape_owner_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_shape_owner">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pickable">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
- </description>
- </method>
- <method name="shape_find_owner" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="shape_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Will remove all the shapes associated with given owner.
- </description>
- </method>
- <method name="shape_owner_get_owner" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_get_shape" qualifiers="const">
- <return type="Shape2D">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
- </description>
- </method>
- <method name="shape_owner_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Returns number of shapes to which given owner is associated to.
- </description>
- </method>
- <method name="shape_owner_get_shape_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <description>
- Will return [Transform2D] of an owner node.
- </description>
- </method>
- <method name="shape_owner_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- Removes related shape from the owner.
- </description>
- </method>
- <method name="shape_owner_set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_set_one_way_collision">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_owner_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="transform" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" brief="">
- </member>
- </members>
- <signals>
- <signal name="input_event">
- <argument index="0" name="viewport" type="Object">
- </argument>
- <argument index="1" name="event" type="Object">
- </argument>
- <argument index="2" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="mouse_entered">
- <description>
- This event fires only once when the mouse pointer enters any shape of this object.
- </description>
- </signal>
- <signal name="mouse_exited">
- <description>
- This event fires only once when the mouse pointer exits all shapes of this object.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="CollisionPolygon" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_depth" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_polygon" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- </description>
- </method>
- <method name="is_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_depth">
- <return type="void">
- </return>
- <argument index="0" name="depth" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="depth" type="float" setter="set_depth" getter="get_depth" brief="">
- </member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
- </member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CollisionPolygon2D" inherits="Node2D" category="Core">
- <brief_description>
- Editor-only class for easy editing of collision polygons.
- </brief_description>
- <description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
- </description>
- <methods>
- <method name="get_build_mode" qualifiers="const">
- <return type="int" enum="CollisionPolygon2D.BuildMode">
- </return>
- <description>
- Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
- </description>
- </method>
- <method name="get_polygon" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return the list of points that define the polygon.
- </description>
- </method>
- <method name="is_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_one_way_collision_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_build_mode">
- <return type="void">
- </return>
- <argument index="0" name="build_mode" type="int" enum="CollisionPolygon2D.BuildMode">
- </argument>
- <description>
- Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
- </description>
- </method>
- <method name="set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_one_way_collision">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolVector2Array">
- </argument>
- <description>
- Set the array of points forming the polygon.
- When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
- </description>
- </method>
- </methods>
- <members>
- <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" brief="" enum="CollisionPolygon2D.BuildMode">
- </member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
- </member>
- <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief="">
- </member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CollisionShape" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_shape" qualifiers="const">
- <return type="Shape">
- </return>
- <description>
- </description>
- </method>
- <method name="is_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="make_convex_from_brothers">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="resource_changed">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="Shape">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
- </member>
- <member name="shape" type="Shape" setter="set_shape" getter="get_shape" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CollisionShape2D" inherits="Node2D" category="Core">
- <brief_description>
- Editor-only class for easy editing of shapes.
- </brief_description>
- <description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
- </description>
- <methods>
- <method name="get_shape" qualifiers="const">
- <return type="Shape2D">
- </return>
- <description>
- Return this shape's [Shape2D].
- </description>
- </method>
- <method name="is_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_one_way_collision_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_one_way_collision">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="Shape2D">
- </argument>
- <description>
- Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
- </description>
- </method>
- </methods>
- <members>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
- </member>
- <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief="">
- </member>
- <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Color" category="Built-In Types">
- <brief_description>
- Color in RGBA format.
- </brief_description>
- <description>
- A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values &gt; 1.
- </description>
- <methods>
- <method name="Color">
- <return type="Color">
- </return>
- <argument index="0" name="r" type="float">
- </argument>
- <argument index="1" name="g" type="float">
- </argument>
- <argument index="2" name="b" type="float">
- </argument>
- <argument index="3" name="a" type="float">
- </argument>
- <description>
- Construct the color from an RGBA profile.
- </description>
- </method>
- <method name="Color">
- <return type="Color">
- </return>
- <argument index="0" name="r" type="float">
- </argument>
- <argument index="1" name="g" type="float">
- </argument>
- <argument index="2" name="b" type="float">
- </argument>
- <description>
- Construct the color from an RGBA profile.
- </description>
- </method>
- <method name="Color">
- <return type="Color">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- Construct the color from an RGBA profile.
- </description>
- </method>
- <method name="Color">
- <return type="Color">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- Construct the color from an RGBA profile.
- </description>
- </method>
- <method name="blend">
- <return type="Color">
- </return>
- <argument index="0" name="over" type="Color">
- </argument>
- <description>
- Return a new color blended with anothor one.
- </description>
- </method>
- <method name="contrasted">
- <return type="Color">
- </return>
- <description>
- Return the most contrasting color with this one.
- </description>
- </method>
- <method name="gray">
- <return type="float">
- </return>
- <description>
- Convert the color to gray.
- </description>
- </method>
- <method name="inverted">
- <return type="Color">
- </return>
- <description>
- Return the inverted color (1-r, 1-g, 1-b, 1-a).
- </description>
- </method>
- <method name="linear_interpolate">
- <return type="Color">
- </return>
- <argument index="0" name="b" type="Color">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Return the linear interpolation with another color.
- </description>
- </method>
- <method name="to_32">
- <return type="int">
- </return>
- <description>
- Convert the color to a 32 its integer (each byte represents a RGBA).
- </description>
- </method>
- <method name="to_ARGB32">
- <return type="int">
- </return>
- <description>
- Convert color to ARGB32, more compatible with DirectX.
- </description>
- </method>
- <method name="to_html">
- <return type="String">
- </return>
- <argument index="0" name="with_alpha" type="bool" default="True">
- </argument>
- <description>
- Return the HTML hexadecimal color string.
- </description>
- </method>
- </methods>
- <members>
- <member name="a" type="float" setter="" getter="" brief="">
- Alpha (0 to 1)
- </member>
- <member name="a8" type="int" setter="" getter="" brief="">
- Alpha (0 to 255)
- </member>
- <member name="b" type="float" setter="" getter="" brief="">
- Blue (0 to 1)
- </member>
- <member name="b8" type="int" setter="" getter="" brief="">
- Blue (0 to 255)
- </member>
- <member name="g" type="float" setter="" getter="" brief="">
- Green (0 to 1)
- </member>
- <member name="g8" type="int" setter="" getter="" brief="">
- Green (0 to 255)
- </member>
- <member name="h" type="float" setter="" getter="" brief="">
- Hue (0 to 1)
- </member>
- <member name="r" type="float" setter="" getter="" brief="">
- Red (0 to 1)
- </member>
- <member name="r8" type="int" setter="" getter="" brief="">
- Red (0 to 255)
- </member>
- <member name="s" type="float" setter="" getter="" brief="">
- Saturation (0 to 1)
- </member>
- <member name="v" type="float" setter="" getter="" brief="">
- Value (0 to 1)
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ColorPicker" inherits="BoxContainer" category="Core">
- <brief_description>
- Color picker control.
- </brief_description>
- <description>
- This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace.
- </description>
- <methods>
- <method name="add_preset">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.
- </description>
- </method>
- <method name="get_pick_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Gets the current color.
- </description>
- </method>
- <method name="is_editing_alpha" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the color has transparency or not.
- </description>
- </method>
- <method name="is_raw_mode" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR).
- </description>
- </method>
- <method name="set_edit_alpha">
- <return type="void">
- </return>
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color.
- </description>
- </method>
- <method name="set_pick_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Select the current color.
- </description>
- </method>
- <method name="set_raw_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="bool">
- </argument>
- <description>
- Set whether this color picker is using raw mode or not, see [method is_raw_mode].
- </description>
- </method>
- </methods>
- <signals>
- <signal name="color_changed">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Emitted when the color is changed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="add_preset" type="Texture">
- </theme_item>
- <theme_item name="color_hue" type="Texture">
- </theme_item>
- <theme_item name="color_sample" type="Texture">
- </theme_item>
- <theme_item name="h_width" type="int">
- </theme_item>
- <theme_item name="label_width" type="int">
- </theme_item>
- <theme_item name="margin" type="int">
- </theme_item>
- <theme_item name="screen_picker" type="Texture">
- </theme_item>
- <theme_item name="sv_height" type="int">
- </theme_item>
- <theme_item name="sv_width" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="ColorPickerButton" inherits="Button" category="Core">
- <brief_description>
- Button that pops out a [ColorPicker]
- </brief_description>
- <description>
- Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility
- </description>
- <methods>
- <method name="get_pick_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_picker">
- <return type="ColorPicker">
- </return>
- <description>
- </description>
- </method>
- <method name="is_editing_alpha" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- See [method ColorPicker.is_edit_alpha]
- </description>
- </method>
- <method name="set_edit_alpha">
- <return type="void">
- </return>
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- See [method ColorPicker.set_edit_alpha]
- </description>
- </method>
- <method name="set_pick_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" brief="">
- </member>
- <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" brief="">
- </member>
- </members>
- <signals>
- <signal name="color_changed">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Emitted when the color is changed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="ColorRect" inherits="Control" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_frame_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_frame_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ConcavePolygonShape" inherits="Shape" category="Core">
- <brief_description>
- Concave polygon shape.
- </brief_description>
- <description>
- Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
- </description>
- <methods>
- <method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- Return the faces (an array of triangles).
- </description>
- </method>
- <method name="set_faces">
- <return type="void">
- </return>
- <argument index="0" name="faces" type="PoolVector3Array">
- </argument>
- <description>
- Set the faces (an array of triangles).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Concave polygon 2D shape resource for physics.
- </brief_description>
- <description>
- Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
- </description>
- <methods>
- <method name="get_segments" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return the array of segments.
- </description>
- </method>
- <method name="set_segments">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="PoolVector2Array">
- </argument>
- <description>
- Set the array of segments.
- </description>
- </method>
- </methods>
- <members>
- <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ConeTwistJoint" inherits="Joint" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="relaxation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" brief="">
- </member>
- <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_SWING_SPAN" value="0">
- </constant>
- <constant name="PARAM_TWIST_SPAN" value="1">
- </constant>
- <constant name="PARAM_BIAS" value="2">
- </constant>
- <constant name="PARAM_SOFTNESS" value="3">
- </constant>
- <constant name="PARAM_RELAXATION" value="4">
- </constant>
- <constant name="PARAM_MAX" value="5">
- </constant>
- </constants>
-</class>
-<class name="ConfigFile" inherits="Reference" category="Core">
- <brief_description>
- Helper class to handle INI-style files.
- </brief_description>
- <description>
- This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem.
- The following example shows how to parse a INI-style file from the system, read its contents and store new values in it:
- [codeblock]
- var config = ConfigFile.new()
- var err = config.load("user://settings.cfg")
- if err == OK: # if not, something went wrong with the file loading
- # Look for the display/width pair, and default to 1024 if missing
- var screen_width = get_value("display", "width", 1024)
- # Store a variable if and only it hasn't been defined yet
- if not config.has_section_key("audio", "mute"):
- config.set_value("audio", "mute", false)
- # Save the changes by overwriting the previous file
- config.save("user://settings.cfg")
- [/codeblock]
- </description>
- <methods>
- <method name="erase_section">
- <return type="void">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_section_keys" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <description>
- Return an array of all defined key identifiers in the specified section.
- </description>
- </method>
- <method name="get_sections" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Return an array of all defined section identifiers.
- </description>
- </method>
- <method name="get_value" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <argument index="2" name="default" type="Variant" default="null">
- </argument>
- <description>
- Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified).
- </description>
- </method>
- <method name="has_section" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <description>
- Check if the specified section exists.
- </description>
- </method>
- <method name="has_section_key" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <description>
- Check if the specified section-key pair exists.
- </description>
- </method>
- <method name="load">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK).
- </description>
- </method>
- <method name="save">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
- The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK).
- </description>
- </method>
- <method name="set_value">
- <return type="void">
- </return>
- <argument index="0" name="section" type="String">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core">
- <brief_description>
- Dialog for confirmation of actions.
- </brief_description>
- <description>
- Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
- </description>
- <methods>
- <method name="get_cancel">
- <return type="Button">
- </return>
- <description>
- Return the cancel button.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Container" inherits="Control" category="Core">
- <brief_description>
- Base node for containers.
- </brief_description>
- <description>
- Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way.
- A Control can inherit this to create custom container classes.
- </description>
- <methods>
- <method name="fit_child_in_rect">
- <return type="void">
- </return>
- <argument index="0" name="child" type="Control">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
- </description>
- </method>
- <method name="queue_sort">
- <return type="void">
- </return>
- <description>
- Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="sort_children">
- <description>
- Emitted when sorting the children is needed.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_SORT_CHILDREN" value="50" enum="">
- Notification for when sorting the children, it must be obeyed immediately.
- </constant>
- </constants>
-</class>
-<class name="Control" inherits="CanvasItem" category="Core">
- <brief_description>
- Control is the base node for all the GUI components.
- </brief_description>
- <description>
- Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces.
- Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used.
- Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range.
- Input device events are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method MainLoop._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event].
- Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden.
- It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function.
- Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overridden per each control by calling the add_*_override functions, or from the editor.
- </description>
- <methods>
- <method name="_get_minimum_size" qualifiers="virtual">
- <return type="Vector2">
- </return>
- <description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
- </description>
- </method>
- <method name="_gui_input" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="accept_event">
- <return type="void">
- </return>
- <description>
- Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input].
- </description>
- </method>
- <method name="add_color_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_constant_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="constant" type="int">
- </argument>
- <description>
- Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
- </description>
- </method>
- <method name="add_font_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="font" type="Font">
- </argument>
- <description>
- Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
- </description>
- </method>
- <method name="add_icon_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared.
- </description>
- </method>
- <method name="add_shader_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="shader" type="Shader">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_style_override">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="stylebox" type="StyleBox">
- </argument>
- <description>
- Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared.
- </description>
- </method>
- <method name="can_drop_data" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="force_drag">
- <return type="void">
- </return>
- <argument index="0" name="data" type="Variant">
- </argument>
- <argument index="1" name="preview" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_anchor" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
- </description>
- </method>
- <method name="get_begin" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_combined_minimum_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_constant" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_cursor_shape" qualifiers="const">
- <return type="int" enum="Control.CursorShape">
- </return>
- <argument index="0" name="pos" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Return the cursor shape at a certain position in the control.
- </description>
- </method>
- <method name="get_custom_minimum_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_cursor_shape" qualifiers="const">
- <return type="int" enum="Control.CursorShape">
- </return>
- <description>
- Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
- </description>
- </method>
- <method name="get_drag_data" qualifiers="virtual">
- <return type="Object">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_end" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="get_focus_mode" qualifiers="const">
- <return type="int" enum="Control.FocusMode">
- </return>
- <description>
- Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
- </description>
- </method>
- <method name="get_focus_neighbour" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
- </description>
- </method>
- <method name="get_focus_owner" qualifiers="const">
- <return type="Control">
- </return>
- <description>
- Return which control is owning the keyboard focus, or null if no one.
- </description>
- </method>
- <method name="get_font" qualifiers="const">
- <return type="Font">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_global_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
- </description>
- </method>
- <method name="get_global_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_position], [method get_size]).
- </description>
- </method>
- <method name="get_h_grow_direction" qualifiers="const">
- <return type="int" enum="Control.GrowDirection">
- </return>
- <description>
- </description>
- </method>
- <method name="get_h_size_flags" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Hint for containers, return horizontal positioning flags.
- </description>
- </method>
- <method name="get_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
- </description>
- </method>
- <method name="get_minimum_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
- </description>
- </method>
- <method name="get_mouse_filter" qualifiers="const">
- <return type="int" enum="Control.MouseFilter">
- </return>
- <description>
- Return when the control is ignoring mouse events (even touchpad events send mouse events).
- </description>
- </method>
- <method name="get_parent_area_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_parent_control" qualifiers="const">
- <return type="Control">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pivot_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
- </description>
- </method>
- <method name="get_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_position], [method get_size]).
- </description>
- </method>
- <method name="get_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rotation (in radians)
- </description>
- </method>
- <method name="get_rotation_deg" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rotation (in degrees)
- </description>
- </method>
- <method name="get_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by[/b] [method get_minimum_size]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
- </description>
- </method>
- <method name="get_stretch_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
- </description>
- </method>
- <method name="get_stylebox" qualifiers="const">
- <return type="StyleBox">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_theme" qualifiers="const">
- <return type="Theme">
- </return>
- <description>
- Return a [Theme] override, if one exists (see [method set_theme]).
- </description>
- </method>
- <method name="get_tooltip" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="atpos" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Return the tooltip, which will appear when the cursor is resting over this control.
- </description>
- </method>
- <method name="get_v_grow_direction" qualifiers="const">
- <return type="int" enum="Control.GrowDirection">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_size_flags" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Hint for containers, return vertical positioning flags.
- </description>
- </method>
- <method name="grab_click_focus">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="grab_focus">
- <return type="void">
- </return>
- <description>
- Steal the focus from another control and become the focused control (see [method set_focus_mode]).
- </description>
- </method>
- <method name="has_color" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_color_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_constant" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_constant_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_focus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the Control is the current focused control (see [method set_focus_mode]).
- </description>
- </method>
- <method name="has_font" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_font_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_icon" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_icon_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_point" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_stylebox" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_stylebox_override" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_clipping_contents">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="minimum_size_changed">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="release_focus">
- <return type="void">
- </return>
- <description>
- Give up the focus, no other control will be able to receive keyboard input.
- </description>
- </method>
- <method name="set_anchor">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="anchor" type="float">
- </argument>
- <argument index="2" name="keep_margin" type="bool" default="false">
- </argument>
- <argument index="3" name="push_opposite_anchor" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_anchor_and_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="anchor" type="float">
- </argument>
- <argument index="2" name="offset" type="float">
- </argument>
- <argument index="3" name="push_opposite_anchor" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_anchors_preset">
- <return type="void">
- </return>
- <argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
- </argument>
- <argument index="1" name="keep_margin" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_area_as_parent_rect">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" default="0">
- </argument>
- <description>
- Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]).
- </description>
- </method>
- <method name="set_begin">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_clip_contents">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_minimum_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_cursor_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="int" enum="Control.CursorShape">
- </argument>
- <description>
- Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
- </description>
- </method>
- <method name="set_drag_forwarding">
- <return type="void">
- </return>
- <argument index="0" name="target" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_drag_preview">
- <return type="void">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_end">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_focus_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Control.FocusMode">
- </argument>
- <description>
- Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
- </description>
- </method>
- <method name="set_focus_neighbour">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="neighbour" type="NodePath">
- </argument>
- <description>
- Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
- </description>
- </method>
- <method name="set_global_position">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]).
- </description>
- </method>
- <method name="set_h_grow_direction">
- <return type="void">
- </return>
- <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_size_flags">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- Hint for containers, set horizontal positioning flags.
- </description>
- </method>
- <method name="set_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="offset" type="float">
- </argument>
- <description>
- Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode.
- </description>
- </method>
- <method name="set_mouse_filter">
- <return type="void">
- </return>
- <argument index="0" name="filter" type="int" enum="Control.MouseFilter">
- </argument>
- <description>
- Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants)
- </description>
- </method>
- <method name="set_pivot_offset">
- <return type="void">
- </return>
- <argument index="0" name="pivot_offset" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_position">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_rotation">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Set the rotation (in radians).
- </description>
- </method>
- <method name="set_rotation_deg">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- Set the rotation (in degrees).
- </description>
- </method>
- <method name="set_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_stretch_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
- </description>
- </method>
- <method name="set_theme">
- <return type="void">
- </return>
- <argument index="0" name="theme" type="Theme">
- </argument>
- <description>
- Override whole the [Theme] for this Control and all its children controls.
- </description>
- </method>
- <method name="set_tooltip">
- <return type="void">
- </return>
- <argument index="0" name="tooltip" type="String">
- </argument>
- <description>
- Set a tooltip, which will appear when the cursor is resting over this control.
- </description>
- </method>
- <method name="set_v_grow_direction">
- <return type="void">
- </return>
- <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_size_flags">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- Hint for containers, set vertical positioning flags.
- </description>
- </method>
- <method name="show_modal">
- <return type="void">
- </return>
- <argument index="0" name="exclusive" type="bool" default="false">
- </argument>
- <description>
- Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
- </description>
- </method>
- <method name="warp_mouse">
- <return type="void">
- </return>
- <argument index="0" name="to_pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor" brief="">
- </member>
- <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor" brief="">
- </member>
- <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor" brief="">
- </member>
- <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" brief="">
- </member>
- <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
- </member>
- <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
- </member>
- <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
- </member>
- <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
- </member>
- <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" brief="" enum="Control.GrowDirection">
- </member>
- <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" brief="" enum="Control.GrowDirection">
- </member>
- <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip" brief="">
- </member>
- <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" brief="">
- </member>
- <member name="margin_left" type="float" setter="set_margin" getter="get_margin" brief="">
- </member>
- <member name="margin_right" type="float" setter="set_margin" getter="get_margin" brief="">
- </member>
- <member name="margin_top" type="float" setter="set_margin" getter="get_margin" brief="">
- </member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" brief="" enum="Control.MouseFilter">
- </member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" brief="">
- </member>
- <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" brief="">
- </member>
- <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" brief="">
- </member>
- <member name="rect_position" type="Vector2" setter="set_position" getter="get_position" brief="">
- </member>
- <member name="rect_rotation" type="float" setter="set_rotation_deg" getter="get_rotation_deg" brief="">
- </member>
- <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" brief="">
- </member>
- <member name="rect_size" type="Vector2" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" brief="">
- </member>
- <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" brief="">
- </member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" brief="">
- </member>
- <member name="theme" type="Theme" setter="set_theme" getter="get_theme" brief="">
- </member>
- </members>
- <signals>
- <signal name="focus_entered">
- <description>
- Emitted when keyboard focus is gained.
- </description>
- </signal>
- <signal name="focus_exited">
- <description>
- Emitted when the keyboard focus is lost.
- </description>
- </signal>
- <signal name="gui_input">
- <argument index="0" name="ev" type="Object">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="minimum_size_changed">
- <description>
- Emitted when the minimum size of the control changed.
- </description>
- </signal>
- <signal name="modal_closed">
- <description>
- </description>
- </signal>
- <signal name="mouse_entered">
- <description>
- Emitted when the mouse enters the control area.
- </description>
- </signal>
- <signal name="mouse_exited">
- <description>
- Emitted when the mouse left the control area.
- </description>
- </signal>
- <signal name="resized">
- <description>
- Emitted when the control changed size.
- </description>
- </signal>
- <signal name="size_flags_changed">
- <description>
- Emitted when the size flags changed.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="FOCUS_NONE" value="0">
- Control can't acquire focus.
- </constant>
- <constant name="FOCUS_CLICK" value="1">
- Control can acquire focus only if clicked.
- </constant>
- <constant name="FOCUS_ALL" value="2">
- Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control.
- </constant>
- <constant name="NOTIFICATION_RESIZED" value="40" enum="">
- Control changed size (get_size() reports the new size).
- </constant>
- <constant name="NOTIFICATION_MOUSE_ENTER" value="41" enum="">
- Mouse pointer entered the area of the Control.
- </constant>
- <constant name="NOTIFICATION_MOUSE_EXIT" value="42" enum="">
- Mouse pointer exited the area of the Control.
- </constant>
- <constant name="NOTIFICATION_FOCUS_ENTER" value="43" enum="">
- Control gained focus.
- </constant>
- <constant name="NOTIFICATION_FOCUS_EXIT" value="44" enum="">
- Control lost focus.
- </constant>
- <constant name="NOTIFICATION_THEME_CHANGED" value="45" enum="">
- Theme changed. Redrawing is desired.
- </constant>
- <constant name="NOTIFICATION_MODAL_CLOSE" value="46" enum="">
- Modal control was closed.
- </constant>
- <constant name="CURSOR_ARROW" value="0">
- </constant>
- <constant name="CURSOR_IBEAM" value="1">
- </constant>
- <constant name="CURSOR_POINTING_HAND" value="2">
- </constant>
- <constant name="CURSOR_CROSS" value="3">
- </constant>
- <constant name="CURSOR_WAIT" value="4">
- </constant>
- <constant name="CURSOR_BUSY" value="5">
- </constant>
- <constant name="CURSOR_DRAG" value="6">
- </constant>
- <constant name="CURSOR_CAN_DROP" value="7">
- </constant>
- <constant name="CURSOR_FORBIDDEN" value="8">
- </constant>
- <constant name="CURSOR_VSIZE" value="9">
- </constant>
- <constant name="CURSOR_HSIZE" value="10">
- </constant>
- <constant name="CURSOR_BDIAGSIZE" value="11">
- </constant>
- <constant name="CURSOR_FDIAGSIZE" value="12">
- </constant>
- <constant name="CURSOR_MOVE" value="13">
- </constant>
- <constant name="CURSOR_VSPLIT" value="14">
- </constant>
- <constant name="CURSOR_HSPLIT" value="15">
- </constant>
- <constant name="CURSOR_HELP" value="16">
- </constant>
- <constant name="PRESET_TOP_LEFT" value="0">
- </constant>
- <constant name="PRESET_TOP_RIGHT" value="1">
- </constant>
- <constant name="PRESET_BOTTOM_LEFT" value="2">
- </constant>
- <constant name="PRESET_BOTTOM_RIGHT" value="3">
- </constant>
- <constant name="PRESET_CENTER_LEFT" value="4">
- </constant>
- <constant name="PRESET_CENTER_TOP" value="5">
- </constant>
- <constant name="PRESET_CENTER_RIGHT" value="6">
- </constant>
- <constant name="PRESET_CENTER_BOTTOM" value="7">
- </constant>
- <constant name="PRESET_CENTER" value="8">
- </constant>
- <constant name="PRESET_LEFT_WIDE" value="9">
- </constant>
- <constant name="PRESET_TOP_WIDE" value="10">
- </constant>
- <constant name="PRESET_RIGHT_WIDE" value="11">
- </constant>
- <constant name="PRESET_BOTTOM_WIDE" value="12">
- </constant>
- <constant name="PRESET_VCENTER_WIDE" value="13">
- </constant>
- <constant name="PRESET_HCENTER_WIDE" value="14">
- </constant>
- <constant name="PRESET_WIDE" value="15">
- </constant>
- <constant name="SIZE_EXPAND" value="2">
- </constant>
- <constant name="SIZE_FILL" value="1">
- </constant>
- <constant name="SIZE_EXPAND_FILL" value="3">
- </constant>
- <constant name="SIZE_SHRINK_CENTER" value="4">
- </constant>
- <constant name="SIZE_SHRINK_END" value="8">
- </constant>
- <constant name="MOUSE_FILTER_STOP" value="0">
- </constant>
- <constant name="MOUSE_FILTER_PASS" value="1">
- </constant>
- <constant name="MOUSE_FILTER_IGNORE" value="2">
- </constant>
- <constant name="GROW_DIRECTION_BEGIN" value="0">
- </constant>
- <constant name="GROW_DIRECTION_END" value="1">
- </constant>
- <constant name="ANCHOR_BEGIN" value="0">
- X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP.
- </constant>
- <constant name="ANCHOR_END" value="1">
- X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM.
- </constant>
- </constants>
-</class>
-<class name="ConvexPolygonShape" inherits="Shape" category="Core">
- <brief_description>
- Convex Polygon Shape.
- </brief_description>
- <description>
- Convex polygon shape resource, which can be set into a [PhysicsBody] or area.
- </description>
- <methods>
- <method name="get_points" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- </description>
- </method>
- <method name="set_points">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Convex Polygon Shape for 2D physics.
- </brief_description>
- <description>
- Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
- </description>
- <methods>
- <method name="get_points" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
- </description>
- </method>
- <method name="set_point_cloud">
- <return type="void">
- </return>
- <argument index="0" name="point_cloud" type="PoolVector2Array">
- </argument>
- <description>
- Currently, this method does nothing.
- </description>
- </method>
- <method name="set_points">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <description>
- Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
- </description>
- </method>
- </methods>
- <members>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CubeMap" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_flags" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lossy_storage_quality" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_side" qualifiers="const">
- <return type="Image">
- </return>
- <argument index="0" name="side" type="int" enum="CubeMap.Side">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_storage" qualifiers="const">
- <return type="int" enum="CubeMap.Storage">
- </return>
- <description>
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_flags">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lossy_storage_quality">
- <return type="void">
- </return>
- <argument index="0" name="quality" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_side">
- <return type="void">
- </return>
- <argument index="0" name="side" type="int" enum="CubeMap.Side">
- </argument>
- <argument index="1" name="image" type="Image">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_storage">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="CubeMap.Storage">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="STORAGE_RAW" value="0">
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSY" value="1">
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSLESS" value="2">
- </constant>
- <constant name="SIDE_LEFT" value="0">
- </constant>
- <constant name="SIDE_RIGHT" value="1">
- </constant>
- <constant name="SIDE_BOTTOM" value="2">
- </constant>
- <constant name="SIDE_TOP" value="3">
- </constant>
- <constant name="SIDE_FRONT" value="4">
- </constant>
- <constant name="SIDE_BACK" value="5">
- </constant>
- <constant name="FLAG_MIPMAPS" value="1">
- </constant>
- <constant name="FLAG_REPEAT" value="2">
- </constant>
- <constant name="FLAG_FILTER" value="4">
- </constant>
- <constant name="FLAGS_DEFAULT" value="7">
- </constant>
- </constants>
-</class>
-<class name="CubeMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_size" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_depth" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_depth">
- <return type="void">
- </return>
- <argument index="0" name="divisions" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_height">
- <return type="void">
- </return>
- <argument index="0" name="divisions" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_width">
- <return type="void">
- </return>
- <argument index="0" name="subdivide" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
- </member>
- <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief="">
- </member>
- <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Curve" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_point">
- <return type="int">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="left_tangent" type="float" default="0">
- </argument>
- <argument index="2" name="right_tangent" type="float" default="0">
- </argument>
- <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0">
- </argument>
- <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="bake">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="clean_dupes">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="clear_points">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bake_resolution" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_value" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_min_value" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_point_left_mode" qualifiers="const">
- <return type="int" enum="Curve.TangentMode">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_point_left_tangent" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_point_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_point_right_mode" qualifiers="const">
- <return type="int" enum="Curve.TangentMode">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_point_right_tangent" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="interpolate" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="interpolate_baked">
- <return type="float">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bake_resolution">
- <return type="void">
- </return>
- <argument index="0" name="resolution" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_value">
- <return type="void">
- </return>
- <argument index="0" name="max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_min_value">
- <return type="void">
- </return>
- <argument index="0" name="min" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_left_mode">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_left_tangent">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="tangent" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_offset">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="offset" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_right_mode">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_right_tangent">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="tangent" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_value">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="_data" type="Array" setter="_set_data" getter="_get_data" brief="">
- </member>
- <member name="bake_resolution" type="int" setter="set_bake_resolution" getter="get_bake_resolution" brief="">
- </member>
- <member name="max_value" type="float" setter="set_max_value" getter="get_max_value" brief="">
- </member>
- <member name="min_value" type="float" setter="set_min_value" getter="get_min_value" brief="">
- </member>
- </members>
- <signals>
- <signal name="range_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Curve2D" inherits="Resource" category="Core">
- <brief_description>
- Describes a Bezier curve in 2D space.
- </brief_description>
- <description>
- This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes.
- It keeps a cache of precalculated points along the curve, to speed further calculations up.
- </description>
- <methods>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="3" name="atpos" type="int" default="-1">
- </argument>
- <description>
- Adds a point to a curve, at position "pos", with control points "in" and "out".
- If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
- </description>
- </method>
- <method name="clear_points">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bake_interval" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance between two adjacent cached points.
- </description>
- </method>
- <method name="get_baked_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
- </description>
- </method>
- <method name="get_baked_points" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Returns the cache of points as a [PoolVector2Array].
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of points describing the curve.
- </description>
- </method>
- <method name="get_point_in" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
- </description>
- </method>
- <method name="get_point_out" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
- </description>
- </method>
- <method name="get_point_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
- </description>
- </method>
- <method name="interpolate" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
- If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
- </description>
- </method>
- <method name="interpolate_baked" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <argument index="1" name="cubic" type="bool" default="false">
- </argument>
- <description>
- Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
- To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
- Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
- </description>
- </method>
- <method name="interpolatef" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="fofs" type="float">
- </argument>
- <description>
- Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
- </description>
- </method>
- <method name="set_bake_interval">
- <return type="void">
- </return>
- <argument index="0" name="distance" type="float">
- </argument>
- <description>
- Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
- </description>
- </method>
- <method name="set_point_in">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <description>
- Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="set_point_out">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <description>
- Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="set_point_pos">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <description>
- Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="tessellate" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="max_stages" type="int" default="5">
- </argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
- </argument>
- <description>
- Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
- This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
- "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
- "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
- </description>
- </method>
- </methods>
- <members>
- <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Curve3D" inherits="Resource" category="Core">
- <brief_description>
- Describes a Bezier curve in 3D space.
- </brief_description>
- <description>
- This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes.
- It keeps a cache of precalculated points along the curve, to speed further calculations up.
- </description>
- <methods>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="3" name="atpos" type="int" default="-1">
- </argument>
- <description>
- Adds a point to a curve, at position "pos", with control points "in" and "out".
- If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
- </description>
- </method>
- <method name="clear_points">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bake_interval" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance between two adjacent cached points.
- </description>
- </method>
- <method name="get_baked_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
- </description>
- </method>
- <method name="get_baked_points" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- Returns the cache of points as a [PoolVector3Array].
- </description>
- </method>
- <method name="get_baked_tilts" qualifiers="const">
- <return type="PoolRealArray">
- </return>
- <description>
- Returns the cache of tilts as a [RealArray].
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of points describing the curve.
- </description>
- </method>
- <method name="get_point_in" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
- </description>
- </method>
- <method name="get_point_out" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
- </description>
- </method>
- <method name="get_point_pos" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
- </description>
- </method>
- <method name="get_point_tilt" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
- </description>
- </method>
- <method name="interpolate" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
- If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
- </description>
- </method>
- <method name="interpolate_baked" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <argument index="1" name="cubic" type="bool" default="false">
- </argument>
- <description>
- Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
- To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
- Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
- </description>
- </method>
- <method name="interpolatef" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="fofs" type="float">
- </argument>
- <description>
- Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
- </description>
- </method>
- <method name="set_bake_interval">
- <return type="void">
- </return>
- <argument index="0" name="distance" type="float">
- </argument>
- <description>
- Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
- </description>
- </method>
- <method name="set_point_in">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <description>
- Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="set_point_out">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <description>
- Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="set_point_pos">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <description>
- Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
- </description>
- </method>
- <method name="set_point_tilt">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="tilt" type="float">
- </argument>
- <description>
- Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
- The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
- </description>
- </method>
- <method name="tessellate" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="max_stages" type="int" default="5">
- </argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
- </argument>
- <description>
- Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
- This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
- "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
- "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
- </description>
- </method>
- </methods>
- <members>
- <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CurveTexture" inherits="Texture" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_curve" qualifiers="const">
- <return type="Curve">
- </return>
- <description>
- </description>
- </method>
- <method name="set_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="Curve">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_width">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="curve" type="Curve" setter="set_curve" getter="get_curve" brief="">
- </member>
- <member name="width" type="int" setter="set_width" getter="get_width" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_bottom_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radial_segments" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rings" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_top_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bottom_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radial_segments">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rings">
- <return type="void">
- </return>
- <argument index="0" name="rings" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_top_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" brief="">
- </member>
- <member name="height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
- </member>
- <member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
- </member>
- <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core">
- <brief_description>
- Damped spring constraint for 2D physics.
- </brief_description>
- <description>
- Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length.
- </description>
- <methods>
- <method name="get_damping" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
- </description>
- </method>
- <method name="get_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the maximum length of the spring joint.
- </description>
- </method>
- <method name="get_rest_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
- </description>
- </method>
- <method name="get_stiffness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
- </description>
- </method>
- <method name="set_damping">
- <return type="void">
- </return>
- <argument index="0" name="damping" type="float">
- </argument>
- <description>
- Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
- </description>
- </method>
- <method name="set_length">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- Set the maximum length of the spring joint.
- </description>
- </method>
- <method name="set_rest_length">
- <return type="void">
- </return>
- <argument index="0" name="rest_length" type="float">
- </argument>
- <description>
- Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
- </description>
- </method>
- <method name="set_stiffness">
- <return type="void">
- </return>
- <argument index="0" name="stiffness" type="float">
- </argument>
- <description>
- Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
- </description>
- </method>
- </methods>
- <members>
- <member name="damping" type="float" setter="set_damping" getter="get_damping" brief="">
- </member>
- <member name="length" type="float" setter="set_length" getter="get_length" brief="">
- </member>
- <member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length" brief="">
- </member>
- <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Dictionary" category="Built-In Types">
- <brief_description>
- Dictionary type.
- </brief_description>
- <description>
- Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
- </description>
- <methods>
- <method name="clear">
- <description>
- Clear the dictionary, removing all key/value pairs.
- </description>
- </method>
- <method name="empty">
- <return type="bool">
- </return>
- <description>
- Return true if the dictionary is empty.
- </description>
- </method>
- <method name="erase">
- <argument index="0" name="key" type="var">
- </argument>
- <description>
- Erase a dictionary key/value pair by key.
- </description>
- </method>
- <method name="has">
- <return type="bool">
- </return>
- <argument index="0" name="key" type="var">
- </argument>
- <description>
- Return true if the dictionary has a given key.
- </description>
- </method>
- <method name="has_all">
- <return type="bool">
- </return>
- <argument index="0" name="keys" type="Array">
- </argument>
- <description>
- Return true if the dictionary has all of the keys in the given array.
- </description>
- </method>
- <method name="hash">
- <return type="int">
- </return>
- <description>
- Return a hashed integer value representing the dictionary contents.
- </description>
- </method>
- <method name="keys">
- <return type="Array">
- </return>
- <description>
- Return the list of keys in the [Dictionary].
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the dictionary (in pairs).
- </description>
- </method>
- <method name="values">
- <return type="Array">
- </return>
- <description>
- Return the list of values in the [Dictionary].
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DirectionalLight" inherits="Light" category="Core">
- <brief_description>
- Directional Light, such as the Sun or the Moon.
- </brief_description>
- <description>
- A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
- </description>
- <methods>
- <method name="get_shadow_mode" qualifiers="const">
- <return type="int" enum="DirectionalLight.ShadowMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_blend_splits_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_blend_splits">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="DirectionalLight.ShadowMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" brief="">
- </member>
- <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="" enum="DirectionalLight.ShadowMode">
- </member>
- <member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- </members>
- <constants>
- <constant name="SHADOW_ORTHOGONAL" value="0">
- </constant>
- <constant name="SHADOW_PARALLEL_2_SPLITS" value="1">
- </constant>
- <constant name="SHADOW_PARALLEL_4_SPLITS" value="2">
- </constant>
- </constants>
-</class>
-<class name="Directory" inherits="Reference" category="Core">
- <brief_description>
- Type used to handle the filesystem.
- </brief_description>
- <description>
- Directory type. It is used to manage directories and their content (not restricted to the project folder).
- Here is an example on how to iterate through the files of a directory:
- [codeblock]
- func dir_contents(path):
- var dir = Directory.new()
- if dir.open(path) == OK:
- dir.list_dir_begin()
- var file_name = dir.get_next()
- while (file_name != ""):
- if dir.current_is_dir():
- print("Found directory: " + file_name)
- else:
- print("Found file: " + file_name)
- file_name = dir.get_next()
- else:
- print("An error occurred when trying to access the path.")
- [/codeblock]
- </description>
- <methods>
- <method name="change_dir">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="todir" type="String">
- </argument>
- <description>
- Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
- The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
- </description>
- </method>
- <method name="copy">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="to" type="String">
- </argument>
- <description>
- Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
- </description>
- </method>
- <method name="current_is_dir" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories).
- </description>
- </method>
- <method name="dir_exists">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
- </description>
- </method>
- <method name="file_exists">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Return whether the target file exists. The argument can be relative to the current directory, or an absolute path.
- </description>
- </method>
- <method name="get_current_dir">
- <return type="String">
- </return>
- <description>
- Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
- </description>
- </method>
- <method name="get_current_drive">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_drive">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String.
- </description>
- </method>
- <method name="get_drive_count">
- <return type="int">
- </return>
- <description>
- On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
- </description>
- </method>
- <method name="get_next">
- <return type="String">
- </return>
- <description>
- Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]).
- The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
- </description>
- </method>
- <method name="get_space_left">
- <return type="int">
- </return>
- <description>
- On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1.
- </description>
- </method>
- <method name="list_dir_begin">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="skip_navigational" type="bool" default="false">
- </argument>
- <argument index="1" name="skip_hidden" type="bool" default="false">
- </argument>
- <description>
- Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
- If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out.
- If you pass [code]skip_hidden[/code], then hidden files would be filtered out.
- </description>
- </method>
- <method name="list_dir_end">
- <return type="void">
- </return>
- <description>
- Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
- </description>
- </method>
- <method name="make_dir">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
- The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
- </description>
- </method>
- <method name="make_dir_recursive">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
- Return one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
- </description>
- </method>
- <method name="open">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
- The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
- </description>
- </method>
- <method name="remove">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
- Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
- </description>
- </method>
- <method name="rename">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="to" type="String">
- </argument>
- <description>
- Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DynamicFont" inherits="Font" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_fallback">
- <return type="void">
- </return>
- <argument index="0" name="data" type="DynamicFontData">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_fallback" qualifiers="const">
- <return type="DynamicFontData">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_fallback_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_font_data" qualifiers="const">
- <return type="DynamicFontData">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_spacing" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="type" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_use_filter" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_mipmaps" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_fallback">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fallback">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="data" type="DynamicFontData">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_font_data">
- <return type="void">
- </return>
- <argument index="0" name="data" type="DynamicFontData">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="data" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_spacing">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int">
- </argument>
- <argument index="1" name="value" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_filter">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_mipmaps">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" brief="">
- </member>
- <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing" brief="">
- </member>
- <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" brief="">
- </member>
- <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" brief="">
- </member>
- <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data" brief="">
- </member>
- <member name="size" type="int" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" brief="">
- </member>
- <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" brief="">
- </member>
- </members>
- <constants>
- <constant name="SPACING_TOP" value="0">
- </constant>
- <constant name="SPACING_BOTTOM" value="1">
- </constant>
- <constant name="SPACING_CHAR" value="2">
- </constant>
- <constant name="SPACING_SPACE" value="3">
- </constant>
- </constants>
-</class>
-<class name="DynamicFontData" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_font_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_font_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="font_path" type="String" setter="set_font_path" getter="get_font_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_filter">
- <return type="void">
- </return>
- <argument index="0" name="filter" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_filters">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_access" qualifiers="const">
- <return type="int" enum="EditorFileDialog.Access">
- </return>
- <description>
- </description>
- </method>
- <method name="get_current_dir" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_current_file" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_current_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_display_mode" qualifiers="const">
- <return type="int" enum="EditorFileDialog.DisplayMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="EditorFileDialog.Mode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vbox">
- <return type="VBoxContainer">
- </return>
- <description>
- </description>
- </method>
- <method name="invalidate">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="is_overwrite_warning_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_showing_hidden_files" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_access">
- <return type="void">
- </return>
- <argument index="0" name="access" type="int" enum="EditorFileDialog.Access">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_dir">
- <return type="void">
- </return>
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disable_overwrite_warning">
- <return type="void">
- </return>
- <argument index="0" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_display_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="EditorFileDialog.DisplayMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="EditorFileDialog.Mode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_show_hidden_files">
- <return type="void">
- </return>
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="dir_selected">
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="file_selected">
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_OPEN_FILE" value="0">
- </constant>
- <constant name="MODE_OPEN_FILES" value="1">
- </constant>
- <constant name="MODE_OPEN_DIR" value="2">
- </constant>
- <constant name="MODE_OPEN_ANY" value="3">
- </constant>
- <constant name="MODE_SAVE_FILE" value="4">
- </constant>
- <constant name="ACCESS_RESOURCES" value="0">
- </constant>
- <constant name="ACCESS_USERDATA" value="1">
- </constant>
- <constant name="ACCESS_FILESYSTEM" value="2">
- </constant>
- </constants>
-</class>
-<class name="EditorFileSystem" inherits="Node" category="Core">
- <brief_description>
- Resource filesystem, as the editor sees it.
- </brief_description>
- <description>
- This object holds information of all resources in the filesystem, their types, etc.
- </description>
- <methods>
- <method name="get_file_type" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Get the type of the file, given the full path.
- </description>
- </method>
- <method name="get_filesystem">
- <return type="EditorFileSystemDirectory">
- </return>
- <description>
- Get the root directory object.
- </description>
- </method>
- <method name="get_filesystem_path">
- <return type="EditorFileSystemDirectory">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_scanning_progress" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the scan progress for 0 to 1 if the FS is being scanned.
- </description>
- </method>
- <method name="is_scanning" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true of the filesystem is being scanned.
- </description>
- </method>
- <method name="scan">
- <return type="void">
- </return>
- <description>
- Scan the filesystem for changes.
- </description>
- </method>
- <method name="scan_sources">
- <return type="void">
- </return>
- <description>
- Check if the source of any imported resource changed.
- </description>
- </method>
- <method name="update_file">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Update a file information. Call this if an external program (not Godot) modified the file.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="filesystem_changed">
- <description>
- Emitted if the filesystem changed.
- </description>
- </signal>
- <signal name="resources_reimported">
- <argument index="0" name="resources" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="sources_changed">
- <argument index="0" name="exist" type="bool">
- </argument>
- <description>
- Emitted if the source of any imported file changed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="EditorFileSystemDirectory" inherits="Object" category="Core">
- <brief_description>
- A diretory for the resource filesystem.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="find_dir_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="find_file_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_file" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_file_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_file_import_is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_file_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_file_type" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_name">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_parent">
- <return type="EditorFileSystemDirectory">
- </return>
- <description>
- </description>
- </method>
- <method name="get_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdir">
- <return type="EditorFileSystemDirectory">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_subdir_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EditorImportPlugin" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_import_options" qualifiers="virtual">
- <return type="Array">
- </return>
- <argument index="0" name="preset" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_importer_name" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_option_visibility" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="option" type="String">
- </argument>
- <argument index="1" name="options" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_preset_count" qualifiers="virtual">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_preset_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="preset" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_recognized_extensions" qualifiers="virtual">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_resource_type" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_save_extension" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visible_name" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="import" qualifiers="virtual">
- <return type="int">
- </return>
- <argument index="0" name="source_file" type="String">
- </argument>
- <argument index="1" name="save_path" type="String">
- </argument>
- <argument index="2" name="options" type="Dictionary">
- </argument>
- <argument index="3" name="r_platform_variants" type="Array">
- </argument>
- <argument index="4" name="r_gen_files" type="Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EditorInterface" inherits="Node" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="edit_resource">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_base_control">
- <return type="Control">
- </return>
- <description>
- </description>
- </method>
- <method name="get_edited_scene_root">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_editor_settings">
- <return type="EditorSettings">
- </return>
- <description>
- </description>
- </method>
- <method name="get_editor_viewport">
- <return type="Control">
- </return>
- <description>
- </description>
- </method>
- <method name="get_open_scenes" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_resource_filesystem">
- <return type="EditorFileSystem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_resource_previewer">
- <return type="EditorResourcePreview">
- </return>
- <description>
- </description>
- </method>
- <method name="get_script_editor">
- <return type="ScriptEditor">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection">
- <return type="EditorSelection">
- </return>
- <description>
- </description>
- </method>
- <method name="inspect_object">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="for_property" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_mesh_previews">
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="Array">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="open_scene_from_path">
- <return type="void">
- </return>
- <argument index="0" name="scene_filepath" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="reload_scene_from_path">
- <return type="void">
- </return>
- <argument index="0" name="scene_filepath" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="save_scene">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- <method name="save_scene_as">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="with_preview" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EditorPlugin" inherits="Node" category="Core">
- <brief_description>
- Used by the editor to extend its functionality.
- </brief_description>
- <description>
- Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
- </description>
- <methods>
- <method name="add_control_to_bottom_panel">
- <return type="ToolButton">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_bottom_panel].
- </description>
- </method>
- <method name="add_control_to_container">
- <return type="void">
- </return>
- <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI.
- Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
- If your plugin is being removed, also make sure to remove your custom controls too.
- </description>
- </method>
- <method name="add_control_to_dock">
- <return type="void">
- </return>
- <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Add the control to a specific dock slot (see DOCK_* enum for options).
- If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
- If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_docks].
- </description>
- </method>
- <method name="add_custom_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <argument index="1" name="base" type="String">
- </argument>
- <argument index="2" name="script" type="Script">
- </argument>
- <argument index="3" name="icon" type="Texture">
- </argument>
- <description>
- Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
- When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
- You can use the [method EditorPlugin.handles] to check if your custom object is being edited by checking the script or using 'is' keyword.
- During run-time, this will be a simple object with a script so this function does not need to be called then.
- </description>
- </method>
- <method name="add_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="importer" type="EditorImportPlugin">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_tool_submenu_item">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="submenu" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="apply_changes" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
- This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
- </description>
- </method>
- <method name="clear" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
- </description>
- </method>
- <method name="create_spatial_gizmo" qualifiers="virtual">
- <return type="EditorSpatialGizmo">
- </return>
- <argument index="0" name="for_spatial" type="Spatial">
- </argument>
- <description>
- This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin.
- </description>
- </method>
- <method name="edit" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <description>
- This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
- </description>
- </method>
- <method name="forward_canvas_gui_input" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="canvas_xform" type="Transform2D">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="forward_draw_over_canvas" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="canvas_xform" type="Transform2D">
- </argument>
- <argument index="1" name="canvas" type="Control">
- </argument>
- <description>
- This function is called every time the 2D canvas editor draws (which overlays over the edited scene). Drawing over the supplied control will draw over the edited scene. To convert from control coordinates to edited scene coordinates (including zoom and offset), a transform is also provided. If you require this control to be redraw, call [method update_canvas].
- </description>
- </method>
- <method name="forward_spatial_gui_input" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="camera" type="Camera">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <description>
- Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin.
- If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled].
- </description>
- </method>
- <method name="get_breakpoints" qualifiers="virtual">
- <return type="PoolStringArray">
- </return>
- <description>
- This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25
- </description>
- </method>
- <method name="get_editor_interface">
- <return type="EditorInterface">
- </return>
- <description>
- </description>
- </method>
- <method name="get_plugin_name" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_state" qualifiers="virtual">
- <return type="Dictionary">
- </return>
- <description>
- Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
- </description>
- </method>
- <method name="get_undo_redo">
- <return type="UndoRedo">
- </return>
- <description>
- Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
- </description>
- </method>
- <method name="get_window_layout" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="layout" type="ConfigFile">
- </argument>
- <description>
- Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
- </description>
- </method>
- <method name="handles" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <description>
- Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them.
- </description>
- </method>
- <method name="has_main_screen" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script).
- </description>
- </method>
- <method name="hide_bottom_panel">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="make_bottom_panel_item_visible">
- <return type="void">
- </return>
- <argument index="0" name="item" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_visible" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
- Remember that you have to manage the visibility of all your editor controls manually.
- </description>
- </method>
- <method name="queue_save_layout" qualifiers="const">
- <return type="void">
- </return>
- <description>
- Queue save the project's editor layout.
- </description>
- </method>
- <method name="remove_control_from_bottom_panel">
- <return type="void">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <description>
- Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly.
- </description>
- </method>
- <method name="remove_control_from_docks">
- <return type="void">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <description>
- Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly.
- </description>
- </method>
- <method name="remove_custom_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Remove a custom type added by [method EditorPlugin.add_custom_type]
- </description>
- </method>
- <method name="remove_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="importer" type="EditorImportPlugin">
- </argument>
- <description>
- </description>
- </method>
- <method name="save_external_data" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
- </description>
- </method>
- <method name="set_input_event_forwarding_always_enabled">
- <return type="void">
- </return>
- <description>
- Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
- </description>
- </method>
- <method name="set_state" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="state" type="Dictionary">
- </argument>
- <description>
- Restore the state saved by [method EditorPlugin.get_state].
- </description>
- </method>
- <method name="set_window_layout" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="layout" type="ConfigFile">
- </argument>
- <description>
- Restore the plugin GUI layout saved by [method EditorPlugin.get_window_layout].
- </description>
- </method>
- <method name="update_canvas">
- <return type="void">
- </return>
- <description>
- Updates the control used to draw the edited scene over the 2D canvas. This is used together with [method forward_canvas_input_event].
- </description>
- </method>
- </methods>
- <signals>
- <signal name="main_screen_changed">
- <argument index="0" name="screen_name" type="String">
- </argument>
- <description>
- Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
- </description>
- </signal>
- <signal name="scene_changed">
- <argument index="0" name="scene_root" type="Object">
- </argument>
- <description>
- Emitted when user change scene. The argument is a root node of freshly opened scene.
- </description>
- </signal>
- <signal name="scene_closed">
- <argument index="0" name="filepath" type="String">
- </argument>
- <description>
- Emitted when user close scene. The argument is file path to a closed scene.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="CONTAINER_TOOLBAR" value="0">
- </constant>
- <constant name="CONTAINER_SPATIAL_EDITOR_MENU" value="1">
- </constant>
- <constant name="CONTAINER_SPATIAL_EDITOR_SIDE" value="2">
- </constant>
- <constant name="CONTAINER_SPATIAL_EDITOR_BOTTOM" value="3">
- </constant>
- <constant name="CONTAINER_CANVAS_EDITOR_MENU" value="4">
- </constant>
- <constant name="CONTAINER_CANVAS_EDITOR_SIDE" value="5">
- </constant>
- <constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="7">
- </constant>
- <constant name="DOCK_SLOT_LEFT_UL" value="0">
- </constant>
- <constant name="DOCK_SLOT_LEFT_BL" value="1">
- </constant>
- <constant name="DOCK_SLOT_LEFT_UR" value="2">
- </constant>
- <constant name="DOCK_SLOT_LEFT_BR" value="3">
- </constant>
- <constant name="DOCK_SLOT_RIGHT_UL" value="4">
- </constant>
- <constant name="DOCK_SLOT_RIGHT_BL" value="5">
- </constant>
- <constant name="DOCK_SLOT_RIGHT_UR" value="6">
- </constant>
- <constant name="DOCK_SLOT_RIGHT_BR" value="7">
- </constant>
- <constant name="DOCK_SLOT_MAX" value="8">
- </constant>
- </constants>
-</class>
-<class name="EditorResourcePreview" inherits="Node" category="Core">
- <brief_description>
- Helper to generate previews of reources or files.
- </brief_description>
- <description>
- This object is used to generate previews for resources of files.
- </description>
- <methods>
- <method name="add_preview_generator">
- <return type="void">
- </return>
- <argument index="0" name="generator" type="EditorResourcePreviewGenerator">
- </argument>
- <description>
- Create an own, custom preview generator.
- </description>
- </method>
- <method name="check_for_invalidation">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Check if the resource changed, if so it will be invalidated and the corresponding signal emitted.
- </description>
- </method>
- <method name="queue_edited_resource_preview">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="receiver_func" type="String">
- </argument>
- <argument index="3" name="userdata" type="Variant">
- </argument>
- <description>
- Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
- </description>
- </method>
- <method name="queue_resource_preview">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="receiver_func" type="String">
- </argument>
- <argument index="3" name="userdata" type="Variant">
- </argument>
- <description>
- Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
- </description>
- </method>
- <method name="remove_preview_generator">
- <return type="void">
- </return>
- <argument index="0" name="generator" type="EditorResourcePreviewGenerator">
- </argument>
- <description>
- Remove a custom preview generator.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="preview_invalidated">
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- If a preview was invalidated (changed) this signal will emit (using the path of the preview)
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core">
- <brief_description>
- Custom generator of previews.
- </brief_description>
- <description>
- Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at.
- </description>
- <methods>
- <method name="generate" qualifiers="virtual">
- <return type="Texture">
- </return>
- <argument index="0" name="from" type="Resource">
- </argument>
- <description>
- Generate a preview from a given resource. This must be always implemented.
- Returning an empty texture is an OK way to fail and let another generator take care.
- Care must be taken because this function is always called from a thread (not the main thread).
- </description>
- </method>
- <method name="generate_from_path" qualifiers="virtual">
- <return type="Texture">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Generate a preview directly from a path, implementing this is optional, as default code will load and call generate()
- Returning an empty texture is an OK way to fail and let another generator take care.
- Care must be taken because this function is always called from a thread (not the main thread).
- </description>
- </method>
- <method name="handles" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Return if your generator supports this resource type.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EditorScript" inherits="Reference" category="Core">
- <brief_description>
- Simple script to perform changes in the currently edited scene.
- </brief_description>
- <description>
- This script can be run from the Scene -&gt; Run Script menu option.
- </description>
- <methods>
- <method name="_run" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="add_root_node">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_editor_interface">
- <return type="EditorInterface">
- </return>
- <description>
- </description>
- </method>
- <method name="get_scene">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EditorSelection" inherits="Object" category="Core">
- <brief_description>
- Manages the SceneTree selection in the editor.
- </brief_description>
- <description>
- This object manages the SceneTree selection in the editor.
- </description>
- <methods>
- <method name="add_node">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Add a node to the selection.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the selection.
- </description>
- </method>
- <method name="get_selected_nodes">
- <return type="Array">
- </return>
- <description>
- Get the list of selectes nodes.
- </description>
- </method>
- <method name="get_transformable_selected_nodes">
- <return type="Array">
- </return>
- <description>
- Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild.
- </description>
- </method>
- <method name="remove_node">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Remove a node from the selection.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="selection_changed">
- <description>
- Emitted when the selection changes.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="EditorSettings" inherits="Resource" category="Core">
- <brief_description>
- Object that holds the project-independent editor settings.
- </brief_description>
- <description>
- Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
- Accessing the settings is done by using the regular [Object] API, such as:
- [codeblock]
- settings.set(prop,value)
- settings.get(prop)
- list_of_settings = settings.get_property_list()
- [/codeblock]
- </description>
- <methods>
- <method name="add_property_info">
- <return type="void">
- </return>
- <argument index="0" name="info" type="Dictionary">
- </argument>
- <description>
- Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
- Example:
- [codeblock]
- editor_settings.set("category/property_name", 0)
-
- var property_info = {
- "name": "category/property_name",
- "type": TYPE_INT,
- "hint": PROPERTY_HINT_ENUM,
- "hint_string": "one,two,three"
- }
-
- editor_settings.add_property_info(property_info)
- [/codeblock]
- </description>
- </method>
- <method name="erase">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- Erase a given setting (pass full property path).
- </description>
- </method>
- <method name="get_favorite_dirs" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Get the list of favorite directories for this project.
- </description>
- </method>
- <method name="get_project_settings_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
- </description>
- </method>
- <method name="get_recent_dirs" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Get the list of recently visited folders in the file dialog for this project.
- </description>
- </method>
- <method name="get_settings_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the global settings path for the engine. Inside this path you can find some standard paths such as:
- settings/tmp - used for temporary storage of files
- settings/templates - where export templates are located
- </description>
- </method>
- <method name="set_favorite_dirs">
- <return type="void">
- </return>
- <argument index="0" name="dirs" type="PoolStringArray">
- </argument>
- <description>
- Set the list of favorite directories for this project.
- </description>
- </method>
- <method name="set_recent_dirs">
- <return type="void">
- </return>
- <argument index="0" name="dirs" type="PoolStringArray">
- </argument>
- <description>
- Set the list of recently visited folders in the file dialog for this project.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="settings_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core">
- <brief_description>
- Custom gizmo for editing Spatial objects.
- </brief_description>
- <description>
- Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo].
- </description>
- <methods>
- <method name="add_collision_segments">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_collision_triangles">
- <return type="void">
- </return>
- <argument index="0" name="triangles" type="TriangleMesh">
- </argument>
- <description>
- Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
- </description>
- </method>
- <method name="add_handles">
- <return type="void">
- </return>
- <argument index="0" name="handles" type="PoolVector3Array">
- </argument>
- <argument index="1" name="billboard" type="bool" default="false">
- </argument>
- <argument index="2" name="secondary" type="bool" default="false">
- </argument>
- <description>
- Add a list of handles (points) which can be used to deform the object being edited.
- There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].
- </description>
- </method>
- <method name="add_lines">
- <return type="void">
- </return>
- <argument index="0" name="lines" type="PoolVector3Array">
- </argument>
- <argument index="1" name="material" type="Material">
- </argument>
- <argument index="2" name="billboard" type="bool" default="false">
- </argument>
- <description>
- Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
- </description>
- </method>
- <method name="add_mesh">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="ArrayMesh">
- </argument>
- <argument index="1" name="billboard" type="bool" default="false">
- </argument>
- <argument index="2" name="skeleton" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_unscaled_billboard">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <argument index="1" name="default_scale" type="float" default="1">
- </argument>
- <description>
- Add an unscaled billboard for visualization. Call this function during [method redraw].
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="commit_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="restore" type="Variant">
- </argument>
- <argument index="2" name="cancel" type="bool" default="false">
- </argument>
- <description>
- Commit a handle being edited (handles must have been prevously added by [method add_handles]).
- If the cancel parameter is true, an option to restore the edited value to the original is provided.
- </description>
- </method>
- <method name="get_handle_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Get the name of an edited handle (handles must have been previously added by [method add_handles]).
- Handles can be named for reference to the user when editing.
- </description>
- </method>
- <method name="get_handle_value" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]
- </description>
- </method>
- <method name="redraw" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called).
- </description>
- </method>
- <method name="set_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="camera" type="Camera">
- </argument>
- <argument index="2" name="point" type="Vector2">
- </argument>
- <description>
- This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
- The [Camera] is also provided so screen coordinates can be converted to raycasts.
- </description>
- </method>
- <method name="set_spatial_node">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="EncodedObjectAsID" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_object_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_object_id">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Engine" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_frames_drawn">
- <return type="int">
- </return>
- <description>
- Return the total amount of frames drawn.
- </description>
- </method>
- <method name="get_frames_per_second" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the frames per second of the running game.
- </description>
- </method>
- <method name="get_iterations_per_second" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of fixed iterations per second (for fixed process and physics).
- </description>
- </method>
- <method name="get_main_loop" qualifiers="const">
- <return type="MainLoop">
- </return>
- <description>
- Return the main loop object (see [MainLoop] and [SceneTree]).
- </description>
- </method>
- <method name="get_target_fps" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_time_scale">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_version_info" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- Returns the current engine version information in a Dictionary.
-
- "major" - Holds the major version number as a String
- "minor" - Holds the minor version number as a String
- "patch" - Holds the patch version number as a String
- "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
- "revision" - Holds the revision (e.g. "custom-build") as a String
- "string" - major + minor + patch + status + revision in a single String
- </description>
- </method>
- <method name="is_editor_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_in_fixed_frame" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_editor_hint">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_iterations_per_second">
- <return type="void">
- </return>
- <argument index="0" name="iterations_per_second" type="int">
- </argument>
- <description>
- Set the amount of fixed iterations per second (for fixed process and physics).
- </description>
- </method>
- <method name="set_target_fps">
- <return type="void">
- </return>
- <argument index="0" name="target_fps" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_time_scale">
- <return type="void">
- </return>
- <argument index="0" name="time_scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Environment" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_adjustment_brightness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_adjustment_color_correction" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_adjustment_contrast" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_adjustment_saturation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ambient_light_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ambient_light_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ambient_light_sky_contribution" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_background" qualifiers="const">
- <return type="int" enum="Environment.BGMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bg_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bg_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_canvas_max_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_far_amount" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_far_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_far_quality" qualifiers="const">
- <return type="int" enum="Environment.DOFBlurQuality">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_far_transition" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_near_amount" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_near_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_near_quality" qualifiers="const">
- <return type="int" enum="Environment.DOFBlurQuality">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dof_blur_near_transition" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_depth_begin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_depth_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_height_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_height_max" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_height_min" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_sun_amount" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_sun_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fog_transmit_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_blend_mode" qualifiers="const">
- <return type="int" enum="Environment.GlowBlendMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_bloom" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_hdr_bleed_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_hdr_bleed_threshold" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_intensity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_glow_strength" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky" qualifiers="const">
- <return type="Sky">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_direct_light_affect" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_intensity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_intensity2" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssao_radius2" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssr_depth_tolerance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssr_fade_in" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssr_fade_out" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ssr_max_steps" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_auto_exposure" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_auto_exposure_grey" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_auto_exposure_max" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_auto_exposure_min" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_auto_exposure_speed" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_exposure" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemap_white" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tonemapper" qualifiers="const">
- <return type="int" enum="Environment.ToneMapper">
- </return>
- <description>
- </description>
- </method>
- <method name="is_adjustment_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_dof_blur_far_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_dof_blur_near_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_fog_depth_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_fog_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_fog_height_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_fog_transmit_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_glow_bicubic_upscale_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_glow_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_glow_level_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_ssao_blur_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_ssao_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_ssr_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_ssr_rough" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_adjustment_brightness">
- <return type="void">
- </return>
- <argument index="0" name="brightness" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_adjustment_color_correction">
- <return type="void">
- </return>
- <argument index="0" name="color_correction" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_adjustment_contrast">
- <return type="void">
- </return>
- <argument index="0" name="contrast" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_adjustment_enable">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_adjustment_saturation">
- <return type="void">
- </return>
- <argument index="0" name="saturation" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ambient_light_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ambient_light_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ambient_light_sky_contribution">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_background">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Environment.BGMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bg_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bg_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_canvas_max_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_far_amount">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_far_distance">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_far_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_far_quality">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="int" enum="Environment.DOFBlurQuality">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_far_transition">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_near_amount">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_near_distance">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_near_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_near_quality">
- <return type="void">
- </return>
- <argument index="0" name="level" type="int" enum="Environment.DOFBlurQuality">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dof_blur_near_transition">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_depth_begin">
- <return type="void">
- </return>
- <argument index="0" name="distance" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_depth_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_depth_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_height_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_height_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_height_max">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_height_min">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_sun_amount">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_sun_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_transmit_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fog_transmit_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_bicubic_upscale">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_blend_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Environment.GlowBlendMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_bloom">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_hdr_bleed_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_hdr_bleed_threshold">
- <return type="void">
- </return>
- <argument index="0" name="threshold" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_intensity">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_level">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_glow_strength">
- <return type="void">
- </return>
- <argument index="0" name="strength" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky">
- <return type="void">
- </return>
- <argument index="0" name="sky" type="Sky">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_bias">
- <return type="void">
- </return>
- <argument index="0" name="bias" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_blur">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_direct_light_affect">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_intensity">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_intensity2">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssao_radius2">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_depth_tolerance">
- <return type="void">
- </return>
- <argument index="0" name="depth_tolerance" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_fade_in">
- <return type="void">
- </return>
- <argument index="0" name="fade_in" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_fade_out">
- <return type="void">
- </return>
- <argument index="0" name="fade_out" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_max_steps">
- <return type="void">
- </return>
- <argument index="0" name="max_steps" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ssr_rough">
- <return type="void">
- </return>
- <argument index="0" name="rough" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_auto_exposure">
- <return type="void">
- </return>
- <argument index="0" name="auto_exposure" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_auto_exposure_grey">
- <return type="void">
- </return>
- <argument index="0" name="exposure_grey" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_auto_exposure_max">
- <return type="void">
- </return>
- <argument index="0" name="exposure_max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_auto_exposure_min">
- <return type="void">
- </return>
- <argument index="0" name="exposure_min" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_auto_exposure_speed">
- <return type="void">
- </return>
- <argument index="0" name="exposure_speed" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_exposure">
- <return type="void">
- </return>
- <argument index="0" name="exposure" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemap_white">
- <return type="void">
- </return>
- <argument index="0" name="white" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tonemapper">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Environment.ToneMapper">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" brief="">
- </member>
- <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction" brief="">
- </member>
- <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" brief="">
- </member>
- <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" brief="">
- </member>
- <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" brief="">
- </member>
- <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" brief="">
- </member>
- <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" brief="">
- </member>
- <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" brief="">
- </member>
- <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" brief="">
- </member>
- <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" brief="">
- </member>
- <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" brief="">
- </member>
- <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" brief="">
- </member>
- <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" brief="">
- </member>
- <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" brief="">
- </member>
- <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" brief="">
- </member>
- <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" brief="">
- </member>
- <member name="background_mode" type="int" setter="set_background" getter="get_background" brief="" enum="Environment.BGMode">
- </member>
- <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky" brief="">
- </member>
- <member name="background_sky_scale" type="float" setter="set_sky_scale" getter="get_sky_scale" brief="">
- </member>
- <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" brief="">
- </member>
- <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" brief="">
- </member>
- <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" brief="">
- </member>
- <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" brief="" enum="Environment.DOFBlurQuality">
- </member>
- <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" brief="">
- </member>
- <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" brief="">
- </member>
- <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" brief="">
- </member>
- <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" brief="">
- </member>
- <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" brief="" enum="Environment.DOFBlurQuality">
- </member>
- <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" brief="">
- </member>
- <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" brief="">
- </member>
- <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" brief="">
- </member>
- <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" brief="">
- </member>
- <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" brief="">
- </member>
- <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" brief="">
- </member>
- <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" brief="">
- </member>
- <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" brief="">
- </member>
- <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" brief="">
- </member>
- <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min" brief="">
- </member>
- <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" brief="">
- </member>
- <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" brief="">
- </member>
- <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" brief="">
- </member>
- <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" brief="">
- </member>
- <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" brief="">
- </member>
- <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" brief="" enum="Environment.GlowBlendMode">
- </member>
- <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" brief="">
- </member>
- <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" brief="">
- </member>
- <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" brief="">
- </member>
- <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" brief="">
- </member>
- <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" brief="">
- </member>
- <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" brief="">
- </member>
- <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" brief="">
- </member>
- <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" brief="">
- </member>
- <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" brief="">
- </member>
- <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" brief="">
- </member>
- <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" brief="">
- </member>
- <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" brief="">
- </member>
- <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" brief="">
- </member>
- <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" brief="">
- </member>
- <member name="ssao_blur" type="bool" setter="set_ssao_blur" getter="is_ssao_blur_enabled" brief="">
- </member>
- <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" brief="">
- </member>
- <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" brief="">
- </member>
- <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" brief="">
- </member>
- <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" brief="">
- </member>
- <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" brief="">
- </member>
- <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" brief="">
- </member>
- <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" brief="">
- </member>
- <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" brief="">
- </member>
- <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" brief="" enum="Environment.ToneMapper">
- </member>
- <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" brief="">
- </member>
- </members>
- <constants>
- <constant name="BG_KEEP" value="4">
- </constant>
- <constant name="BG_CLEAR_COLOR" value="0">
- </constant>
- <constant name="BG_COLOR" value="1">
- </constant>
- <constant name="BG_SKY" value="2">
- </constant>
- <constant name="BG_CANVAS" value="3">
- </constant>
- <constant name="BG_MAX" value="5">
- </constant>
- <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0">
- </constant>
- <constant name="GLOW_BLEND_MODE_SCREEN" value="1">
- </constant>
- <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2">
- </constant>
- <constant name="GLOW_BLEND_MODE_REPLACE" value="3">
- </constant>
- <constant name="TONE_MAPPER_LINEAR" value="0">
- </constant>
- <constant name="TONE_MAPPER_REINHARDT" value="1">
- </constant>
- <constant name="TONE_MAPPER_FILMIC" value="2">
- </constant>
- <constant name="TONE_MAPPER_ACES" value="3">
- </constant>
- <constant name="DOF_BLUR_QUALITY_LOW" value="0">
- </constant>
- <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1">
- </constant>
- <constant name="DOF_BLUR_QUALITY_HIGH" value="2">
- </constant>
- </constants>
-</class>
-<class name="File" inherits="Reference" category="Core">
- <brief_description>
- Type to handle file reading and writing operations.
- </brief_description>
- <description>
- File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example.
- Here's a sample on how to write and read from a file:
- [codeblock]
- func save(content):
- var file = File.new()
- file.open("user://save_game.dat", file.WRITE)
- file.store_string(content)
- file.close()
-
- func load():
- var file = File.new()
- file.open("user://save_game.dat", file.READ)
- var content = file.get_as_text()
- file.close()
- return content
- [/codeblock]
- </description>
- <methods>
- <method name="close">
- <return type="void">
- </return>
- <description>
- Close the currently opened file.
- </description>
- </method>
- <method name="eof_reached" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the file cursor reached the end of the file.
- </description>
- </method>
- <method name="file_exists" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Get whether or not the file in the specified path exists.
- </description>
- </method>
- <method name="get_16" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the next 16 bits from the file as an integer.
- </description>
- </method>
- <method name="get_32" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the next 32 bits from the file as an integer.
- </description>
- </method>
- <method name="get_64" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the next 64 bits from the file as an integer.
- </description>
- </method>
- <method name="get_8" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the next 8 bits from the file as an integer.
- </description>
- </method>
- <method name="get_as_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the whole file as a [String].
- </description>
- </method>
- <method name="get_buffer" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="len" type="int">
- </argument>
- <description>
- Get next len bytes of the file as a [PoolByteArray].
- </description>
- </method>
- <method name="get_csv_line" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="delim" type="String" default="&quot;,&quot;">
- </argument>
- <description>
- Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
- </description>
- </method>
- <method name="get_double" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the next 64 bits from the file as a floating point number.
- </description>
- </method>
- <method name="get_endian_swap">
- <return type="bool">
- </return>
- <description>
- Get whether endian swap is enabled for this file.
- </description>
- </method>
- <method name="get_error" qualifiers="const">
- <return type="int" enum="Error">
- </return>
- <description>
- Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
- </description>
- </method>
- <method name="get_float" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the next 32 bits from the file as a floating point number.
- </description>
- </method>
- <method name="get_len" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the size of the file in bytes.
- </description>
- </method>
- <method name="get_line" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the next line of the file as a [String].
- </description>
- </method>
- <method name="get_md5" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Return a md5 String representing the file at the given path or an empty [String] on failure.
- </description>
- </method>
- <method name="get_modified_time" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_pascal_string">
- <return type="String">
- </return>
- <description>
- Get a [String] saved in Pascal format from the file.
- </description>
- </method>
- <method name="get_pos" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the file cursor position.
- </description>
- </method>
- <method name="get_real" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the next bits from the file as a floating point number.
- </description>
- </method>
- <method name="get_sha256" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Return a sha256 String representing the file at the given path or an empty [String] on failure.
- </description>
- </method>
- <method name="get_var" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- Get the next Variant value from the file.
- </description>
- </method>
- <method name="is_open" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the file is currently opened.
- </description>
- </method>
- <method name="open">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="flags" type="int">
- </argument>
- <description>
- Open the file for writing or reading, depending on the flags.
- </description>
- </method>
- <method name="open_compressed">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="mode_flags" type="int">
- </argument>
- <argument index="2" name="compression_mode" type="int" default="0">
- </argument>
- <description>
- Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants.
- </description>
- </method>
- <method name="open_encrypted">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="mode_flags" type="int">
- </argument>
- <argument index="2" name="key" type="PoolByteArray">
- </argument>
- <description>
- Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
- </description>
- </method>
- <method name="open_encrypted_with_pass">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="mode_flags" type="int">
- </argument>
- <argument index="2" name="pass" type="String">
- </argument>
- <description>
- Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file).
- </description>
- </method>
- <method name="seek_end">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="int" default="0">
- </argument>
- <description>
- Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
- </description>
- </method>
- <method name="set_endian_swap">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines.
- Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
- </description>
- </method>
- <method name="store_16">
- <return type="void">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Store an integer as 16 bits in the file.
- </description>
- </method>
- <method name="store_32">
- <return type="void">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Store an integer as 32 bits in the file.
- </description>
- </method>
- <method name="store_64">
- <return type="void">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Store an integer as 64 bits in the file.
- </description>
- </method>
- <method name="store_8">
- <return type="void">
- </return>
- <argument index="0" name="value" type="int">
- </argument>
- <description>
- Store an integer as 8 bits in the file.
- </description>
- </method>
- <method name="store_buffer">
- <return type="void">
- </return>
- <argument index="0" name="buffer" type="PoolByteArray">
- </argument>
- <description>
- Store the given array of bytes in the file.
- </description>
- </method>
- <method name="store_double">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Store a floating point number as 64 bits in the file.
- </description>
- </method>
- <method name="store_float">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Store a floating point number as 32 bits in the file.
- </description>
- </method>
- <method name="store_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="String">
- </argument>
- <description>
- Store the given [String] as a line in the file.
- </description>
- </method>
- <method name="store_pascal_string">
- <return type="void">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
- </description>
- </method>
- <method name="store_real">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Store a floating point number in the file.
- </description>
- </method>
- <method name="store_string">
- <return type="void">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Store the given [String] in the file.
- </description>
- </method>
- <method name="store_var">
- <return type="void">
- </return>
- <argument index="0" name="value" type="Variant">
- </argument>
- <description>
- Store any Variant value in the file.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="READ" value="1">
- Open the file for reading.
- </constant>
- <constant name="WRITE" value="2">
- Open the file for writing. Create it if the file not exists and truncate if it exists.
- </constant>
- <constant name="READ_WRITE" value="3">
- Open the file for reading and writing, without truncating the file.
- </constant>
- <constant name="WRITE_READ" value="7">
- Open the file for reading and writing. Create it if the file not exists and truncate if it exists.
- </constant>
- <constant name="COMPRESSION_FASTLZ" value="0">
- Use the FastLZ compression method.
- </constant>
- <constant name="COMPRESSION_DEFLATE" value="1">
- Use the Deflate compression method.
- </constant>
- <constant name="COMPRESSION_ZSTD" value="2">
- Use the Zstd compression method.
- </constant>
- <constant name="COMPRESSION_GZIP" value="3">
- </constant>
- </constants>
-</class>
-<class name="FileDialog" inherits="ConfirmationDialog" category="Core">
- <brief_description>
- Dialog for selecting files or directories in the filesystem.
- </brief_description>
- <description>
- FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
- </description>
- <methods>
- <method name="add_filter">
- <return type="void">
- </return>
- <argument index="0" name="filter" type="String">
- </argument>
- <description>
- Add a custom filter. Filter format is: "mask ; description", example (C++): dialog-&gt;add_filter("*.png ; PNG Images");
- </description>
- </method>
- <method name="clear_filters">
- <return type="void">
- </return>
- <description>
- Clear all the added filters in the dialog.
- </description>
- </method>
- <method name="get_access" qualifiers="const">
- <return type="int" enum="FileDialog.Access">
- </return>
- <description>
- Return the file access permission of the dialog.
- </description>
- </method>
- <method name="get_current_dir" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the current working directory of the file dialog.
- </description>
- </method>
- <method name="get_current_file" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the current selected file of the file dialog (empty if none).
- </description>
- </method>
- <method name="get_current_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the current selected path (directory and file) of the file dialog (empty if none).
- </description>
- </method>
- <method name="get_filters" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="FileDialog.Mode">
- </return>
- <description>
- Get the file dialog mode from the MODE_* enum.
- </description>
- </method>
- <method name="get_vbox">
- <return type="VBoxContainer">
- </return>
- <description>
- Return the vertical box container of the dialog, custom controls can be added to it.
- </description>
- </method>
- <method name="invalidate">
- <return type="void">
- </return>
- <description>
- Invalidate and update the current dialog content list.
- </description>
- </method>
- <method name="is_showing_hidden_files" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the diaog allows show hidden files.
- </description>
- </method>
- <method name="set_access">
- <return type="void">
- </return>
- <argument index="0" name="access" type="int" enum="FileDialog.Access">
- </argument>
- <description>
- Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
- </description>
- </method>
- <method name="set_current_dir">
- <return type="void">
- </return>
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- Set the current working directory of the file dialog.
- </description>
- </method>
- <method name="set_current_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- Set the current selected file name of the file dialog.
- </description>
- </method>
- <method name="set_current_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Set the current selected file path of the file dialog.
- </description>
- </method>
- <method name="set_filters">
- <return type="void">
- </return>
- <argument index="0" name="filters" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="FileDialog.Mode">
- </argument>
- <description>
- Set the file dialog mode from the MODE_* enum.
- </description>
- </method>
- <method name="set_show_hidden_files">
- <return type="void">
- </return>
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- Set the dialog should show hidden files.
- </description>
- </method>
- </methods>
- <members>
- <member name="access" type="int" setter="set_access" getter="get_access" brief="" enum="FileDialog.Access">
- </member>
- <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="FileDialog.Mode">
- </member>
- <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" brief="">
- </member>
- </members>
- <signals>
- <signal name="dir_selected">
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- Event emitted when the user selects a directory.
- </description>
- </signal>
- <signal name="file_selected">
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Event emitted when the user selects a file (double clicks it or presses the OK button).
- </description>
- </signal>
- <signal name="files_selected">
- <argument index="0" name="paths" type="PoolStringArray">
- </argument>
- <description>
- Event emitted when the user selects multiple files.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_OPEN_FILE" value="0">
- The dialog allows the selection of one, and only one file.
- </constant>
- <constant name="MODE_OPEN_FILES" value="1">
- The dialog allows the selection of multiple files.
- </constant>
- <constant name="MODE_OPEN_DIR" value="2">
- The dialog functions as a folder selector, disallowing the selection of any file.
- </constant>
- <constant name="MODE_OPEN_ANY" value="3">
- The dialog allows the selection of a file or a directory.
- </constant>
- <constant name="MODE_SAVE_FILE" value="4">
- The dialog will warn when a file exists.
- </constant>
- <constant name="ACCESS_RESOURCES" value="0">
- The dialog allows the selection of file and directory.
- </constant>
- <constant name="ACCESS_USERDATA" value="1">
- The dialog allows ascess files under [Resource] path(res://) .
- </constant>
- <constant name="ACCESS_FILESYSTEM" value="2">
- The dialog allows ascess files in whole file system.
- </constant>
- </constants>
- <theme_items>
- <theme_item name="files_disabled" type="Color">
- </theme_item>
- <theme_item name="folder" type="Texture">
- </theme_item>
- <theme_item name="reload" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="Font" inherits="Resource" category="Core">
- <brief_description>
- Internationalized font and text drawing support.
- </brief_description>
- <description>
- Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
- </description>
- <methods>
- <method name="draw" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="string" type="String">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="clip_w" type="int" default="-1">
- </argument>
- <description>
- Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
- </description>
- </method>
- <method name="draw_char" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="char" type="int">
- </argument>
- <argument index="3" name="next" type="int" default="-1">
- </argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <description>
- Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
- </description>
- </method>
- <method name="get_ascent" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the font ascent (number of pixels above the baseline).
- </description>
- </method>
- <method name="get_descent" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the font descent (number of pixels below the baseline).
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the total font height (ascent plus descent) in pixels.
- </description>
- </method>
- <method name="get_string_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Return the size of a string, taking kerning and advance into account.
- </description>
- </method>
- <method name="is_distance_field_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="update_changes">
- <return type="void">
- </return>
- <description>
- After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="FuncRef" inherits="Reference" category="Core">
- <brief_description>
- Reference to a function in an object.
- </brief_description>
- <description>
- In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments.
- However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called.
- </description>
- <methods>
- <method name="call_func" qualifiers="vararg">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="set_function">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Set the name of the function to call on the object, without parentheses or any parameters.
- </description>
- </method>
- <method name="set_instance">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <description>
- Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GDFunctionState" inherits="Reference" category="Core">
- <brief_description>
- State of a function call after yielding.
- </brief_description>
- <description>
- Calling [method @GDScript.yield] within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling [method resume] on this state object.
- </description>
- <methods>
- <method name="is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="extended_check" type="bool" default="false">
- </argument>
- <description>
- Check whether the function call may be resumed. This is not the case if the function state was already resumed.
- If [code]extended_check[/code] is enabled, it also checks if the associated script and object still exist. The extended check is done in debug mode as part of [method GDFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point.
- </description>
- </method>
- <method name="resume">
- <return type="Variant">
- </return>
- <argument index="0" name="arg" type="Variant" default="null">
- </argument>
- <description>
- Resume execution of the yielded function call.
- If handed an argument, return the argument from the [method @GDScript.yield] call in the yielded function call. You can pass e.g. an [Array] to hand multiple arguments.
- This function returns what the resumed function call returns, possibly another function state if yielded again.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="completed">
- <argument index="0" name="result" type="Nil">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="GDNative" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="call_native">
- <return type="Variant">
- </return>
- <argument index="0" name="procedure_name" type="String">
- </argument>
- <argument index="1" name="arguments" type="String">
- </argument>
- <argument index="2" name="arg2" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_library">
- <return type="GDNativeLibrary">
- </return>
- <description>
- </description>
- </method>
- <method name="initialize">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_library">
- <return type="void">
- </return>
- <argument index="0" name="library" type="GDNativeLibrary">
- </argument>
- <description>
- </description>
- </method>
- <method name="terminate">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="GDNativeClass" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="new">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GDNativeLibrary" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_library_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="platform" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_singleton_gdnative" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_library_path">
- <return type="void">
- </return>
- <argument index="0" name="platform" type="String">
- </argument>
- <argument index="1" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_singleton_gdnative">
- <return type="void">
- </return>
- <argument index="0" name="singleton" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="singleton_gdnative" type="bool" setter="set_singleton_gdnative" getter="is_singleton_gdnative" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="GDScript" inherits="Script" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_as_byte_code" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="new" qualifiers="vararg">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GIProbe" inherits="VisualInstance" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="bake">
- <return type="void">
- </return>
- <argument index="0" name="from_node" type="Node" default="null">
- </argument>
- <argument index="1" name="create_visual_debug" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="debug_bake">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dynamic_range" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_extents" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_probe_data" qualifiers="const">
- <return type="GIProbeData">
- </return>
- <description>
- </description>
- </method>
- <method name="get_propagation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdiv" qualifiers="const">
- <return type="int" enum="GIProbe.Subdiv">
- </return>
- <description>
- </description>
- </method>
- <method name="is_compressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_interior" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bias">
- <return type="void">
- </return>
- <argument index="0" name="max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_compress">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dynamic_range">
- <return type="void">
- </return>
- <argument index="0" name="max" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_energy">
- <return type="void">
- </return>
- <argument index="0" name="max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_extents">
- <return type="void">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_interior">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_normal_bias">
- <return type="void">
- </return>
- <argument index="0" name="max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_probe_data">
- <return type="void">
- </return>
- <argument index="0" name="data" type="GIProbeData">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_propagation">
- <return type="void">
- </return>
- <argument index="0" name="max" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdiv">
- <return type="void">
- </return>
- <argument index="0" name="subdiv" type="int" enum="GIProbe.Subdiv">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="bias" type="float" setter="set_bias" getter="get_bias" brief="">
- </member>
- <member name="compress" type="bool" setter="set_compress" getter="is_compressed" brief="">
- </member>
- <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data" brief="">
- </member>
- <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" brief="">
- </member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy" brief="">
- </member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" brief="">
- </member>
- <member name="interior" type="bool" setter="set_interior" getter="is_interior" brief="">
- </member>
- <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" brief="">
- </member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" brief="">
- </member>
- <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" brief="" enum="GIProbe.Subdiv">
- </member>
- </members>
- <constants>
- <constant name="SUBDIV_64" value="0">
- </constant>
- <constant name="SUBDIV_128" value="1">
- </constant>
- <constant name="SUBDIV_256" value="2">
- </constant>
- <constant name="SUBDIV_MAX" value="4">
- </constant>
- </constants>
-</class>
-<class name="GIProbeData" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bounds" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cell_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dynamic_data" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_dynamic_range" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_propagation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_to_cell_xform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="is_compressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_interior" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bias">
- <return type="void">
- </return>
- <argument index="0" name="bias" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bounds">
- <return type="void">
- </return>
- <argument index="0" name="bounds" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cell_size">
- <return type="void">
- </return>
- <argument index="0" name="cell_size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_compress">
- <return type="void">
- </return>
- <argument index="0" name="compress" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dynamic_data">
- <return type="void">
- </return>
- <argument index="0" name="dynamic_data" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_dynamic_range">
- <return type="void">
- </return>
- <argument index="0" name="dynamic_range" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_interior">
- <return type="void">
- </return>
- <argument index="0" name="interior" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_normal_bias">
- <return type="void">
- </return>
- <argument index="0" name="bias" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_propagation">
- <return type="void">
- </return>
- <argument index="0" name="propagation" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_to_cell_xform">
- <return type="void">
- </return>
- <argument index="0" name="to_cell_xform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="bias" type="float" setter="set_bias" getter="get_bias" brief="">
- </member>
- <member name="bounds" type="Rect3" setter="set_bounds" getter="get_bounds" brief="">
- </member>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" brief="">
- </member>
- <member name="compress" type="bool" setter="set_compress" getter="is_compressed" brief="">
- </member>
- <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data" brief="">
- </member>
- <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" brief="">
- </member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy" brief="">
- </member>
- <member name="interior" type="bool" setter="set_interior" getter="is_interior" brief="">
- </member>
- <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" brief="">
- </member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" brief="">
- </member>
- <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Generic6DOFJoint" inherits="Joint" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_flag_x" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flag_y" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flag_z" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_x" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_y" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_z" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag_x">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag_y">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag_z">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param_x">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param_y">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param_z">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" brief="">
- </member>
- <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x" brief="">
- </member>
- <member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x" brief="">
- </member>
- <member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" brief="">
- </member>
- <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y" brief="">
- </member>
- <member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y" brief="">
- </member>
- <member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" brief="">
- </member>
- <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z" brief="">
- </member>
- <member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z" brief="">
- </member>
- <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" brief="">
- </member>
- <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" brief="">
- </member>
- <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" brief="">
- </member>
- <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" brief="">
- </member>
- <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="linear_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="linear_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="linear_limit_x/upper_distance" type="float" setter="set_param_x" getter="get_param_x" brief="">
- </member>
- <member name="linear_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" brief="">
- </member>
- <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="linear_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="linear_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="linear_limit_y/upper_distance" type="float" setter="set_param_y" getter="get_param_y" brief="">
- </member>
- <member name="linear_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" brief="">
- </member>
- <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="linear_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="linear_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- <member name="linear_limit_z/upper_distance" type="float" setter="set_param_z" getter="get_param_z" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_LINEAR_LOWER_LIMIT" value="0">
- </constant>
- <constant name="PARAM_LINEAR_UPPER_LIMIT" value="1">
- </constant>
- <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2">
- </constant>
- <constant name="PARAM_LINEAR_RESTITUTION" value="3">
- </constant>
- <constant name="PARAM_LINEAR_DAMPING" value="4">
- </constant>
- <constant name="PARAM_ANGULAR_LOWER_LIMIT" value="5">
- </constant>
- <constant name="PARAM_ANGULAR_UPPER_LIMIT" value="6">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="7">
- </constant>
- <constant name="PARAM_ANGULAR_DAMPING" value="8">
- </constant>
- <constant name="PARAM_ANGULAR_RESTITUTION" value="9">
- </constant>
- <constant name="PARAM_ANGULAR_FORCE_LIMIT" value="10">
- </constant>
- <constant name="PARAM_ANGULAR_ERP" value="11">
- </constant>
- <constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="12">
- </constant>
- <constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="13">
- </constant>
- <constant name="PARAM_MAX" value="14">
- </constant>
- <constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0">
- </constant>
- <constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1">
- </constant>
- <constant name="FLAG_ENABLE_MOTOR" value="2">
- </constant>
- <constant name="FLAG_MAX" value="3">
- </constant>
- </constants>
-</class>
-<class name="Geometry" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="build_box_planes">
- <return type="Array">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="build_capsule_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="lats" type="int">
- </argument>
- <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- </description>
- </method>
- <method name="build_cylinder_planes">
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <argument index="1" name="height" type="float">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_to_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_to_segment_2d">
- <return type="Vector2">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="s1" type="Vector2">
- </argument>
- <argument index="2" name="s2" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_to_segment_uncapped">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="s1" type="Vector3">
- </argument>
- <argument index="2" name="s2" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_to_segment_uncapped_2d">
- <return type="Vector2">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="s1" type="Vector2">
- </argument>
- <argument index="2" name="s2" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_points_between_segments">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="p1" type="Vector3">
- </argument>
- <argument index="1" name="p2" type="Vector3">
- </argument>
- <argument index="2" name="q1" type="Vector3">
- </argument>
- <argument index="3" name="q2" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_points_between_segments_2d">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="p1" type="Vector2">
- </argument>
- <argument index="1" name="q1" type="Vector2">
- </argument>
- <argument index="2" name="p2" type="Vector2">
- </argument>
- <argument index="3" name="q2" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_uv84_normal_bit">
- <return type="int">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_atlas">
- <return type="Dictionary">
- </return>
- <argument index="0" name="sizes" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="point_is_inside_triangle" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="a" type="Vector2">
- </argument>
- <argument index="2" name="b" type="Vector2">
- </argument>
- <argument index="3" name="c" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="ray_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="dir" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_circle">
- <return type="float">
- </return>
- <argument index="0" name="segment_from" type="Vector2">
- </argument>
- <argument index="1" name="segment_to" type="Vector2">
- </argument>
- <argument index="2" name="circle_pos" type="Vector2">
- </argument>
- <argument index="3" name="circle_radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_convex">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="planes" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_cylinder">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="height" type="float">
- </argument>
- <argument index="3" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_segment_2d">
- <return type="Variant">
- </return>
- <argument index="0" name="from_a" type="Vector2">
- </argument>
- <argument index="1" name="to_a" type="Vector2">
- </argument>
- <argument index="2" name="from_b" type="Vector2">
- </argument>
- <argument index="3" name="to_b" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_sphere">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="spos" type="Vector3">
- </argument>
- <argument index="3" name="sradius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="segment_intersects_triangle">
- <return type="Variant">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="a" type="Vector3">
- </argument>
- <argument index="3" name="b" type="Vector3">
- </argument>
- <argument index="4" name="c" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="triangulate_polygon">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="polygon" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GeometryInstance" inherits="VisualInstance" category="Core">
- <brief_description>
- Base node for geometry based visual instances.
- </brief_description>
- <description>
- Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
- </description>
- <methods>
- <method name="get_cast_shadows_setting" qualifiers="const">
- <return type="int" enum="GeometryInstance.ShadowCastingSetting">
- </return>
- <description>
- </description>
- </method>
- <method name="get_extra_cull_margin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_lod_max_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lod_max_hysteresis" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lod_min_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lod_min_hysteresis" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_material_override" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- Return the material override for the whole geometry.
- </description>
- </method>
- <method name="set_cast_shadows_setting">
- <return type="void">
- </return>
- <argument index="0" name="shadow_casting_setting" type="int" enum="GeometryInstance.ShadowCastingSetting">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_extra_cull_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lod_max_distance">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lod_max_hysteresis">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lod_min_distance">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lod_min_hysteresis">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_material_override">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- Set the material override for the whole geometry.
- </description>
- </method>
- </methods>
- <members>
- <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" brief="" enum="GeometryInstance.ShadowCastingSetting">
- </member>
- <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" brief="">
- </member>
- <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" brief="">
- </member>
- <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" brief="">
- </member>
- <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" brief="">
- </member>
- <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" brief="">
- </member>
- <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override" brief="">
- </member>
- <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- </members>
- <constants>
- <constant name="FLAG_MAX" value="1" enum="">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="">
- </constant>
- </constants>
-</class>
-<class name="Gradient" inherits="Resource" category="Core">
- <brief_description>
- Color interpolator node
- </brief_description>
- <description>
- Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
- </description>
- <methods>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Adds the specified color to the end of the ramp, with the specified offset
- </description>
- </method>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="point" type="int">
- </argument>
- <description>
- Returns the color of the ramp color at index [i]point[/i]
- </description>
- </method>
- <method name="get_colors" qualifiers="const">
- <return type="PoolColorArray">
- </return>
- <description>
- Returns the colors in the ramp
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="point" type="int">
- </argument>
- <description>
- Returns the offset of the ramp color at index [i]point[/i]
- </description>
- </method>
- <method name="get_offsets" qualifiers="const">
- <return type="PoolRealArray">
- </return>
- <description>
- Returns the offsets for the colors in this ramp
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of colors in the ramp
- </description>
- </method>
- <method name="interpolate">
- <return type="Color">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- Returns the interpolated color specified by [i]offset[/i]
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="int">
- </argument>
- <description>
- Removes the color at the index [i]offset[/i]
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="point" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Sets the color of the ramp color at index [i]point[/i]
- </description>
- </method>
- <method name="set_colors">
- <return type="void">
- </return>
- <argument index="0" name="colors" type="PoolColorArray">
- </argument>
- <description>
- Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="point" type="int">
- </argument>
- <argument index="1" name="offset" type="float">
- </argument>
- <description>
- Sets the offset for the ramp color at index [i]point[/i]
- </description>
- </method>
- <method name="set_offsets">
- <return type="void">
- </return>
- <argument index="0" name="offsets" type="PoolRealArray">
- </argument>
- <description>
- Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements, all new colors will be black by default.
- </description>
- </method>
- </methods>
- <members>
- <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" brief="">
- </member>
- <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="GradientTexture" inherits="Texture" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_gradient" qualifiers="const">
- <return type="Gradient">
- </return>
- <description>
- </description>
- </method>
- <method name="set_gradient">
- <return type="void">
- </return>
- <argument index="0" name="gradient" type="Gradient">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_width">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
- </member>
- <member name="width" type="int" setter="set_width" getter="get_width" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="GraphEdit" inherits="Control" category="Core">
- <brief_description>
- GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
- </brief_description>
- <description>
- GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
- It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
- </description>
- <methods>
- <method name="connect_node">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_port" type="int">
- </argument>
- <argument index="2" name="to" type="String">
- </argument>
- <argument index="3" name="to_port" type="int">
- </argument>
- <description>
- Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
- </description>
- </method>
- <method name="disconnect_node">
- <return type="void">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_port" type="int">
- </argument>
- <argument index="2" name="to" type="String">
- </argument>
- <argument index="3" name="to_port" type="int">
- </argument>
- <description>
- Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
- </description>
- </method>
- <method name="get_connection_list" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
- </description>
- </method>
- <method name="get_scroll_ofs" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the scroll offset.
- </description>
- </method>
- <method name="get_snap" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_zoom" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current zoom value.
- </description>
- </method>
- <method name="is_node_connected">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_port" type="int">
- </argument>
- <argument index="2" name="to" type="String">
- </argument>
- <argument index="3" name="to_port" type="int">
- </argument>
- <description>
- Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
- </description>
- </method>
- <method name="is_right_disconnects_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
- </description>
- </method>
- <method name="is_using_snap" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_right_disconnects">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
- </description>
- </method>
- <method name="set_scroll_ofs">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_selected">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_snap">
- <return type="void">
- </return>
- <argument index="0" name="pixels" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_snap">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_zoom">
- <return type="void">
- </return>
- <argument index="0" name="p_zoom" type="float">
- </argument>
- <description>
- Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728].
- </description>
- </method>
- </methods>
- <signals>
- <signal name="_begin_node_move">
- <description>
- Signal sent at the beginning of a GraphNode movement.
- </description>
- </signal>
- <signal name="_end_node_move">
- <description>
- Signal sent at the end of a GraphNode movement.
- </description>
- </signal>
- <signal name="connection_request">
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_slot" type="int">
- </argument>
- <argument index="2" name="to" type="String">
- </argument>
- <argument index="3" name="to_slot" type="int">
- </argument>
- <description>
- Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created.
- </description>
- </signal>
- <signal name="connection_to_empty">
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_slot" type="int">
- </argument>
- <argument index="2" name="release_pos" type="Vector2">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="delete_nodes_request">
- <description>
- Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
- </description>
- </signal>
- <signal name="disconnection_request">
- <argument index="0" name="from" type="String">
- </argument>
- <argument index="1" name="from_slot" type="int">
- </argument>
- <argument index="2" name="to" type="String">
- </argument>
- <argument index="3" name="to_slot" type="int">
- </argument>
- <description>
- Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed.
- </description>
- </signal>
- <signal name="duplicate_nodes_request">
- <description>
- Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit.
- </description>
- </signal>
- <signal name="node_selected">
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="popup_request">
- <argument index="0" name="p_position" type="Vector2">
- </argument>
- <description>
- Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.
- </description>
- </signal>
- <signal name="scroll_offset_changed">
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="bezier_len_neg" type="int">
- </theme_item>
- <theme_item name="bezier_len_pos" type="int">
- </theme_item>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="grid_major" type="Color">
- </theme_item>
- <theme_item name="grid_minor" type="Color">
- </theme_item>
- <theme_item name="minus" type="Texture">
- </theme_item>
- <theme_item name="more" type="Texture">
- </theme_item>
- <theme_item name="reset" type="Texture">
- </theme_item>
- <theme_item name="snap" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="GraphNode" inherits="Container" category="Core">
- <brief_description>
- A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
- </brief_description>
- <description>
- A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
- </description>
- <methods>
- <method name="clear_all_slots">
- <return type="void">
- </return>
- <description>
- Disable all input and output slots of the GraphNode.
- </description>
- </method>
- <method name="clear_slot">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Disable input and output slot whose index is 'idx'.
- </description>
- </method>
- <method name="get_connection_input_color">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the color of the input connection 'idx'.
- </description>
- </method>
- <method name="get_connection_input_count">
- <return type="int">
- </return>
- <description>
- Return the number of enabled input slots (connections) to the GraphNode.
- </description>
- </method>
- <method name="get_connection_input_pos">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the position of the input connection 'idx'.
- </description>
- </method>
- <method name="get_connection_input_type">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the type of the input connection 'idx'.
- </description>
- </method>
- <method name="get_connection_output_color">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the color of the output connection 'idx'.
- </description>
- </method>
- <method name="get_connection_output_count">
- <return type="int">
- </return>
- <description>
- Return the number of enabled output slots (connections) of the GraphNode.
- </description>
- </method>
- <method name="get_connection_output_pos">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the position of the output connection 'idx'.
- </description>
- </method>
- <method name="get_connection_output_type">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the type of the output connection 'idx'.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the offset of the GraphNode.
- </description>
- </method>
- <method name="get_overlay" qualifiers="const">
- <return type="int" enum="GraphNode.Overlay">
- </return>
- <description>
- </description>
- </method>
- <method name="get_slot_color_left" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the color set to 'idx' left (input) slot.
- </description>
- </method>
- <method name="get_slot_color_right" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the color set to 'idx' right (output) slot.
- </description>
- </method>
- <method name="get_slot_type_left" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the (integer) type of left (input) 'idx' slot.
- </description>
- </method>
- <method name="get_slot_type_right" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the (integer) type of right (output) 'idx' slot.
- </description>
- </method>
- <method name="get_title" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the title of the GraphNode.
- </description>
- </method>
- <method name="is_close_button_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if the close button is shown. False otherwise.
- </description>
- </method>
- <method name="is_comment" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_resizable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_selected">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_slot_enabled_left" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return true if left (input) slot 'idx' is enabled. False otherwise.
- </description>
- </method>
- <method name="is_slot_enabled_right" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return true if right (output) slot 'idx' is enabled. False otherwise.
- </description>
- </method>
- <method name="set_comment">
- <return type="void">
- </return>
- <argument index="0" name="comment" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the offset of the GraphNode.
- </description>
- </method>
- <method name="set_overlay">
- <return type="void">
- </return>
- <argument index="0" name="overlay" type="int" enum="GraphNode.Overlay">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_resizable">
- <return type="void">
- </return>
- <argument index="0" name="resizable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_selected">
- <return type="void">
- </return>
- <argument index="0" name="selected" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_show_close_button">
- <return type="void">
- </return>
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
- </description>
- </method>
- <method name="set_slot">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="enable_left" type="bool">
- </argument>
- <argument index="2" name="type_left" type="int">
- </argument>
- <argument index="3" name="color_left" type="Color">
- </argument>
- <argument index="4" name="enable_right" type="bool">
- </argument>
- <argument index="5" name="type_right" type="int">
- </argument>
- <argument index="6" name="color_right" type="Color">
- </argument>
- <argument index="7" name="custom_left" type="Texture" default="null">
- </argument>
- <argument index="8" name="custom_right" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- Set the title of the GraphNode.
- </description>
- </method>
- </methods>
- <members>
- <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" brief="">
- </member>
- <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" brief="">
- </member>
- <member name="title" type="String" setter="set_title" getter="get_title" brief="">
- </member>
- </members>
- <signals>
- <signal name="close_request">
- <description>
- Signal sent on closing the GraphNode.
- </description>
- </signal>
- <signal name="dragged">
- <argument index="0" name="from" type="Vector2">
- </argument>
- <argument index="1" name="to" type="Vector2">
- </argument>
- <description>
- Signal sent when the GraphNode is dragged.
- </description>
- </signal>
- <signal name="offset_changed">
- <description>
- Signal sent when the GraphNode is moved.
- </description>
- </signal>
- <signal name="raise_request">
- <description>
- Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
- </description>
- </signal>
- <signal name="resize_request">
- <argument index="0" name="new_minsize" type="Vector2">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="OVERLAY_DISABLED" value="0">
- </constant>
- <constant name="OVERLAY_BREAKPOINT" value="1">
- </constant>
- <constant name="OVERLAY_POSITION" value="2">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="breakpoint" type="StyleBox">
- </theme_item>
- <theme_item name="close" type="Texture">
- </theme_item>
- <theme_item name="close_offset" type="int">
- </theme_item>
- <theme_item name="comment" type="StyleBox">
- </theme_item>
- <theme_item name="commentfocus" type="StyleBox">
- </theme_item>
- <theme_item name="defaultfocus" type="StyleBox">
- </theme_item>
- <theme_item name="defaultframe" type="StyleBox">
- </theme_item>
- <theme_item name="frame" type="StyleBox">
- </theme_item>
- <theme_item name="port" type="Texture">
- </theme_item>
- <theme_item name="port_offset" type="int">
- </theme_item>
- <theme_item name="position" type="StyleBox">
- </theme_item>
- <theme_item name="resizer" type="Texture">
- </theme_item>
- <theme_item name="selectedframe" type="StyleBox">
- </theme_item>
- <theme_item name="separation" type="int">
- </theme_item>
- <theme_item name="title_color" type="Color">
- </theme_item>
- <theme_item name="title_font" type="Font">
- </theme_item>
- <theme_item name="title_offset" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="GridContainer" inherits="Container" category="Core">
- <brief_description>
- Grid container used to arrange elements in a grid like layout
- </brief_description>
- <description>
- Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
- </description>
- <methods>
- <method name="get_columns" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of columns in this container
- </description>
- </method>
- <method name="set_columns">
- <return type="void">
- </return>
- <argument index="0" name="columns" type="int">
- </argument>
- <description>
- Sets the numbers of columns in the container, then reorder its children to accommodate the new layout
- </description>
- </method>
- </methods>
- <members>
- <member name="columns" type="int" setter="set_columns" getter="get_columns" brief="">
- </member>
- </members>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="vseparation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="GridMap" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cell_item" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_cell_item_orientation" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_cell_size" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_center_x" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_center_y" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_center_z" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_meshes">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_octant_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_theme" qualifiers="const">
- <return type="MeshLibrary">
- </return>
- <description>
- </description>
- </method>
- <method name="resource_changed">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cell_item">
- <return type="void">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <argument index="3" name="item" type="int">
- </argument>
- <argument index="4" name="orientation" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cell_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_center_x">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_center_y">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_center_z">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_clip">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <argument index="1" name="clipabove" type="bool" default="true">
- </argument>
- <argument index="2" name="floor" type="int" default="0">
- </argument>
- <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_octant_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_theme">
- <return type="void">
- </return>
- <argument index="0" name="theme" type="MeshLibrary">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="INVALID_CELL_ITEM" value="-1" enum="">
- </constant>
- </constants>
-</class>
-<class name="GrooveJoint2D" inherits="Joint2D" category="Core">
- <brief_description>
- Groove constraint for 2D physics.
- </brief_description>
- <description>
- Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
- </description>
- <methods>
- <method name="get_initial_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Set the final offset of the groove on body A.
- </description>
- </method>
- <method name="get_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the length of the groove.
- </description>
- </method>
- <method name="set_initial_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- Set the initial offset of the groove on body A.
- </description>
- </method>
- <method name="set_length">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- Set the length of the groove.
- </description>
- </method>
- </methods>
- <members>
- <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset" brief="">
- </member>
- <member name="length" type="float" setter="set_length" getter="get_length" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="HBoxContainer" inherits="BoxContainer" category="Core">
- <brief_description>
- Horizontal box container.
- </brief_description>
- <description>
- Horizontal box container. See [BoxContainer].
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="separation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="HScrollBar" inherits="ScrollBar" category="Core">
- <brief_description>
- Horizontal scroll bar.
- </brief_description>
- <description>
- Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="decrement" type="Texture">
- </theme_item>
- <theme_item name="decrement_highlight" type="Texture">
- </theme_item>
- <theme_item name="grabber" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="increment" type="Texture">
- </theme_item>
- <theme_item name="increment_highlight" type="Texture">
- </theme_item>
- <theme_item name="scroll" type="StyleBox">
- </theme_item>
- <theme_item name="scroll_focus" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="HSeparator" inherits="Separator" category="Core">
- <brief_description>
- Horizontal separator.
- </brief_description>
- <description>
- Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="separation" type="int">
- </theme_item>
- <theme_item name="separator" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="HSlider" inherits="Slider" category="Core">
- <brief_description>
- Horizontal slider.
- </brief_description>
- <description>
- Horizontal slider. See [Slider]. This one goes from left (min) to right (max).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_highlight" type="Texture">
- </theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
- </theme_item>
- <theme_item name="slider" type="StyleBox">
- </theme_item>
- <theme_item name="tick" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="HSplitContainer" inherits="SplitContainer" category="Core">
- <brief_description>
- Horizontal split container.
- </brief_description>
- <description>
- Horizontal split container. See [SplitContainer]. This goes from left to right.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="autohide" type="int">
- </theme_item>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
- </theme_item>
- <theme_item name="separation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="HTTPClient" inherits="Reference" category="Core">
- <brief_description>
- Hyper-text transfer protocol client.
- </brief_description>
- <description>
- Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification.
- Can be reused to connect to different hosts and make many requests.
- </description>
- <methods>
- <method name="close">
- <return type="void">
- </return>
- <description>
- Cloces the current connection, allows for reusal of [HTTPClient].
- </description>
- </method>
- <method name="connect_to_host">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="port" type="int">
- </argument>
- <argument index="2" name="use_ssl" type="bool" default="false">
- </argument>
- <argument index="3" name="verify_host" type="bool" default="true">
- </argument>
- <description>
- Connect to a host. This needs to be done before any requests are sent.
- The host should not have http:// prepended but will strip the protocol identifier if provided.
- verify_host will check the SSL identity of the host if set to true.
- </description>
- </method>
- <method name="get_connection" qualifiers="const">
- <return type="StreamPeer">
- </return>
- <description>
- Return current connection.
- </description>
- </method>
- <method name="get_response_body_length" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the response's body length.
- </description>
- </method>
- <method name="get_response_code" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the HTTP status code of the response.
- </description>
- </method>
- <method name="get_response_headers">
- <return type="PoolStringArray">
- </return>
- <description>
- Return the response headers.
- </description>
- </method>
- <method name="get_response_headers_as_dictionary">
- <return type="Dictionary">
- </return>
- <description>
- Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.
- Structure: ("key":"value1; value2")
- Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
- </description>
- </method>
- <method name="get_status" qualifiers="const">
- <return type="int" enum="HTTPClient.Status">
- </return>
- <description>
- Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates.
- </description>
- </method>
- <method name="has_response" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this [HTTPClient] has a response available.
- </description>
- </method>
- <method name="is_blocking_mode_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether blocking mode is enabled.
- </description>
- </method>
- <method name="is_response_chunked" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this [HTTPClient] has a response that is chunked.
- </description>
- </method>
- <method name="poll">
- <return type="int" enum="Error">
- </return>
- <description>
- This needs to be called in order to have any request processed. Check results with [method get_status]
- </description>
- </method>
- <method name="query_string_from_dict">
- <return type="String">
- </return>
- <argument index="0" name="fields" type="Dictionary">
- </argument>
- <description>
- Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
- [codeblock]
- var fields = {"username": "user", "password": "pass"}
- String queryString = httpClient.query_string_from_dict(fields)
- returns:= "username=user&amp;password=pass"
- [/codeblock]
- </description>
- </method>
- <method name="read_response_body_chunk">
- <return type="PoolByteArray">
- </return>
- <description>
- Reads one chunk from the response.
- </description>
- </method>
- <method name="request">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="method" type="int" enum="HTTPClient.Method">
- </argument>
- <argument index="1" name="url" type="String">
- </argument>
- <argument index="2" name="headers" type="PoolStringArray">
- </argument>
- <argument index="3" name="body" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
- Headers are HTTP request headers.
- To create a POST request with query strings to push to the server, do:
- [codeblock]
- var fields = {"username" : "user", "password" : "pass"}
- var queryString = httpClient.query_string_from_dict(fields)
- var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
- var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
- [/codeblock]
- </description>
- </method>
- <method name="request_raw">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="method" type="int" enum="HTTPClient.Method">
- </argument>
- <argument index="1" name="url" type="String">
- </argument>
- <argument index="2" name="headers" type="PoolStringArray">
- </argument>
- <argument index="3" name="body" type="PoolByteArray">
- </argument>
- <description>
- Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
- Headers are HTTP request headers.
- Sends body raw, as a byte array, does not encode it in any way.
- </description>
- </method>
- <method name="send_body_data">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="body" type="PoolByteArray">
- </argument>
- <description>
- Stub function
- </description>
- </method>
- <method name="send_body_text">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="body" type="String">
- </argument>
- <description>
- Stub function
- </description>
- </method>
- <method name="set_blocking_mode">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- If set to true, execution will block until all data is read from the response.
- </description>
- </method>
- <method name="set_connection">
- <return type="void">
- </return>
- <argument index="0" name="connection" type="StreamPeer">
- </argument>
- <description>
- Set connection to use, for this client.
- </description>
- </method>
- <method name="set_read_chunk_size">
- <return type="void">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
- </description>
- </method>
- </methods>
- <constants>
- <constant name="METHOD_GET" value="0">
- </constant>
- <constant name="METHOD_HEAD" value="1">
- </constant>
- <constant name="METHOD_POST" value="2">
- </constant>
- <constant name="METHOD_PUT" value="3">
- </constant>
- <constant name="METHOD_DELETE" value="4">
- </constant>
- <constant name="METHOD_OPTIONS" value="5">
- </constant>
- <constant name="METHOD_TRACE" value="6">
- </constant>
- <constant name="METHOD_CONNECT" value="7">
- </constant>
- <constant name="METHOD_MAX" value="8">
- </constant>
- <constant name="STATUS_DISCONNECTED" value="0">
- </constant>
- <constant name="STATUS_RESOLVING" value="1">
- </constant>
- <constant name="STATUS_CANT_RESOLVE" value="2">
- </constant>
- <constant name="STATUS_CONNECTING" value="3">
- </constant>
- <constant name="STATUS_CANT_CONNECT" value="4">
- </constant>
- <constant name="STATUS_CONNECTED" value="5">
- </constant>
- <constant name="STATUS_REQUESTING" value="6">
- </constant>
- <constant name="STATUS_BODY" value="7">
- </constant>
- <constant name="STATUS_CONNECTION_ERROR" value="8">
- </constant>
- <constant name="STATUS_SSL_HANDSHAKE_ERROR" value="9">
- </constant>
- <constant name="RESPONSE_CONTINUE" value="100">
- </constant>
- <constant name="RESPONSE_SWITCHING_PROTOCOLS" value="101">
- </constant>
- <constant name="RESPONSE_PROCESSING" value="102">
- </constant>
- <constant name="RESPONSE_OK" value="200">
- </constant>
- <constant name="RESPONSE_CREATED" value="201">
- </constant>
- <constant name="RESPONSE_ACCEPTED" value="202">
- </constant>
- <constant name="RESPONSE_NON_AUTHORITATIVE_INFORMATION" value="203">
- </constant>
- <constant name="RESPONSE_NO_CONTENT" value="204">
- </constant>
- <constant name="RESPONSE_RESET_CONTENT" value="205">
- </constant>
- <constant name="RESPONSE_PARTIAL_CONTENT" value="206">
- </constant>
- <constant name="RESPONSE_MULTI_STATUS" value="207">
- </constant>
- <constant name="RESPONSE_IM_USED" value="226">
- </constant>
- <constant name="RESPONSE_MULTIPLE_CHOICES" value="300">
- </constant>
- <constant name="RESPONSE_MOVED_PERMANENTLY" value="301">
- </constant>
- <constant name="RESPONSE_FOUND" value="302">
- </constant>
- <constant name="RESPONSE_SEE_OTHER" value="303">
- </constant>
- <constant name="RESPONSE_NOT_MODIFIED" value="304">
- </constant>
- <constant name="RESPONSE_USE_PROXY" value="305">
- </constant>
- <constant name="RESPONSE_TEMPORARY_REDIRECT" value="307">
- </constant>
- <constant name="RESPONSE_BAD_REQUEST" value="400">
- </constant>
- <constant name="RESPONSE_UNAUTHORIZED" value="401">
- </constant>
- <constant name="RESPONSE_PAYMENT_REQUIRED" value="402">
- </constant>
- <constant name="RESPONSE_FORBIDDEN" value="403">
- </constant>
- <constant name="RESPONSE_NOT_FOUND" value="404">
- </constant>
- <constant name="RESPONSE_METHOD_NOT_ALLOWED" value="405">
- </constant>
- <constant name="RESPONSE_NOT_ACCEPTABLE" value="406">
- </constant>
- <constant name="RESPONSE_PROXY_AUTHENTICATION_REQUIRED" value="407">
- </constant>
- <constant name="RESPONSE_REQUEST_TIMEOUT" value="408">
- </constant>
- <constant name="RESPONSE_CONFLICT" value="409">
- </constant>
- <constant name="RESPONSE_GONE" value="410">
- </constant>
- <constant name="RESPONSE_LENGTH_REQUIRED" value="411">
- </constant>
- <constant name="RESPONSE_PRECONDITION_FAILED" value="412">
- </constant>
- <constant name="RESPONSE_REQUEST_ENTITY_TOO_LARGE" value="413">
- </constant>
- <constant name="RESPONSE_REQUEST_URI_TOO_LONG" value="414">
- </constant>
- <constant name="RESPONSE_UNSUPPORTED_MEDIA_TYPE" value="415">
- </constant>
- <constant name="RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE" value="416">
- </constant>
- <constant name="RESPONSE_EXPECTATION_FAILED" value="417">
- </constant>
- <constant name="RESPONSE_UNPROCESSABLE_ENTITY" value="422">
- </constant>
- <constant name="RESPONSE_LOCKED" value="423">
- </constant>
- <constant name="RESPONSE_FAILED_DEPENDENCY" value="424">
- </constant>
- <constant name="RESPONSE_UPGRADE_REQUIRED" value="426">
- </constant>
- <constant name="RESPONSE_INTERNAL_SERVER_ERROR" value="500">
- </constant>
- <constant name="RESPONSE_NOT_IMPLEMENTED" value="501">
- </constant>
- <constant name="RESPONSE_BAD_GATEWAY" value="502">
- </constant>
- <constant name="RESPONSE_SERVICE_UNAVAILABLE" value="503">
- </constant>
- <constant name="RESPONSE_GATEWAY_TIMEOUT" value="504">
- </constant>
- <constant name="RESPONSE_HTTP_VERSION_NOT_SUPPORTED" value="505">
- </constant>
- <constant name="RESPONSE_INSUFFICIENT_STORAGE" value="507">
- </constant>
- <constant name="RESPONSE_NOT_EXTENDED" value="510">
- </constant>
- </constants>
-</class>
-<class name="HTTPRequest" inherits="Node" category="Core">
- <brief_description>
- A Node with the ability to send HTTP requests.
- </brief_description>
- <description>
- A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS.
- Can be used to make HTTP requests or download files via HTTP.
- </description>
- <methods>
- <method name="cancel_request">
- <return type="void">
- </return>
- <description>
- Cancel the current request.
- </description>
- </method>
- <method name="get_body_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the response body length.
- </description>
- </method>
- <method name="get_body_size_limit" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return current body size limit.
- </description>
- </method>
- <method name="get_download_file" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the file this request will download into.
- </description>
- </method>
- <method name="get_downloaded_bytes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of bytes this HTTPRequest downloaded.
- </description>
- </method>
- <method name="get_http_client_status" qualifiers="const">
- <return type="int" enum="HTTPClient.Status">
- </return>
- <description>
- Return the current status of the underlying [HTTPClient].
- </description>
- </method>
- <method name="get_max_redirects" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the maximum amount of redirects that will be followed.
- </description>
- </method>
- <method name="is_using_threads" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Whether this request is using threads.
- </description>
- </method>
- <method name="request">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="url" type="String">
- </argument>
- <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )">
- </argument>
- <argument index="2" name="ssl_validate_domain" type="bool" default="true">
- </argument>
- <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0">
- </argument>
- <argument index="4" name="request_data" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_body_size_limit">
- <return type="void">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Set the response body size limit.
- </description>
- </method>
- <method name="set_download_file">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Set the file to download into. Outputs the response body into the file.
- </description>
- </method>
- <method name="set_max_redirects">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set the maximum amount of redirects the request will follow.
- </description>
- </method>
- <method name="set_use_threads">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Make this HTTPRequest use threads.
- </description>
- </method>
- </methods>
- <members>
- <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" brief="">
- </member>
- <member name="max_redirects" type="int" setter="set_max_redirects" getter="get_max_redirects" brief="">
- </member>
- <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads" brief="">
- </member>
- </members>
- <signals>
- <signal name="request_completed">
- <argument index="0" name="result" type="int">
- </argument>
- <argument index="1" name="response_code" type="int">
- </argument>
- <argument index="2" name="headers" type="PoolStringArray">
- </argument>
- <argument index="3" name="body" type="PoolByteArray">
- </argument>
- <description>
- This signal is emitted upon request completion.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="RESULT_SUCCESS" value="0">
- Request successful.
- </constant>
- <constant name="RESULT_CHUNKED_BODY_SIZE_MISMATCH" value="1">
- </constant>
- <constant name="RESULT_CANT_CONNECT" value="2">
- Request failed while connecting.
- </constant>
- <constant name="RESULT_CANT_RESOLVE" value="3">
- Request failed while resolving.
- </constant>
- <constant name="RESULT_CONNECTION_ERROR" value="4">
- Request failed due to connection(read/write) error.
- </constant>
- <constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5">
- Request failed on SSL handshake.
- </constant>
- <constant name="RESULT_NO_RESPONSE" value="6">
- Request does not have a response(yet).
- </constant>
- <constant name="RESULT_BODY_SIZE_LIMIT_EXCEEDED" value="7">
- Request exceded its maximum size limit, see [method set_body_size_limit].
- </constant>
- <constant name="RESULT_REQUEST_FAILED" value="8">
- Request failed. (unused)
- </constant>
- <constant name="RESULT_DOWNLOAD_FILE_CANT_OPEN" value="9">
- HTTPRequest couldn't open the download file.
- </constant>
- <constant name="RESULT_DOWNLOAD_FILE_WRITE_ERROR" value="10">
- HTTPRequest couldn't write to the download file.
- </constant>
- <constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11">
- Request reached its maximum redirect limit, see [method set_max_redirects].
- </constant>
- </constants>
-</class>
-<class name="HingeJoint" inherits="Joint" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="HingeJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="HingeJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit" brief="">
- </member>
- <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit" brief="">
- </member>
- <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="params/bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_BIAS" value="0">
- </constant>
- <constant name="PARAM_LIMIT_UPPER" value="1">
- </constant>
- <constant name="PARAM_LIMIT_LOWER" value="2">
- </constant>
- <constant name="PARAM_LIMIT_BIAS" value="3">
- </constant>
- <constant name="PARAM_LIMIT_SOFTNESS" value="4">
- </constant>
- <constant name="PARAM_LIMIT_RELAXATION" value="5">
- </constant>
- <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6">
- </constant>
- <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7">
- </constant>
- <constant name="PARAM_MAX" value="8">
- </constant>
- <constant name="FLAG_USE_LIMIT" value="0">
- </constant>
- <constant name="FLAG_ENABLE_MOTOR" value="1">
- </constant>
- <constant name="FLAG_MAX" value="2">
- </constant>
- </constants>
-</class>
-<class name="IP" inherits="Object" category="Core">
- <brief_description>
- IP Protocol support functions.
- </brief_description>
- <description>
- IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
- </description>
- <methods>
- <method name="clear_cache">
- <return type="void">
- </return>
- <argument index="0" name="hostname" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="erase_resolve_item">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen.
- </description>
- </method>
- <method name="get_local_addresses" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_resolve_item_address" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
- </description>
- </method>
- <method name="get_resolve_item_status" qualifiers="const">
- <return type="int" enum="IP.ResolverStatus">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the status of hostname queued for resolving, given its queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration.
- </description>
- </method>
- <method name="resolve_hostname">
- <return type="String">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
- </argument>
- <description>
- Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type".
- </description>
- </method>
- <method name="resolve_hostname_queue_item">
- <return type="int">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
- </argument>
- <description>
- Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="RESOLVER_STATUS_NONE" value="0">
- </constant>
- <constant name="RESOLVER_STATUS_WAITING" value="1">
- </constant>
- <constant name="RESOLVER_STATUS_DONE" value="2">
- </constant>
- <constant name="RESOLVER_STATUS_ERROR" value="3">
- </constant>
- <constant name="RESOLVER_MAX_QUERIES" value="32" enum="">
- </constant>
- <constant name="RESOLVER_INVALID_ID" value="-1" enum="">
- </constant>
- <constant name="TYPE_NONE" value="0">
- </constant>
- <constant name="TYPE_IPV4" value="1">
- </constant>
- <constant name="TYPE_IPV6" value="2">
- </constant>
- <constant name="TYPE_ANY" value="3">
- </constant>
- </constants>
-</class>
-<class name="IP_Unix" inherits="IP" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Image" inherits="Resource" category="Core">
- <brief_description>
- Image datatype.
- </brief_description>
- <description>
- Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it.
- </description>
- <methods>
- <method name="blend_rect">
- <return type="void">
- </return>
- <argument index="0" name="src" type="Image">
- </argument>
- <argument index="1" name="src_rect" type="Rect2">
- </argument>
- <argument index="2" name="dst" type="Vector2">
- </argument>
- <description>
- Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
- </description>
- </method>
- <method name="blend_rect_mask">
- <return type="void">
- </return>
- <argument index="0" name="src" type="Image">
- </argument>
- <argument index="1" name="mask" type="Image">
- </argument>
- <argument index="2" name="src_rect" type="Rect2">
- </argument>
- <argument index="3" name="dst" type="Vector2">
- </argument>
- <description>
- Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
- </description>
- </method>
- <method name="blit_rect">
- <return type="void">
- </return>
- <argument index="0" name="src" type="Image">
- </argument>
- <argument index="1" name="src_rect" type="Rect2">
- </argument>
- <argument index="2" name="dst" type="Vector2">
- </argument>
- <description>
- Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
- </description>
- </method>
- <method name="blit_rect_mask">
- <return type="void">
- </return>
- <argument index="0" name="src" type="Image">
- </argument>
- <argument index="1" name="mask" type="Image">
- </argument>
- <argument index="2" name="src_rect" type="Rect2">
- </argument>
- <argument index="3" name="dst" type="Vector2">
- </argument>
- <description>
- Blits a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
- </description>
- </method>
- <method name="clear_mipmaps">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="compress">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="mode" type="int" enum="Image.CompressMode">
- </argument>
- <argument index="1" name="source" type="int" enum="Image.CompressSource">
- </argument>
- <argument index="2" name="lossy_quality" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="convert">
- <return type="void">
- </return>
- <argument index="0" name="format" type="int" enum="Image.Format">
- </argument>
- <description>
- </description>
- </method>
- <method name="copy_from">
- <return type="void">
- </return>
- <argument index="0" name="src" type="Image">
- </argument>
- <description>
- </description>
- </method>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="use_mipmaps" type="bool">
- </argument>
- <argument index="3" name="format" type="int" enum="Image.Format">
- </argument>
- <description>
- Create an empty image of a specific size and format.
- </description>
- </method>
- <method name="create_from_data">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="use_mipmaps" type="bool">
- </argument>
- <argument index="3" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="4" name="data" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="crop">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="decompress">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- <method name="detect_alpha" qualifiers="const">
- <return type="int" enum="Image.AlphaMode">
- </return>
- <description>
- </description>
- </method>
- <method name="expand_x2_hq2x">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="fill">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Fills an [Image] with a specified [Color]
- </description>
- </method>
- <method name="fix_alpha_edges">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="flip_x">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="flip_y">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="generate_mipmaps">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- <method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- Return the raw data of the [Image].
- </description>
- </method>
- <method name="get_format" qualifiers="const">
- <return type="int" enum="Image.Format">
- </return>
- <description>
- Return the format of the [Image], one of [Image].FORMAT_*.
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the height of the [Image].
- </description>
- </method>
- <method name="get_mipmap_offset" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="mipmap" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_pixel" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_rect" qualifiers="const">
- <return type="Image">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- Return a new [Image] that is a copy of "area" in this [Image].
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_used_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return the area of this [Image] that is used/visibly colored/opaque.
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the width of the [Image].
- </description>
- </method>
- <method name="has_mipmaps" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_compressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_empty" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_invisible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="load">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Load an [Image].
- </description>
- </method>
- <method name="lock">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="normalmap_to_xy">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="premultiply_alpha">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="resize">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1">
- </argument>
- <description>
- </description>
- </method>
- <method name="resize_to_po2">
- <return type="void">
- </return>
- <argument index="0" name="square" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="save_png" qualifiers="const">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Save this [Image] as a png.
- </description>
- </method>
- <method name="set_pixel">
- <return type="void">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="shrink_x2">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="srgb_to_linear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="unlock">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <constants>
- <constant name="FORMAT_L8" value="0">
- </constant>
- <constant name="FORMAT_LA8" value="1">
- </constant>
- <constant name="FORMAT_R8" value="2">
- </constant>
- <constant name="FORMAT_RG8" value="3">
- </constant>
- <constant name="FORMAT_RGB8" value="4">
- </constant>
- <constant name="FORMAT_RGBA8" value="5">
- </constant>
- <constant name="FORMAT_RGBA4444" value="6">
- </constant>
- <constant name="FORMAT_RGBA5551" value="7">
- </constant>
- <constant name="FORMAT_RF" value="8">
- </constant>
- <constant name="FORMAT_RGF" value="9">
- </constant>
- <constant name="FORMAT_RGBF" value="10">
- </constant>
- <constant name="FORMAT_RGBAF" value="11">
- </constant>
- <constant name="FORMAT_RH" value="12">
- </constant>
- <constant name="FORMAT_RGH" value="13">
- </constant>
- <constant name="FORMAT_RGBH" value="14">
- </constant>
- <constant name="FORMAT_RGBAH" value="15">
- </constant>
- <constant name="FORMAT_RGBE9995" value="16">
- </constant>
- <constant name="FORMAT_DXT1" value="17">
- </constant>
- <constant name="FORMAT_DXT3" value="18">
- </constant>
- <constant name="FORMAT_DXT5" value="19">
- </constant>
- <constant name="FORMAT_RGTC_R" value="20">
- </constant>
- <constant name="FORMAT_RGTC_RG" value="21">
- </constant>
- <constant name="FORMAT_BPTC_RGBA" value="22">
- </constant>
- <constant name="FORMAT_BPTC_RGBF" value="23">
- </constant>
- <constant name="FORMAT_BPTC_RGBFU" value="24">
- </constant>
- <constant name="FORMAT_PVRTC2" value="25">
- </constant>
- <constant name="FORMAT_PVRTC2A" value="26">
- </constant>
- <constant name="FORMAT_PVRTC4" value="27">
- </constant>
- <constant name="FORMAT_PVRTC4A" value="28">
- </constant>
- <constant name="FORMAT_ETC" value="29">
- </constant>
- <constant name="FORMAT_ETC2_R11" value="30">
- </constant>
- <constant name="FORMAT_ETC2_R11S" value="31">
- </constant>
- <constant name="FORMAT_ETC2_RG11" value="32">
- </constant>
- <constant name="FORMAT_ETC2_RG11S" value="33">
- </constant>
- <constant name="FORMAT_ETC2_RGB8" value="34">
- </constant>
- <constant name="FORMAT_ETC2_RGBA8" value="35">
- </constant>
- <constant name="FORMAT_ETC2_RGB8A1" value="36">
- </constant>
- <constant name="FORMAT_MAX" value="37">
- </constant>
- <constant name="INTERPOLATE_NEAREST" value="0">
- </constant>
- <constant name="INTERPOLATE_BILINEAR" value="1">
- </constant>
- <constant name="INTERPOLATE_CUBIC" value="2">
- </constant>
- <constant name="ALPHA_NONE" value="0">
- </constant>
- <constant name="ALPHA_BIT" value="1">
- </constant>
- <constant name="ALPHA_BLEND" value="2">
- </constant>
- <constant name="COMPRESS_S3TC" value="0">
- </constant>
- <constant name="COMPRESS_PVRTC2" value="1">
- </constant>
- <constant name="COMPRESS_PVRTC4" value="2">
- </constant>
- <constant name="COMPRESS_ETC" value="3">
- </constant>
- <constant name="COMPRESS_ETC2" value="4">
- </constant>
- <constant name="COMPRESS_SOURCE_GENERIC" value="0">
- </constant>
- <constant name="COMPRESS_SOURCE_SRGB" value="1">
- </constant>
- <constant name="COMPRESS_SOURCE_NORMAL" value="2">
- </constant>
- </constants>
-</class>
-<class name="ImageTexture" inherits="Texture" category="Core">
- <brief_description>
- A [Texture] based on an [Image].
- </brief_description>
- <description>
- A [Texture] based on an [Image]. Can be created from an [Image].
- </description>
- <methods>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="3" name="flags" type="int" default="7">
- </argument>
- <description>
- Create a new [ImageTexture] with "width" and "height".
- "format" one of [Image].FORMAT_*.
- "flags" one or more of [Texture].FLAG_*.
- </description>
- </method>
- <method name="create_from_image">
- <return type="void">
- </return>
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="flags" type="int" default="7">
- </argument>
- <description>
- Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
- </description>
- </method>
- <method name="get_format" qualifiers="const">
- <return type="int" enum="Image.Format">
- </return>
- <description>
- Return the format of the [ImageTexture], one of [Image].FORMAT_*.
- </description>
- </method>
- <method name="get_lossy_storage_quality" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
- </description>
- </method>
- <method name="get_storage" qualifiers="const">
- <return type="int" enum="ImageTexture.Storage">
- </return>
- <description>
- Return the storage type. One of [ImageTexture].STORAGE_*.
- </description>
- </method>
- <method name="load">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Load an [ImageTexure].
- </description>
- </method>
- <method name="set_data">
- <return type="void">
- </return>
- <argument index="0" name="image" type="Image">
- </argument>
- <description>
- Set the [Image] of this [ImageTexture].
- </description>
- </method>
- <method name="set_lossy_storage_quality">
- <return type="void">
- </return>
- <argument index="0" name="quality" type="float">
- </argument>
- <description>
- Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
- </description>
- </method>
- <method name="set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_storage">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="ImageTexture.Storage">
- </argument>
- <description>
- Set the storage type. One of [ImageTexture].STORAGE_*.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="STORAGE_RAW" value="0">
- [Image] data is stored raw and unaltered.
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSY" value="1">
- [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality].
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSLESS" value="2">
- [Image] data is compressed with a lossless algorithm.
- </constant>
- </constants>
-</class>
-<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core">
- <brief_description>
- Node to draw simple geometry from code, ala OpenGL 1.x
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_sphere">
- <return type="void">
- </return>
- <argument index="0" name="lats" type="int">
- </argument>
- <argument index="1" name="lons" type="int">
- </argument>
- <argument index="2" name="radius" type="float">
- </argument>
- <argument index="3" name="add_uv" type="bool" default="true">
- </argument>
- <description>
- Simple helper to draw a uvsphere, with given latitudes, longitude and radius.
- </description>
- </method>
- <method name="add_vertex">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <description>
- Add a vertex with the currently set color/uv/etc.
- </description>
- </method>
- <method name="begin">
- <return type="void">
- </return>
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
- </argument>
- <argument index="1" name="texture" type="Texture" default="null">
- </argument>
- <description>
- Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
- For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear everything that was drawn using begin/end.
- </description>
- </method>
- <method name="end">
- <return type="void">
- </return>
- <description>
- Call this when done adding a batch of geometry, otherwise it can't be displayed.
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Set the color that the next vertex will use to be drawn.
- </description>
- </method>
- <method name="set_normal">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Set the normal that the next vertex will use to be drawn.
- </description>
- </method>
- <method name="set_tangent">
- <return type="void">
- </return>
- <argument index="0" name="tangent" type="Plane">
- </argument>
- <description>
- Set the tangent (and binormal facing) that the next vertex will use to be drawn.
- </description>
- </method>
- <method name="set_uv">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- Set the UV that the next vertex will use to be drawn.
- </description>
- </method>
- <method name="set_uv2">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- Set the second layer of UV that the next vertex will use to be drawn.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Input" inherits="Object" category="Core">
- <brief_description>
- A Singleton that deals with inputs.
- </brief_description>
- <description>
- A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions.
- </description>
- <methods>
- <method name="action_press">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- This will simulate pressing the specificed action.
- </description>
- </method>
- <method name="action_release">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- If the specified action is already pressed, this will release it.
- </description>
- </method>
- <method name="add_joy_mapping">
- <return type="void">
- </return>
- <argument index="0" name="mapping" type="String">
- </argument>
- <argument index="1" name="update_existing" type="bool" default="false">
- </argument>
- <description>
- Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
- </description>
- </method>
- <method name="get_accelerometer" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- If the device has an accelerometer, this will return the movement.
- </description>
- </method>
- <method name="get_connected_joypads">
- <return type="Array">
- </return>
- <description>
- Returns an [Array] containing the device IDs of all currently connected joypads.
- </description>
- </method>
- <method name="get_gravity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gyroscope" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis.
- </description>
- </method>
- <method name="get_joy_axis" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <argument index="1" name="axis" type="int">
- </argument>
- <description>
- Returns the current value of the joypad axis at given index (see JOY_* constants in [@Global Scope])
- </description>
- </method>
- <method name="get_joy_axis_index_from_string">
- <return type="int">
- </return>
- <argument index="0" name="axis" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_joy_axis_string">
- <return type="String">
- </return>
- <argument index="0" name="axis_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_joy_button_index_from_string">
- <return type="int">
- </return>
- <argument index="0" name="button" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_joy_button_string">
- <return type="String">
- </return>
- <argument index="0" name="button_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_joy_guid" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise.
- </description>
- </method>
- <method name="get_joy_name">
- <return type="String">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Returns the name of the joypad at the specified device index
- </description>
- </method>
- <method name="get_joy_vibration_duration">
- <return type="float">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Returns the duration of the current vibration effect in seconds.
- </description>
- </method>
- <method name="get_joy_vibration_strength">
- <return type="Vector2">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
- </description>
- </method>
- <method name="get_last_mouse_speed" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion.
- </description>
- </method>
- <method name="get_magnetometer" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes.
- </description>
- </method>
- <method name="get_mouse_button_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together.
- </description>
- </method>
- <method name="get_mouse_mode" qualifiers="const">
- <return type="int" enum="Input.MouseMode">
- </return>
- <description>
- Return the mouse mode. See the constants for more information.
- </description>
- </method>
- <method name="is_action_just_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_action_just_released" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_action_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap].
- </description>
- </method>
- <method name="is_joy_button_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <argument index="1" name="button" type="int">
- </argument>
- <description>
- Returns if the joypad button at the given index is currently pressed. (see JOY_* constants in [@Global Scope])
- </description>
- </method>
- <method name="is_joy_known">
- <return type="bool">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
- </description>
- </method>
- <method name="is_key_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="scancode" type="int">
- </argument>
- <description>
- Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope].
- </description>
- </method>
- <method name="is_mouse_button_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="button" type="int">
- </argument>
- <description>
- Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope].
- </description>
- </method>
- <method name="parse_input_event">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_joy_mapping">
- <return type="void">
- </return>
- <argument index="0" name="guid" type="String">
- </argument>
- <description>
- Removes all mappings from the internal db that match the given uid.
- </description>
- </method>
- <method name="set_custom_mouse_cursor">
- <return type="void">
- </return>
- <argument index="0" name="image" type="Resource">
- </argument>
- <argument index="1" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mouse_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Input.MouseMode">
- </argument>
- <description>
- Set the mouse mode. See the constants for more information.
- </description>
- </method>
- <method name="start_joy_vibration">
- <return type="void">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <argument index="1" name="weak_magnitude" type="float">
- </argument>
- <argument index="2" name="strong_magnitude" type="float">
- </argument>
- <argument index="3" name="duration" type="float" default="0">
- </argument>
- <description>
- Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
- Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds.
- </description>
- </method>
- <method name="stop_joy_vibration">
- <return type="void">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- Stops the vibration of the joypad.
- </description>
- </method>
- <method name="warp_mouse_pos">
- <return type="void">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Sets the mouse position to the specified vector.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="joy_connection_changed">
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="connected" type="bool">
- </argument>
- <description>
- Emitted when a joypad device has been connected or disconnected
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MOUSE_MODE_VISIBLE" value="0">
- Makes the mouse cursor visible if it is hidden.
- </constant>
- <constant name="MOUSE_MODE_HIDDEN" value="1">
- Makes the mouse cursor hidden if it is visible.
- </constant>
- <constant name="MOUSE_MODE_CAPTURED" value="2">
- Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses.
- </constant>
- <constant name="MOUSE_MODE_CONFINED" value="3">
- </constant>
- </constants>
-</class>
-<class name="InputDefault" inherits="Input" category="Core">
- <brief_description>
- Default implementation of the [Input] class.
- </brief_description>
- <description>
- Default implementation of the [Input] class, used internally by the editor and games for default input management.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="InputEvent" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="action_match" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="as_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_device" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_action" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Return if this input event matches a pre-defined action, no matter the type.
- </description>
- </method>
- <method name="is_action_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
- </description>
- </method>
- <method name="is_action_released" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
- </description>
- </method>
- <method name="is_action_type" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_echo" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if this input event is an echo event (only for events of type KEY, it will return false for other types).
- </description>
- </method>
- <method name="is_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
- </description>
- </method>
- <method name="set_device">
- <return type="void">
- </return>
- <argument index="0" name="device" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_id">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shortcut_match" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="xformed_by" qualifiers="const">
- <return type="InputEvent">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <argument index="1" name="local_ofs" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="device" type="int" setter="set_device" getter="get_device" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventAction" inherits="InputEvent" category="Core">
- <brief_description>
- Input event type for actions.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_action" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_action">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="action" type="String" setter="set_action" getter="get_action" brief="">
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventJoypadButton" inherits="InputEvent" category="Core">
- <brief_description>
- Input event type for joypad button events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_button_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pressure" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_button_index">
- <return type="void">
- </return>
- <argument index="0" name="button_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressure">
- <return type="void">
- </return>
- <argument index="0" name="pressure" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" brief="">
- Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope].
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- Pressed state of the joypad button.
- </member>
- <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" brief="">
- Intensity of the button pressure, ranges from 0 to 1.0.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core">
- <brief_description>
- Input event type for joypad motion/axis events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_axis" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_axis_value" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_axis">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_axis_value">
- <return type="void">
- </return>
- <argument index="0" name="axis_value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="axis" type="int" setter="set_axis" getter="get_axis" brief="">
- Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope].
- </member>
- <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" brief="">
- Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core">
- <brief_description>
- Input event type for keyboard events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_scancode" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_scancode_with_modifiers" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unicode" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_echo">
- <return type="void">
- </return>
- <argument index="0" name="echo" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_scancode">
- <return type="void">
- </return>
- <argument index="0" name="scancode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_unicode">
- <return type="void">
- </return>
- <argument index="0" name="unicode" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="echo" type="bool" setter="set_echo" getter="is_echo" brief="">
- Echo state of the key, i.e. whether it's a repeat event or not.
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- Pressed state of the key.
- </member>
- <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" brief="">
- Scancode of the key, one of the KEY_* constants in [@Global Scope].
- </member>
- <member name="unicode" type="int" setter="set_unicode" getter="get_unicode" brief="">
- Unicode identifier of the key (when relevant).
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core">
- <brief_description>
- Base input event type for mouse events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_button_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_global_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_button_mask">
- <return type="void">
- </return>
- <argument index="0" name="button_mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_global_position">
- <return type="void">
- </return>
- <argument index="0" name="global_position" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" brief="">
- Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
- </member>
- <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" brief="">
- Global position of the mouse click.
- </member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" brief="">
- Local position of the mouse click.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core">
- <brief_description>
- Input event type for mouse button events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_button_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_factor">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_doubleclick" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_button_index">
- <return type="void">
- </return>
- <argument index="0" name="button_index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_doubleclick">
- <return type="void">
- </return>
- <argument index="0" name="doubleclick" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_factor">
- <return type="void">
- </return>
- <argument index="0" name="factor" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" brief="">
- Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope].
- </member>
- <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" brief="">
- Whether the event is a double-click.
- </member>
- <member name="factor" type="float" setter="set_factor" getter="get_factor" brief="">
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- Pressed state of the mouse button.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core">
- <brief_description>
- Input event type for mouse motion events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_relative" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_speed" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_relative">
- <return type="void">
- </return>
- <argument index="0" name="relative" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_speed">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" brief="">
- Position of the mouse pointer relative to the previous mouse position.
- </member>
- <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" brief="">
- Speed of the mouse pointer.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventScreenDrag" inherits="InputEvent" category="Core">
- <brief_description>
- Input event type for screen drag events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_relative" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_speed" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_relative">
- <return type="void">
- </return>
- <argument index="0" name="relative" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_speed">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="index" type="int" setter="set_index" getter="get_index" brief="">
- Drag event index in the case of a multi-drag event.
- </member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" brief="">
- Position of the drag event.
- </member>
- <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" brief="">
- Position of the drag event relative to its start position.
- </member>
- <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" brief="">
- Speed of the drag event.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventScreenTouch" inherits="InputEvent" category="Core">
- <brief_description>
- Input event type for screen touch events.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_position">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed">
- <return type="void">
- </return>
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="index" type="int" setter="set_index" getter="get_index" brief="">
- Touch event index in the case of a multi-touch event.
- </member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" brief="">
- Position of the touch event.
- </member>
- <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
- Pressed state of the touch event.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputEventWithModifiers" inherits="InputEvent" category="Core">
- <brief_description>
- Base class for input events with modifiers.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_alt" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_command" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_control" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_metakey" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shift" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_alt">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_command">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_control">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_metakey">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shift">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="alt" type="bool" setter="set_alt" getter="get_alt" brief="">
- State of the Alt modifier.
- </member>
- <member name="command" type="bool" setter="set_command" getter="get_command" brief="">
- State of the Command modifier.
- </member>
- <member name="control" type="bool" setter="set_control" getter="get_control" brief="">
- State of the Ctrl modifier.
- </member>
- <member name="meta" type="bool" setter="set_metakey" getter="get_metakey" brief="">
- State of the Meta modifier.
- </member>
- <member name="shift" type="bool" setter="set_shift" getter="get_shift" brief="">
- State of the Shift modifier.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="InputMap" inherits="Object" category="Core">
- <brief_description>
- Singleton that manages actions.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="action_add_event">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <description>
- Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
- </description>
- </method>
- <method name="action_erase_event">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <description>
- Remove an [InputEvent] from an action.
- </description>
- </method>
- <method name="action_has_event">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <description>
- Whether an action has an [InputEvent] associated with it.
- </description>
- </method>
- <method name="add_action">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
- </description>
- </method>
- <method name="erase_action">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Remove an action from the [InputMap].
- </description>
- </method>
- <method name="event_is_action" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <argument index="1" name="action" type="String">
- </argument>
- <description>
- Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
- </description>
- </method>
- <method name="get_action_list">
- <return type="Array">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Return an array of InputEvents associated with a given action.
- </description>
- </method>
- <method name="get_actions">
- <return type="Array">
- </return>
- <description>
- Return an array of all actions in the [InputMap].
- </description>
- </method>
- <method name="has_action" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- Whether this InputMap has a registered action with the given name.
- </description>
- </method>
- <method name="load_from_globals">
- <return type="void">
- </return>
- <description>
- Clear the [InputMap] and load it anew from [ProjectSettings].
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="InstancePlaceholder" inherits="Node" category="Core">
- <brief_description>
- Placeholder for the root [Node] of a [PackedScene].
- </brief_description>
- <description>
- Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstacePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
- The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
- </description>
- <methods>
- <method name="get_instance_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Retrieve the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance].
- </description>
- </method>
- <method name="get_stored_values">
- <return type="Dictionary">
- </return>
- <argument index="0" name="with_order" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="replace_by_instance">
- <return type="void">
- </return>
- <argument index="0" name="custom_scene" type="PackedScene" default="null">
- </argument>
- <description>
- Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="InterpolatedCamera" inherits="Camera" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_speed" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_target_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="is_interpolation_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_interpolation_enabled">
- <return type="void">
- </return>
- <argument index="0" name="target_path" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_speed">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_target">
- <return type="void">
- </return>
- <argument index="0" name="target" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_target_path">
- <return type="void">
- </return>
- <argument index="0" name="target_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled" brief="">
- </member>
- <member name="speed" type="float" setter="set_speed" getter="get_speed" brief="">
- </member>
- <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ItemList" inherits="Control" category="Core">
- <brief_description>
- Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
- </brief_description>
- <description>
- This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons,
- or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list
- may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled
- to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key).
- </description>
- <methods>
- <method name="add_icon_item">
- <return type="void">
- </return>
- <argument index="0" name="icon" type="Texture">
- </argument>
- <argument index="1" name="selectable" type="bool" default="true">
- </argument>
- <description>
- Adds an item to the item list with no text, only an icon.
- </description>
- </method>
- <method name="add_item">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <argument index="1" name="icon" type="Texture" default="null">
- </argument>
- <argument index="2" name="selectable" type="bool" default="true">
- </argument>
- <description>
- Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon.
- If selectable is true the list item will be selectable.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Remove all items from the list.
- </description>
- </method>
- <method name="ensure_current_is_visible">
- <return type="void">
- </return>
- <description>
- Ensure selection is visible, adjusting the scroll position as necessary.
- </description>
- </method>
- <method name="get_allow_rmb_select" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether or not items may be selected via right mouse clicking.
- </description>
- </method>
- <method name="get_fixed_column_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- If column size has been fixed to a value, return that value.
- </description>
- </method>
- <method name="get_fixed_icon_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_icon_mode" qualifiers="const">
- <return type="int" enum="ItemList.IconMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_icon_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_item_at_pos" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="exact" type="bool" default="false">
- </argument>
- <description>
- Given a position within the control return the item (if any) at that point.
- </description>
- </method>
- <method name="get_item_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return count of items currently in the item list.
- </description>
- </method>
- <method name="get_item_custom_bg_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_icon_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_text" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the text for specified item index.
- </description>
- </method>
- <method name="get_item_tooltip" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return tooltip hint for specified item index.
- </description>
- </method>
- <method name="get_max_columns" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return total number of columns in use by the list.
- </description>
- </method>
- <method name="get_max_text_lines" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return total number of lines currently in use by the list.
- </description>
- </method>
- <method name="get_select_mode" qualifiers="const">
- <return type="int" enum="ItemList.SelectMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selected_items">
- <return type="PoolIntArray">
- </return>
- <description>
- Returns the list of selected indexes.
- </description>
- </method>
- <method name="get_v_scroll">
- <return type="VScrollBar">
- </return>
- <description>
- Returns the current vertical scroll bar for the List.
- </description>
- </method>
- <method name="has_auto_height" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_item_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns whether or not the item at the specified index is disabled
- </description>
- </method>
- <method name="is_item_selectable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns whether or not the item at the specified index is selectable.
- </description>
- </method>
- <method name="is_item_tooltip_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns whether the tooptip is enabled for specified item index.
- </description>
- </method>
- <method name="is_same_column_width" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether or not all columns of the list are of the same size.
- </description>
- </method>
- <method name="is_selected" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns whether or not item at the specified index is currently selected.
- </description>
- </method>
- <method name="remove_item">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove item at specified index from the list.
- </description>
- </method>
- <method name="select">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="single" type="bool" default="true">
- </argument>
- <description>
- Select the item at the specified index.
- Note: This method does not trigger the item selection signal.
- </description>
- </method>
- <method name="set_allow_rmb_select">
- <return type="void">
- </return>
- <argument index="0" name="allow" type="bool">
- </argument>
- <description>
- Allow (or disallow) selection of (selectable) items in the list using right mouse button.
- </description>
- </method>
- <method name="set_auto_height">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fixed_column_width">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <description>
- Set the size (width) all columns in the list are to use.
- </description>
- </method>
- <method name="set_fixed_icon_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="ItemList.IconMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_custom_bg_color">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="custom_bg_color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_disabled">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- Disable (or enable) item at specified index.
- Disabled items are not be selectable and do not fire activation (Enter or double-click) signals.
- </description>
- </method>
- <method name="set_item_icon">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Texture">
- </argument>
- <description>
- Set (or replace) icon of the item at the specified index.
- </description>
- </method>
- <method name="set_item_icon_region">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_metadata">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="metadata" type="Variant">
- </argument>
- <description>
- Sets a value (of any type) to be stored with the item at the specified index.
- </description>
- </method>
- <method name="set_item_selectable">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="selectable" type="bool">
- </argument>
- <description>
- Allow or disallow selection of the item at the specified index.
- </description>
- </method>
- <method name="set_item_text">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- Sets text of item at specified index.
- </description>
- </method>
- <method name="set_item_tooltip">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="tooltip" type="String">
- </argument>
- <description>
- Sets tooltip hint for item at specified index.
- </description>
- </method>
- <method name="set_item_tooltip_enabled">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Sets whether the tooltip is enabled for specified item index.
- </description>
- </method>
- <method name="set_max_columns">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set maximum number of columns to use for the list.
- </description>
- </method>
- <method name="set_max_text_lines">
- <return type="void">
- </return>
- <argument index="0" name="lines" type="int">
- </argument>
- <description>
- Set maximum number of lines to use for the list.
- </description>
- </method>
- <method name="set_same_column_width">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Sets a fixed size (width) to use for all columns of the list.
- </description>
- </method>
- <method name="set_select_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="ItemList.SelectMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="sort_items_by_text">
- <return type="void">
- </return>
- <description>
- Sorts items in the list by their text.
- </description>
- </method>
- <method name="unselect">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Ensure item at specified index is not selected.
- </description>
- </method>
- </methods>
- <members>
- <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" brief="">
- </member>
- <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height" brief="">
- </member>
- <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" brief="">
- </member>
- <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" brief="" enum="ItemList.IconMode">
- </member>
- <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" brief="">
- </member>
- <member name="items" type="Array" setter="_set_items" getter="_get_items" brief="">
- </member>
- <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" brief="">
- </member>
- <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines" brief="">
- </member>
- <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" brief="">
- </member>
- <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" brief="" enum="ItemList.SelectMode">
- </member>
- </members>
- <signals>
- <signal name="item_activated">
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Fired when specified list item is activated via double click or Enter.
- </description>
- </signal>
- <signal name="item_rmb_selected">
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="atpos" type="Vector2">
- </argument>
- <description>
- Fired when specified list item has been selected via right mouse clicking.
- The click position is also provided to allow appropriate popup of context menus
- at the correct location.
- </description>
- </signal>
- <signal name="item_selected">
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Fired when specified item has been selected.
- </description>
- </signal>
- <signal name="multi_selected">
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="selected" type="bool">
- </argument>
- <description>
- Fired when a multiple selection is altered on a list allowing mutliple selection.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ICON_MODE_TOP" value="0">
- </constant>
- <constant name="ICON_MODE_LEFT" value="1">
- </constant>
- <constant name="SELECT_SINGLE" value="0">
- </constant>
- <constant name="SELECT_MULTI" value="1">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="bg_focus" type="StyleBox">
- </theme_item>
- <theme_item name="cursor" type="StyleBox">
- </theme_item>
- <theme_item name="cursor_unfocused" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_selected" type="Color">
- </theme_item>
- <theme_item name="guide_color" type="Color">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="icon_margin" type="int">
- </theme_item>
- <theme_item name="line_separation" type="int">
- </theme_item>
- <theme_item name="selected" type="StyleBox">
- </theme_item>
- <theme_item name="selected_focus" type="StyleBox">
- </theme_item>
- <theme_item name="vseparation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="Joint" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_exclude_nodes_from_collision" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_a" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_b" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_solver_priority" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_exclude_nodes_from_collision">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_node_a">
- <return type="void">
- </return>
- <argument index="0" name="node" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_node_b">
- <return type="void">
- </return>
- <argument index="0" name="node" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_solver_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" brief="">
- </member>
- <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a" brief="">
- </member>
- <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b" brief="">
- </member>
- <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Joint2D" inherits="Node2D" category="Core">
- <brief_description>
- Base node for all joint constraints in 2D physics.
- </brief_description>
- <description>
- Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
- </description>
- <methods>
- <method name="get_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_exclude_nodes_from_collision" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_a" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- Return the path to the A node for the joint.
- </description>
- </method>
- <method name="get_node_b" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- Return the path to the B node for the joint.
- </description>
- </method>
- <method name="set_bias">
- <return type="void">
- </return>
- <argument index="0" name="bias" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_exclude_nodes_from_collision">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_node_a">
- <return type="void">
- </return>
- <argument index="0" name="node" type="NodePath">
- </argument>
- <description>
- Set the path to the A node for the joint. Must be of type [PhysicsBody2D].
- </description>
- </method>
- <method name="set_node_b">
- <return type="void">
- </return>
- <argument index="0" name="node" type="NodePath">
- </argument>
- <description>
- Set the path to the B node for the joint. Must be of type [PhysicsBody2D].
- </description>
- </method>
- </methods>
- <members>
- <member name="bias" type="float" setter="set_bias" getter="get_bias" brief="">
- </member>
- <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" brief="">
- </member>
- <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" brief="">
- </member>
- <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="KinematicBody" inherits="PhysicsBody" category="Core">
- <brief_description>
- Kinematic body 3D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
- Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
- </description>
- <methods>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_safe_margin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_slide_collision">
- <return type="KinematicCollision">
- </return>
- <argument index="0" name="slide_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_slide_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="move_and_collide">
- <return type="KinematicCollision">
- </return>
- <argument index="0" name="rel_vec" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector3">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="2" name="slope_stop_min_velocity" type="float" default="0.05">
- </argument>
- <argument index="3" name="max_slides" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_safe_margin">
- <return type="void">
- </return>
- <argument index="0" name="pixels" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform">
- </argument>
- <argument index="1" name="rel_vec" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core">
- <brief_description>
- Kinematic body 2D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
- Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
- </description>
- <methods>
- <method name="get_collision_collider" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_collider_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_collider_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_collider_shape" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_collider_shape_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_collider_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- Return the velocity of the body that collided with this one.
- </description>
- </method>
- <method name="get_collision_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_local_shape" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_remainder" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_travel" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="collision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_safe_margin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="move">
- <return type="Dictionary">
- </return>
- <argument index="0" name="rel_vec" type="Vector2">
- </argument>
- <description>
- Move the body in the given direction, stopping if there is an obstacle. If as a result of a movement there will be any collision then informations about this collision will be in returned dictionary. Dictionary will contains those keys:
- - "position" - collision position
- - "normal" - collision normal
- - "local_shape" - id of this kinematic body shape that took part in a collision
- - "travel" - traveled movement before being stopped
- - "remainder" - remaining movement before being stopped
- - "collider_id" - id of the collider, it can be used when dealing with [Physics2DServer]
- - "collider" - colliding body
- - "collider_shape_index" - index of the colliding shape, inside collider body "collider_metadata"
- If the body did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. Please note that this method is less user friendly than [method move_and_slide]. If you don't want to program each edge case manually, then it's recommended to use [method move_and_slide] instead.
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector2">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="2" name="slope_stop_min_velocity" type="float" default="5">
- </argument>
- <argument index="3" name="max_bounces" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_safe_margin">
- <return type="void">
- </return>
- <argument index="0" name="pixels" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <argument index="1" name="rel_vec" type="Vector2">
- </argument>
- <description>
- Return true if there would be a collision if the body moved from the given point in the given direction.
- </description>
- </method>
- </methods>
- <members>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="KinematicCollision" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_collider" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_shape" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_shape_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_local_shape" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_remainder" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_travel" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="collider" type="Object" setter="" getter="get_collider" brief="">
- </member>
- <member name="collider_id" type="int" setter="" getter="get_collider_id" brief="">
- </member>
- <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata" brief="">
- </member>
- <member name="collider_shape" type="Object" setter="" getter="get_collider_shape" brief="">
- </member>
- <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" brief="">
- </member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" brief="">
- </member>
- <member name="local_shape" type="Object" setter="" getter="get_local_shape" brief="">
- </member>
- <member name="normal" type="Vector3" setter="" getter="get_normal" brief="">
- </member>
- <member name="position" type="Vector3" setter="" getter="get_position" brief="">
- </member>
- <member name="remainder" type="Vector3" setter="" getter="get_remainder" brief="">
- </member>
- <member name="travel" type="Vector3" setter="" getter="get_travel" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Label" inherits="Control" category="Core">
- <brief_description>
- Control that displays formatted text.
- </brief_description>
- <description>
- Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically.
- </description>
- <methods>
- <method name="get_align" qualifiers="const">
- <return type="int" enum="Label.Align">
- </return>
- <description>
- Return the alignment mode (any of the ALIGN_* enumeration values).
- </description>
- </method>
- <method name="get_line_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of lines.
- </description>
- </method>
- <method name="get_line_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the height of a line.
- </description>
- </method>
- <method name="get_lines_skipped" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the the number of lines to skipped before displaying.
- </description>
- </method>
- <method name="get_max_lines_visible" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the restricted number of lines to display. Returns -1 if unrestricted.
- </description>
- </method>
- <method name="get_percent_visible" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the restricted number of characters to display (as a percentage of the total text).
- </description>
- </method>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the label text. Text can contain newlines.
- </description>
- </method>
- <method name="get_total_character_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the total length of the text.
- </description>
- </method>
- <method name="get_valign" qualifiers="const">
- <return type="int" enum="Label.VAlign">
- </return>
- <description>
- Return the vertical alignment mode (any of the VALIGN_* enumeration values).
- </description>
- </method>
- <method name="get_visible_characters" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the restricted number of characters to display. Returns -1 if unrestricted.
- </description>
- </method>
- <method name="get_visible_line_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="has_autowrap" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
- </description>
- </method>
- <method name="is_clipping_text" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if text would be cut off if it is too wide.
- </description>
- </method>
- <method name="is_uppercase" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if text is displayed in all capitals.
- </description>
- </method>
- <method name="set_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="Label.Align">
- </argument>
- <description>
- Sets the alignment mode to any of the ALIGN_* enumeration values.
- </description>
- </method>
- <method name="set_autowrap">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows.
- </description>
- </method>
- <method name="set_clip_text">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Cuts off the rest of the text if it is too wide.
- </description>
- </method>
- <method name="set_lines_skipped">
- <return type="void">
- </return>
- <argument index="0" name="lines_skipped" type="int">
- </argument>
- <description>
- Sets the number of lines to skip before displaying. Useful for scrolling text.
- </description>
- </method>
- <method name="set_max_lines_visible">
- <return type="void">
- </return>
- <argument index="0" name="lines_visible" type="int">
- </argument>
- <description>
- Restricts the number of lines to display. Set to -1 to disable.
- </description>
- </method>
- <method name="set_percent_visible">
- <return type="void">
- </return>
- <argument index="0" name="percent_visible" type="float">
- </argument>
- <description>
- Restricts the number of characters to display (as a percentage of the total text).
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the label text. Text can contain newlines.
- </description>
- </method>
- <method name="set_uppercase">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Display text in all capitals.
- </description>
- </method>
- <method name="set_valign">
- <return type="void">
- </return>
- <argument index="0" name="valign" type="int" enum="Label.VAlign">
- </argument>
- <description>
- Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
- </description>
- </method>
- <method name="set_visible_characters">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Restricts the number of characters to display. Set to -1 to disable.
- </description>
- </method>
- </methods>
- <members>
- <member name="align" type="int" setter="set_align" getter="get_align" brief="" enum="Label.Align">
- </member>
- <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" brief="">
- </member>
- <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" brief="">
- </member>
- <member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped" brief="">
- </member>
- <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" brief="">
- </member>
- <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" brief="">
- </member>
- <member name="text" type="String" setter="set_text" getter="get_text" brief="">
- </member>
- <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" brief="">
- </member>
- <member name="valign" type="int" setter="set_valign" getter="get_valign" brief="" enum="Label.VAlign">
- </member>
- </members>
- <constants>
- <constant name="ALIGN_LEFT" value="0">
- Align rows to the left (default).
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- Align rows centered.
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- Align rows to the right (default).
- </constant>
- <constant name="ALIGN_FILL" value="3">
- Expand row whitespaces to fit the width.
- </constant>
- <constant name="VALIGN_TOP" value="0">
- Align the whole text to the top.
- </constant>
- <constant name="VALIGN_CENTER" value="1">
- Align the whole text to the center.
- </constant>
- <constant name="VALIGN_BOTTOM" value="2">
- Align the whole text to the bottom.
- </constant>
- <constant name="VALIGN_FILL" value="3">
- Align the whole text by spreading the rows.
- </constant>
- </constants>
- <theme_items>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_shadow" type="Color">
- </theme_item>
- <theme_item name="line_spacing" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="shadow_as_outline" type="int">
- </theme_item>
- <theme_item name="shadow_offset_x" type="int">
- </theme_item>
- <theme_item name="shadow_offset_y" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="LargeTexture" inherits="Texture" category="Core">
- <brief_description>
- A Texture capable of storing many smaller Textures with offsets.
- </brief_description>
- <description>
- A Texture capable of storing many smaller Textures with offsets.
- You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
- </description>
- <methods>
- <method name="add_piece">
- <return type="int">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- Add another [Texture] to this [LargeTexture], starting on offset "ofs".
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the [LargeTexture].
- </description>
- </method>
- <method name="get_piece_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the number of pieces currently in this [LargeTexture].
- </description>
- </method>
- <method name="get_piece_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the offset of the piece with index "idx".
- </description>
- </method>
- <method name="get_piece_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the [Texture] of the piece with index "idx".
- </description>
- </method>
- <method name="set_piece_offset">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="ofs" type="Vector2">
- </argument>
- <description>
- Set the offset of the piece with index "idx" to "ofs".
- </description>
- </method>
- <method name="set_piece_texture">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- Set the [Texture] of the piece with index "idx" to "ofs".
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Set the size of this [LargeTexture].
- </description>
- </method>
- </methods>
- <members>
- <member name="_data" type="Array" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Light" inherits="VisualInstance" category="Core">
- <brief_description>
- Provides a base class for different kinds of light nodes.
- </brief_description>
- <description>
- Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
- </description>
- <methods>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cull_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="Light.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shadow_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shadow_reverse_cull_face" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="has_shadow" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_editor_only" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_negative" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cull_mask">
- <return type="void">
- </return>
- <argument index="0" name="cull_mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_editor_only">
- <return type="void">
- </return>
- <argument index="0" name="editor_only" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_negative">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="Light.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_color">
- <return type="void">
- </return>
- <argument index="0" name="shadow_color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_reverse_cull_face">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" brief="">
- </member>
- <member name="light_color" type="Color" setter="set_color" getter="get_color" brief="">
- </member>
- <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" brief="">
- </member>
- <member name="light_energy" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" brief="">
- </member>
- <member name="light_specular" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" brief="">
- </member>
- <member name="shadow_contact" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" brief="">
- </member>
- <member name="shadow_max_distance" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_ENERGY" value="0">
- </constant>
- <constant name="PARAM_SPECULAR" value="1">
- </constant>
- <constant name="PARAM_RANGE" value="2">
- </constant>
- <constant name="PARAM_ATTENUATION" value="3">
- </constant>
- <constant name="PARAM_SPOT_ANGLE" value="4">
- </constant>
- <constant name="PARAM_SPOT_ATTENUATION" value="5">
- </constant>
- <constant name="PARAM_CONTACT_SHADOW_SIZE" value="6">
- </constant>
- <constant name="PARAM_SHADOW_MAX_DISTANCE" value="7">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="8">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="9">
- </constant>
- <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="10">
- </constant>
- <constant name="PARAM_SHADOW_NORMAL_BIAS" value="11">
- </constant>
- <constant name="PARAM_SHADOW_BIAS" value="12">
- </constant>
- <constant name="PARAM_MAX" value="14">
- </constant>
- </constants>
-</class>
-<class name="Light2D" inherits="Node2D" category="Core">
- <brief_description>
- Node that casts light in a 2D environment.
- </brief_description>
- <description>
- Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
- </description>
- <methods>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Return the color of the Light2D.
- </description>
- </method>
- <method name="get_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the energy value of the Light2D.
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the height of the Light2D. Used with 2D normalmapping.
- </description>
- </method>
- <method name="get_item_cull_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_item_shadow_cull_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_layer_range_max" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Set the maximum layer value of objects of the scene that are affected by the Light2D.
- </description>
- </method>
- <method name="get_layer_range_min" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the minimum layer value of objects of the scene that are affected by the Light2D.
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="Light2D.Mode">
- </return>
- <description>
- Return the current mode set to the Light2D.
- </description>
- </method>
- <method name="get_shadow_buffer_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the shadow buffer size.
- </description>
- </method>
- <method name="get_shadow_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Return the color of casted shadows for this Light2D.
- </description>
- </method>
- <method name="get_shadow_filter" qualifiers="const">
- <return type="int" enum="Light2D.ShadowFilter">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shadow_gradient_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shadow_smooth" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- Return the texture of the Light2D.
- </description>
- </method>
- <method name="get_texture_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the offset of the light texture.
- </description>
- </method>
- <method name="get_texture_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the scale value of the light texture.
- </description>
- </method>
- <method name="get_z_range_max" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
- </description>
- </method>
- <method name="get_z_range_min" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
- </description>
- </method>
- <method name="is_editor_only" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the Light2D is enabled, false if it is not.
- </description>
- </method>
- <method name="is_shadow_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if shadow casting is enabled for this Light2D, else return false.
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Set the color of the Light2D.
- </description>
- </method>
- <method name="set_editor_only">
- <return type="void">
- </return>
- <argument index="0" name="editor_only" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Switches the Light2D on or off, depending on the 'enabled' parameter.
- </description>
- </method>
- <method name="set_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- Set the energy value of the Light2D. The bigger the value, the stronger the light.
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- Set the height of the Light2D. Used with 2D normalmapping.
- </description>
- </method>
- <method name="set_item_cull_mask">
- <return type="void">
- </return>
- <argument index="0" name="item_cull_mask" type="int">
- </argument>
- <description>
- Set the item mask of the Light2D to 'item_mask' value.
- </description>
- </method>
- <method name="set_item_shadow_cull_mask">
- <return type="void">
- </return>
- <argument index="0" name="item_shadow_cull_mask" type="int">
- </argument>
- <description>
- Set the item shadow mask to 'item_shadow_mask' value.
- </description>
- </method>
- <method name="set_layer_range_max">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the maximum layer value of objects of the scene that are affected by the Light2D.
- </description>
- </method>
- <method name="set_layer_range_min">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the minimum layer value of objects of the scene that are affected by the Light2D.
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Light2D.Mode">
- </argument>
- <description>
- Set the behaviour mode of the Light2D. Use constants defined in the constants section.
- </description>
- </method>
- <method name="set_shadow_buffer_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- Set the shadow buffer size.
- </description>
- </method>
- <method name="set_shadow_color">
- <return type="void">
- </return>
- <argument index="0" name="shadow_color" type="Color">
- </argument>
- <description>
- Set the color of casted shadows for this Light2D.
- </description>
- </method>
- <method name="set_shadow_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Enable or disable shadows casting from this Light2D according to the 'enabled' parameter.
- </description>
- </method>
- <method name="set_shadow_filter">
- <return type="void">
- </return>
- <argument index="0" name="filter" type="int" enum="Light2D.ShadowFilter">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_gradient_length">
- <return type="void">
- </return>
- <argument index="0" name="multiplier" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_smooth">
- <return type="void">
- </return>
- <argument index="0" name="smooth" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- Set the texture of the Light2D.
- </description>
- </method>
- <method name="set_texture_offset">
- <return type="void">
- </return>
- <argument index="0" name="texture_offset" type="Vector2">
- </argument>
- <description>
- Set the offset of the light texture.
- </description>
- </method>
- <method name="set_texture_scale">
- <return type="void">
- </return>
- <argument index="0" name="texture_scale" type="float">
- </argument>
- <description>
- Set the scale value of the light texture.
- </description>
- </method>
- <method name="set_z_range_max">
- <return type="void">
- </return>
- <argument index="0" name="z" type="int">
- </argument>
- <description>
- Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
- </description>
- </method>
- <method name="set_z_range_min">
- <return type="void">
- </return>
- <argument index="0" name="z" type="int">
- </argument>
- <description>
- Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
- </description>
- </method>
- </methods>
- <members>
- <member name="color" type="Color" setter="set_color" getter="get_color" brief="">
- </member>
- <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" brief="">
- </member>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
- </member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="Light2D.Mode">
- </member>
- <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" brief="">
- </member>
- <member name="range_height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask" brief="">
- </member>
- <member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max" brief="">
- </member>
- <member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min" brief="">
- </member>
- <member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max" brief="">
- </member>
- <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" brief="">
- </member>
- <member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size" brief="">
- </member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" brief="">
- </member>
- <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" brief="">
- </member>
- <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" brief="" enum="Light2D.ShadowFilter">
- </member>
- <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" brief="">
- </member>
- <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" brief="">
- </member>
- <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" brief="">
- </member>
- </members>
- <constants>
- <constant name="MODE_ADD" value="0">
- Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light.
- </constant>
- <constant name="MODE_SUB" value="1">
- Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
- </constant>
- <constant name="MODE_MIX" value="2">
- Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
- </constant>
- <constant name="MODE_MASK" value="3">
- The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
- </constant>
- </constants>
-</class>
-<class name="LightOccluder2D" inherits="Node2D" category="Core">
- <brief_description>
- Occludes light cast by a Light2D, thus casting shadows.
- </brief_description>
- <description>
- Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.
- </description>
- <methods>
- <method name="get_occluder_light_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the light mask of the LightOccluder2D.
- </description>
- </method>
- <method name="get_occluder_polygon" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <description>
- Return the OccluderPolygon2D that defines the LightOccluder2D.
- </description>
- </method>
- <method name="set_occluder_light_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
- </description>
- </method>
- <method name="set_occluder_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="OccluderPolygon2D">
- </argument>
- <description>
- Set the OccluderPolygon2D that defines the LightOccluder2D.
- </description>
- </method>
- </methods>
- <members>
- <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief="">
- </member>
- <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Line2D" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_begin_cap_mode" qualifiers="const">
- <return type="int" enum="LineCapMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_end_cap_mode" qualifiers="const">
- <return type="int" enum="LineCapMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gradient" qualifiers="const">
- <return type="Gradient">
- </return>
- <description>
- </description>
- </method>
- <method name="get_joint_mode" qualifiers="const">
- <return type="int" enum="LineJointMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_point_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_points" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_round_precision" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sharp_limit" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture_mode" qualifiers="const">
- <return type="int" enum="LineTextureMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_begin_cap_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="LineCapMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_end_cap_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="LineCapMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gradient">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Gradient">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_joint_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="LineJointMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_pos">
- <return type="void">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_points">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_round_precision">
- <return type="void">
- </return>
- <argument index="0" name="precision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sharp_limit">
- <return type="void">
- </return>
- <argument index="0" name="limit" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="LineTextureMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_width">
- <return type="void">
- </return>
- <argument index="0" name="width" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" brief="" enum="LineCapMode">
- </member>
- <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" brief="">
- </member>
- <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" brief="" enum="LineCapMode">
- </member>
- <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
- </member>
- <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" brief="" enum="LineJointMode">
- </member>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" brief="">
- </member>
- <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" brief="">
- </member>
- <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" brief="" enum="LineTextureMode">
- </member>
- <member name="width" type="float" setter="set_width" getter="get_width" brief="">
- </member>
- </members>
- <constants>
- <constant name="LINE_JOINT_SHARP" value="0">
- </constant>
- <constant name="LINE_JOINT_BEVEL" value="1">
- </constant>
- <constant name="LINE_JOINT_ROUND" value="2">
- </constant>
- <constant name="LINE_CAP_NONE" value="0">
- </constant>
- <constant name="LINE_CAP_BOX" value="1">
- </constant>
- <constant name="LINE_CAP_ROUND" value="2">
- </constant>
- <constant name="LINE_TEXTURE_NONE" value="0">
- </constant>
- <constant name="LINE_TEXTURE_TILE" value="1">
- </constant>
- </constants>
-</class>
-<class name="LineEdit" inherits="Control" category="Core">
- <brief_description>
- Control that provides single line string editing.
- </brief_description>
- <description>
- LineEdit provides a single line string editor, used for text fields.
- </description>
- <methods>
- <method name="append_at_cursor">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Append text at cursor, scrolling the [LineEdit] when needed.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the [LineEdit] text.
- </description>
- </method>
- <method name="cursor_get_blink_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Gets whether the line edit caret is blinking.
- </description>
- </method>
- <method name="cursor_get_blink_speed" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Gets the line edit caret blink speed.
- </description>
- </method>
- <method name="cursor_set_blink_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the line edit caret to blink.
- </description>
- </method>
- <method name="cursor_set_blink_speed">
- <return type="void">
- </return>
- <argument index="0" name="blink_speed" type="float">
- </argument>
- <description>
- Set the line edit caret blink speed. Cannot be less then or equal to 0.
- </description>
- </method>
- <method name="get_align" qualifiers="const">
- <return type="int" enum="LineEdit.Align">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cursor_pos" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the cursor position inside the [LineEdit].
- </description>
- </method>
- <method name="get_expand_to_text_length" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_length" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
- </description>
- </method>
- <method name="get_menu" qualifiers="const">
- <return type="PopupMenu">
- </return>
- <description>
- </description>
- </method>
- <method name="get_placeholder" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_placeholder_alpha" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the text in the [LineEdit].
- </description>
- </method>
- <method name="is_editable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
- </description>
- </method>
- <method name="is_secret" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
- </description>
- </method>
- <method name="menu_option">
- <return type="void">
- </return>
- <argument index="0" name="option" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="select">
- <return type="void">
- </return>
- <argument index="0" name="from" type="int" default="0">
- </argument>
- <argument index="1" name="to" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="select_all">
- <return type="void">
- </return>
- <description>
- Select the whole string.
- </description>
- </method>
- <method name="set_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="LineEdit.Align">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cursor_pos">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Set the cursor position inside the [LineEdit], causing it to scroll if needed.
- </description>
- </method>
- <method name="set_editable">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
- </description>
- </method>
- <method name="set_expand_to_text_length">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_length">
- <return type="void">
- </return>
- <argument index="0" name="chars" type="int">
- </argument>
- <description>
- Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
- </description>
- </method>
- <method name="set_placeholder">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_placeholder_alpha">
- <return type="void">
- </return>
- <argument index="0" name="alpha" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_secret">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the text in the [LineEdit], clearing the existing one and the selection.
- </description>
- </method>
- </methods>
- <members>
- <member name="align" type="int" setter="set_align" getter="get_align" brief="" enum="LineEdit.Align">
- </member>
- <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" brief="">
- </member>
- <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" brief="">
- </member>
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" brief="">
- </member>
- <member name="expand_to_len" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" brief="">
- </member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="" enum="Control.FocusMode">
- </member>
- <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" brief="">
- </member>
- <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" brief="">
- </member>
- <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" brief="">
- </member>
- <member name="secret" type="bool" setter="set_secret" getter="is_secret" brief="">
- </member>
- <member name="text" type="String" setter="set_text" getter="get_text" brief="">
- </member>
- </members>
- <signals>
- <signal name="text_changed">
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- When the text changes, this signal is emitted.
- </description>
- </signal>
- <signal name="text_entered">
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ALIGN_LEFT" value="0">
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- </constant>
- <constant name="ALIGN_FILL" value="3">
- </constant>
- <constant name="MENU_CUT" value="0">
- </constant>
- <constant name="MENU_COPY" value="1">
- </constant>
- <constant name="MENU_PASTE" value="2">
- </constant>
- <constant name="MENU_CLEAR" value="3">
- </constant>
- <constant name="MENU_SELECT_ALL" value="4">
- </constant>
- <constant name="MENU_UNDO" value="5">
- </constant>
- <constant name="MENU_MAX" value="6">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="cursor_color" type="Color">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_selected" type="Color">
- </theme_item>
- <theme_item name="minimum_spaces" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="read_only" type="StyleBox">
- </theme_item>
- <theme_item name="selection_color" type="Color">
- </theme_item>
- </theme_items>
-</class>
-<class name="LineShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Line shape for 2D collision objects.
- </brief_description>
- <description>
- Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
- </description>
- <methods>
- <method name="get_d" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the line distance from the origin.
- </description>
- </method>
- <method name="get_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the line normal.
- </description>
- </method>
- <method name="set_d">
- <return type="void">
- </return>
- <argument index="0" name="d" type="float">
- </argument>
- <description>
- Set the line distance from the origin.
- </description>
- </method>
- <method name="set_normal">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector2">
- </argument>
- <description>
- Set the line normal.
- </description>
- </method>
- </methods>
- <members>
- <member name="d" type="float" setter="set_d" getter="get_d" brief="">
- </member>
- <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="LinkButton" inherits="BaseButton" category="Core">
- <brief_description>
- Simple button used to represent a link to some resource
- </brief_description>
- <description>
- This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page).
- </description>
- <methods>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the text of the button.
- </description>
- </method>
- <method name="get_underline_mode" qualifiers="const">
- <return type="int" enum="LinkButton.UnderlineMode">
- </return>
- <description>
- Returns the underline mode for this button.
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Sets the text of the button.
- </description>
- </method>
- <method name="set_underline_mode">
- <return type="void">
- </return>
- <argument index="0" name="underline_mode" type="int" enum="LinkButton.UnderlineMode">
- </argument>
- <description>
- Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section).
- </description>
- </method>
- </methods>
- <members>
- <member name="text" type="String" setter="set_text" getter="get_text" brief="">
- </member>
- <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" brief="" enum="LinkButton.UnderlineMode">
- </member>
- </members>
- <constants>
- <constant name="UNDERLINE_MODE_ALWAYS" value="0">
- The LinkButton will always show an underline at the bottom of its text
- </constant>
- <constant name="UNDERLINE_MODE_ON_HOVER" value="1">
- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
- </constant>
- <constant name="UNDERLINE_MODE_NEVER" value="2">
- The LinkButton will never show an underline at the bottom of its text.
- </constant>
- </constants>
- <theme_items>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="underline_spacing" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="Listener" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="clear_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_listener_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="is_current" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="make_current">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="MainLoop" inherits="Object" category="Core">
- <brief_description>
- Main loop is the abstract main loop base class.
- </brief_description>
- <description>
- Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
- </description>
- <methods>
- <method name="_drop_files" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="files" type="PoolStringArray">
- </argument>
- <argument index="1" name="screen" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_finalize" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="_idle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="_initialize" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="_input_event" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="ev" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="_input_text" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="_iteration" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="finish">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="idle">
- <return type="bool">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="init">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="input_event">
- <return type="void">
- </return>
- <argument index="0" name="ev" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="input_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="iteration">
- <return type="bool">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="2" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="3" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_IN" value="4" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_OUT" value="5" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="6" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8" enum="">
- </constant>
- <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9" enum="">
- </constant>
- <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="90" enum="">
- </constant>
- <constant name="NOTIFICATION_WM_ABOUT" value="91" enum="">
- </constant>
- </constants>
-</class>
-<class name="MarginContainer" inherits="Container" category="Core">
- <brief_description>
- Simple margin container.
- </brief_description>
- <description>
- Simple margin container. Adds a left margin to anything contained.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="margin_bottom" type="int">
- </theme_item>
- <theme_item name="margin_left" type="int">
- </theme_item>
- <theme_item name="margin_right" type="int">
- </theme_item>
- <theme_item name="margin_top" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="Marshalls" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="base64_to_raw">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="base64_str" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="base64_to_utf8">
- <return type="String">
- </return>
- <argument index="0" name="base64_str" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="base64_to_variant">
- <return type="Variant">
- </return>
- <argument index="0" name="base64_str" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="raw_to_base64">
- <return type="String">
- </return>
- <argument index="0" name="array" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="utf8_to_base64">
- <return type="String">
- </return>
- <argument index="0" name="utf8_str" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="variant_to_base64">
- <return type="String">
- </return>
- <argument index="0" name="variant" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Material" inherits="Resource" category="Core">
- <brief_description>
- Abstract base [Resource] for coloring and shading geometry.
- </brief_description>
- <description>
- Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
- </description>
- <methods>
- <method name="get_next_pass" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- </description>
- </method>
- <method name="get_render_priority" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_next_pass">
- <return type="void">
- </return>
- <argument index="0" name="next_pass" type="Material">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_render_priority">
- <return type="void">
- </return>
- <argument index="0" name="priority" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass" brief="">
- </member>
- <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" brief="">
- </member>
- </members>
- <constants>
- <constant name="RENDER_PRIORITY_MAX" value="127" enum="">
- </constant>
- <constant name="RENDER_PRIORITY_MIN" value="-128" enum="">
- </constant>
- </constants>
-</class>
-<class name="MenuButton" inherits="Button" category="Core">
- <brief_description>
- Special button that brings up a [PopupMenu] when clicked.
- </brief_description>
- <description>
- Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
- </description>
- <methods>
- <method name="get_popup">
- <return type="PopupMenu">
- </return>
- <description>
- Return the [PopupMenu] contained in this button.
- </description>
- </method>
- </methods>
- <members>
- <member name="items" type="Array" setter="_set_items" getter="_get_items" brief="">
- </member>
- </members>
- <signals>
- <signal name="about_to_show">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="Mesh" inherits="Resource" category="Core">
- <brief_description>
- A [Resource] that contains vertex-array based geometry.
- </brief_description>
- <description>
- Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
- </description>
- <methods>
- <method name="create_convex_shape" qualifiers="const">
- <return type="Shape">
- </return>
- <description>
- </description>
- </method>
- <method name="create_outline" qualifiers="const">
- <return type="Mesh">
- </return>
- <argument index="0" name="margin" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_trimesh_shape" qualifiers="const">
- <return type="Shape">
- </return>
- <description>
- </description>
- </method>
- <method name="generate_triangle_mesh" qualifiers="const">
- <return type="TriangleMesh">
- </return>
- <description>
- </description>
- </method>
- <method name="get_faces" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PRIMITIVE_POINTS" value="0">
- Render array as points (one vertex equals one point).
- </constant>
- <constant name="PRIMITIVE_LINES" value="1">
- Render array as lines (every two vertices a line is created).
- </constant>
- <constant name="PRIMITIVE_LINE_STRIP" value="2">
- Render array as line strip.
- </constant>
- <constant name="PRIMITIVE_LINE_LOOP" value="3">
- Render array as line loop (like line strip, but closed).
- </constant>
- <constant name="PRIMITIVE_TRIANGLES" value="4">
- Render array as triangles (every three vertices a triangle is created).
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5">
- Render array as triangle strips.
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
- Render array as triangle fans.
- </constant>
- </constants>
-</class>
-<class name="MeshDataTool" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="commit_to_surface">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="mesh" type="ArrayMesh">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_from_surface">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="mesh" type="ArrayMesh">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_edge_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_edge_faces" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_edge_meta" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_edge_vertex" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vertex" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_face_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_face_edge" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="edge" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_face_meta" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_face_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_face_vertex" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vertex" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_format" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_material" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vertex" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_bones" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vertex_edges" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_faces" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_meta" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_tangent" qualifiers="const">
- <return type="Plane">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_uv" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_uv2" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_weights" qualifiers="const">
- <return type="PoolRealArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_edge_meta">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="meta" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_face_meta">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="meta" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vertex" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_bones">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="bones" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_color">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_meta">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="meta" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_normal">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="normal" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_tangent">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="tangent" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_uv">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="uv" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_uv2">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="uv2" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertex_weights">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="weights" type="PoolRealArray">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="MeshInstance" inherits="GeometryInstance" category="Core">
- <brief_description>
- Node that instances meshes into a scenario.
- </brief_description>
- <description>
- MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
- </description>
- <methods>
- <method name="create_convex_collision">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="create_debug_tangents">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="create_trimesh_collision">
- <return type="void">
- </return>
- <description>
- This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const">
- <return type="Mesh">
- </return>
- <description>
- Return the current [Mesh] resource for the instance.
- </description>
- </method>
- <method name="get_skeleton_path">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_surface_material" qualifiers="const">
- <return type="Material">
- </return>
- <argument index="0" name="surface" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mesh">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="Mesh">
- </argument>
- <description>
- Set the [Mesh] resource for the instance.
- </description>
- </method>
- <method name="set_skeleton_path">
- <return type="void">
- </return>
- <argument index="0" name="skeleton_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_surface_material">
- <return type="void">
- </return>
- <argument index="0" name="surface" type="int">
- </argument>
- <argument index="1" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" brief="">
- </member>
- <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="MeshLibrary" inherits="Resource" category="Core">
- <brief_description>
- Library of meshes.
- </brief_description>
- <description>
- Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain.
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the library.
- </description>
- </method>
- <method name="create_item">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Create a new item in the library, supplied an id.
- </description>
- </method>
- <method name="find_item_by_name" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_list" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <description>
- Return the list of items.
- </description>
- </method>
- <method name="get_item_mesh" qualifiers="const">
- <return type="Mesh">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the mesh of the item.
- </description>
- </method>
- <method name="get_item_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the name of the item.
- </description>
- </method>
- <method name="get_item_navmesh" qualifiers="const">
- <return type="NavigationMesh">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_preview" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_shapes" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_last_unused_item_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get an unused id for a new item.
- </description>
- </method>
- <method name="remove_item">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Remove the item.
- </description>
- </method>
- <method name="set_item_mesh">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="mesh" type="Mesh">
- </argument>
- <description>
- Set the mesh of the item.
- </description>
- </method>
- <method name="set_item_name">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Set the name of the item.
- </description>
- </method>
- <method name="set_item_navmesh">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navmesh" type="NavigationMesh">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_preview">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_shapes">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shapes" type="Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="MultiMesh" inherits="Resource" category="Core">
- <brief_description>
- Provides high performance mesh instancing.
- </brief_description>
- <description>
- MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
- For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
- As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
- Since instances may have any behavior, the Rect3 used for visibility must be provided by the user.
- </description>
- <methods>
- <method name="get_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- Return the visibility Rect3.
- </description>
- </method>
- <method name="get_color_format" qualifiers="const">
- <return type="int" enum="MultiMesh.ColorFormat">
- </return>
- <description>
- </description>
- </method>
- <method name="get_instance_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="instance" type="int">
- </argument>
- <description>
- Get the color of a specific instance.
- </description>
- </method>
- <method name="get_instance_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of instances that is going to be drawn.
- </description>
- </method>
- <method name="get_instance_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="instance" type="int">
- </argument>
- <description>
- Return the transform of a specific instance.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const">
- <return type="Mesh">
- </return>
- <description>
- Return the [Mesh] resource drawn as multiple instances.
- </description>
- </method>
- <method name="get_transform_format" qualifiers="const">
- <return type="int" enum="MultiMesh.TransformFormat">
- </return>
- <description>
- </description>
- </method>
- <method name="set_color_format">
- <return type="void">
- </return>
- <argument index="0" name="format" type="int" enum="MultiMesh.ColorFormat">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_instance_color">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Set the color of a specific instance.
- </description>
- </method>
- <method name="set_instance_count">
- <return type="void">
- </return>
- <argument index="0" name="count" type="int">
- </argument>
- <description>
- Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data.
- </description>
- </method>
- <method name="set_instance_transform">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="int">
- </argument>
- <argument index="1" name="transform" type="Transform">
- </argument>
- <description>
- Set the transform for a specific instance.
- </description>
- </method>
- <method name="set_mesh">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="Mesh">
- </argument>
- <description>
- Set the [Mesh] resource to be drawn in multiple instances.
- </description>
- </method>
- <method name="set_transform_format">
- <return type="void">
- </return>
- <argument index="0" name="format" type="int" enum="MultiMesh.TransformFormat">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array" brief="">
- </member>
- <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" brief="" enum="MultiMesh.ColorFormat">
- </member>
- <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" brief="">
- </member>
- <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" brief="">
- </member>
- <member name="transform_array" type="PoolVector3Array" setter="_set_transform_array" getter="_get_transform_array" brief="">
- </member>
- <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" brief="" enum="MultiMesh.TransformFormat">
- </member>
- </members>
- <constants>
- <constant name="TRANSFORM_2D" value="0">
- </constant>
- <constant name="TRANSFORM_3D" value="1">
- </constant>
- <constant name="COLOR_NONE" value="0">
- </constant>
- <constant name="COLOR_8BIT" value="1">
- </constant>
- <constant name="COLOR_FLOAT" value="2">
- </constant>
- </constants>
-</class>
-<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core">
- <brief_description>
- Node that instances a [MultiMesh].
- </brief_description>
- <description>
- MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances).
- </description>
- <methods>
- <method name="get_multimesh" qualifiers="const">
- <return type="MultiMesh">
- </return>
- <description>
- Return the [MultiMesh] that is used for instancing.
- </description>
- </method>
- <method name="set_multimesh">
- <return type="void">
- </return>
- <argument index="0" name="multimesh" type="MultiMesh">
- </argument>
- <description>
- Set the [MultiMesh] to be instanced.
- </description>
- </method>
- </methods>
- <members>
- <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Mutex" inherits="Reference" category="Core">
- <brief_description>
- A synchronization Mutex.
- </brief_description>
- <description>
- A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
- </description>
- <methods>
- <method name="lock">
- <return type="void">
- </return>
- <description>
- Lock this [Mutex], blocks until it is unlocked by the current owner.
- </description>
- </method>
- <method name="try_lock">
- <return type="int" enum="Error">
- </return>
- <description>
- Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
- </description>
- </method>
- <method name="unlock">
- <return type="void">
- </return>
- <description>
- Unlock this [Mutex], leaving it to others threads.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="NativeScript" inherits="Script" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_class_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_library" qualifiers="const">
- <return type="GDNativeLibrary">
- </return>
- <description>
- </description>
- </method>
- <method name="new" qualifiers="vararg">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_class_name">
- <return type="void">
- </return>
- <argument index="0" name="class_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_library">
- <return type="void">
- </return>
- <argument index="0" name="library" type="GDNativeLibrary">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="class_name" type="String" setter="set_class_name" getter="get_class_name" brief="">
- </member>
- <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Navigation" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_closest_point">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_normal">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_owner">
- <return type="Object">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_to_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="use_collision" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_simple_path">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_up_vector" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="navmesh_create">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="NavigationMesh">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <argument index="2" name="owner" type="Object" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="navmesh_remove">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="navmesh_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_up_vector">
- <return type="void">
- </return>
- <argument index="0" name="up" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Navigation2D" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_closest_point">
- <return type="Vector2">
- </return>
- <argument index="0" name="to_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_closest_point_owner">
- <return type="Object">
- </return>
- <argument index="0" name="to_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_simple_path">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="start" type="Vector2">
- </argument>
- <argument index="1" name="end" type="Vector2">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="navpoly_create">
- <return type="int">
- </return>
- <argument index="0" name="mesh" type="NavigationPolygon">
- </argument>
- <argument index="1" name="xform" type="Transform2D">
- </argument>
- <argument index="2" name="owner" type="Object" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="navpoly_remove">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="navpoly_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="xform" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="NavigationMesh" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_polygons">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="create_from_mesh">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="Mesh">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_polygon">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_polygon_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vertices" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- </description>
- </method>
- <method name="set_vertices">
- <return type="void">
- </return>
- <argument index="0" name="vertices" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="polygons" type="Array" setter="_set_polygons" getter="_get_polygons" brief="">
- </member>
- <member name="vertices" type="PoolVector3Array" setter="set_vertices" getter="get_vertices" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="NavigationMeshInstance" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_navigation_mesh" qualifiers="const">
- <return type="NavigationMesh">
- </return>
- <description>
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_navigation_mesh">
- <return type="void">
- </return>
- <argument index="0" name="navmesh" type="NavigationMesh">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
- </member>
- <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="NavigationPolygon" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_outline">
- <return type="void">
- </return>
- <argument index="0" name="outline" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_outline_at_index">
- <return type="void">
- </return>
- <argument index="0" name="outline" type="PoolVector2Array">
- </argument>
- <argument index="1" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_outlines">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="clear_polygons">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_outline" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_outline_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_polygon">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_polygon_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vertices" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- </description>
- </method>
- <method name="make_polygons_from_outlines">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_outline">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_outline">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="outline" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vertices">
- <return type="void">
- </return>
- <argument index="0" name="vertices" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="outlines" type="Array" setter="_set_outlines" getter="_get_outlines" brief="">
- </member>
- <member name="polygons" type="Array" setter="_set_polygons" getter="_get_polygons" brief="">
- </member>
- <member name="vertices" type="PoolVector2Array" setter="set_vertices" getter="get_vertices" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="NavigationPolygonInstance" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <description>
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_navigation_polygon">
- <return type="void">
- </return>
- <argument index="0" name="navpoly" type="NavigationPolygon">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
- </member>
- <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core">
- <brief_description>
- PacketPeer implementation using the ENet library.
- </brief_description>
- <description>
- A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals.
- </description>
- <methods>
- <method name="close_connection">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="create_client">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="ip" type="String">
- </argument>
- <argument index="1" name="port" type="int">
- </argument>
- <argument index="2" name="in_bandwidth" type="int" default="0">
- </argument>
- <argument index="3" name="out_bandwidth" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_server">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="port" type="int">
- </argument>
- <argument index="1" name="max_clients" type="int" default="32">
- </argument>
- <argument index="2" name="in_bandwidth" type="int" default="0">
- </argument>
- <argument index="3" name="out_bandwidth" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_compression_mode" qualifiers="const">
- <return type="int" enum="NetworkedMultiplayerENet.CompressionMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_bind_ip">
- <return type="void">
- </return>
- <argument index="0" name="ip" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_compression_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerENet.CompressionMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="COMPRESS_NONE" value="0">
- </constant>
- <constant name="COMPRESS_RANGE_CODER" value="1">
- </constant>
- <constant name="COMPRESS_FASTLZ" value="2">
- </constant>
- <constant name="COMPRESS_ZLIB" value="3">
- </constant>
- <constant name="COMPRESS_ZSTD" value="4">
- </constant>
- </constants>
-</class>
-<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_connection_status" qualifiers="const">
- <return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus">
- </return>
- <description>
- </description>
- </method>
- <method name="get_packet_peer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unique_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_refusing_new_connections" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="poll">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_refuse_new_connections">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_target_peer">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_transfer_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="connection_failed">
- <description>
- </description>
- </signal>
- <signal name="connection_succeeded">
- <description>
- </description>
- </signal>
- <signal name="peer_connected">
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="peer_disconnected">
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="server_disconnected">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0">
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1">
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2">
- </constant>
- <constant name="CONNECTION_DISCONNECTED" value="0">
- </constant>
- <constant name="CONNECTION_CONNECTING" value="1">
- </constant>
- <constant name="CONNECTION_CONNECTED" value="2">
- </constant>
- <constant name="TARGET_PEER_BROADCAST" value="0" enum="">
- </constant>
- <constant name="TARGET_PEER_SERVER" value="1" enum="">
- </constant>
- </constants>
-</class>
-<class name="Nil" category="Built-In Types">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="Nil">
- <argument index="0" name="from" type="PoolColorArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolRealArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Basis">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Quat">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="Nil">
- <argument index="0" name="from" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="NinePatchRect" inherits="Control" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_h_axis_stretch_mode" qualifiers="const">
- <return type="int" enum="NinePatchRect.AxisStretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_patch_margin" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_region_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_axis_stretch_mode" qualifiers="const">
- <return type="int" enum="NinePatchRect.AxisStretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_draw_center_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_draw_center">
- <return type="void">
- </return>
- <argument index="0" name="draw_center" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_axis_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_patch_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="value" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_axis_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" brief="" enum="NinePatchRect.AxisStretchMode">
- </member>
- <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" brief="" enum="NinePatchRect.AxisStretchMode">
- </member>
- <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
- </member>
- <member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin" brief="">
- </member>
- <member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin" brief="">
- </member>
- <member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin" brief="">
- </member>
- <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" brief="">
- </member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- </members>
- <signals>
- <signal name="texture_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
- </constant>
- <constant name="AXIS_STRETCH_MODE_TILE" value="1">
- </constant>
- <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
- </constant>
- </constants>
-</class>
-<class name="Node" inherits="Object" category="Core">
- <brief_description>
- Base class for all the [i]scene[/i] elements.
- </brief_description>
- <description>
- Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names.
- Any tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions.
- [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Children nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
- Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, from the children up to the parent nodes.
- It means that when adding a scene to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (and that recursively for the whole scene).
- [b]Processing:[/b] Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is variable. Fixed processing (callback [method _fixed_process], toggled with [method set_fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics.
- Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
- To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
- Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children.
- [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
- </description>
- <methods>
- <method name="_enter_tree" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
- Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification].
- </description>
- </method>
- <method name="_exit_tree" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
- Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification].
- </description>
- </method>
- <method name="_fixed_process" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant.
- It is only called if fixed processing has been enabled with [method set_fixed_process].
- Corresponds to the NOTIFICATION_FIXED_PROCESS notification in [method Object._notification].
- </description>
- </method>
- <method name="_input" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="_process" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <description>
- Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant.
- It is only called if processing has been enabled with [method set_process].
- Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification].
- </description>
- </method>
- <method name="_ready" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards.
- Corresponds to the NOTIFICATION_READY notification in [method Object._notification].
- </description>
- </method>
- <method name="_unhandled_input" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="_unhandled_key_input" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEventKey">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_child">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <argument index="1" name="legible_unique_name" type="bool" default="false">
- </argument>
- <description>
- Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
- The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only.
- </description>
- </method>
- <method name="add_to_group">
- <return type="void">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <argument index="1" name="persistent" type="bool" default="false">
- </argument>
- <description>
- Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
- </description>
- </method>
- <method name="can_process" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see [method set_pause_mode]). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND?
- </description>
- </method>
- <method name="duplicate" qualifiers="const">
- <return type="Node">
- </return>
- <argument index="0" name="flags" type="int" default="15">
- </argument>
- <description>
- Duplicate the node, returning a new [Node].
- You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants.
- </description>
- </method>
- <method name="find_node" qualifiers="const">
- <return type="Node">
- </return>
- <argument index="0" name="mask" type="String">
- </argument>
- <argument index="1" name="recursive" type="bool" default="true">
- </argument>
- <argument index="2" name="owned" type="bool" default="true">
- </argument>
- <description>
- Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names.
- </description>
- </method>
- <method name="get_child" qualifiers="const">
- <return type="Node">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
- </description>
- </method>
- <method name="get_child_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of child nodes.
- </description>
- </method>
- <method name="get_children" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return an array of references ([Node]) to the child nodes.
- </description>
- </method>
- <method name="get_filename" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]).
- </description>
- </method>
- <method name="get_fixed_process_delta_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the time elapsed since the last fixed frame (see [method _fixed_process]). This is always the same in fixed processing unless the frames per second is changed in [OS].
- </description>
- </method>
- <method name="get_groups" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return an array listing the groups that the node is part of.
- </description>
- </method>
- <method name="get_index" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the node index, i.e. its position among the siblings of its parent.
- </description>
- </method>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the node. This name is unique among the siblings (other child nodes from the same parent).
- </description>
- </method>
- <method name="get_network_master" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node" qualifiers="const">
- <return type="Node">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- Fetch a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.
- Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
- [i]Example:[/i] Assume your current node is Character and the following tree:
- [codeblock]
- /root
- /root/Character
- /root/Character/Sword
- /root/Character/Backpack/Dagger
- /root/MyGame
- /root/Swamp/Alligator
- /root/Swamp/Mosquito
- /root/Swamp/Goblin
- [/codeblock]
- Possible paths are:
- [codeblock]
- get_node("Sword")
- get_node("Backpack/Dagger")
- get_node("../Swamp/Alligator")
- get_node("/root/MyGame")
- [/codeblock]
- </description>
- </method>
- <method name="get_node_and_resource">
- <return type="Array">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_owner" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Get the node owner (see [method set_owner]).
- </description>
- </method>
- <method name="get_parent" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Return the parent node of the current node, or an empty [Node] if the node lacks a parent.
- </description>
- </method>
- <method name="get_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]).
- </description>
- </method>
- <method name="get_path_to" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail.
- </description>
- </method>
- <method name="get_pause_mode" qualifiers="const">
- <return type="int" enum="Node.PauseMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_position_in_parent" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_process_delta_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the time elapsed (in seconds) since the last process callback. This is almost always different each time.
- </description>
- </method>
- <method name="get_scene_instance_load_placeholder" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tree" qualifiers="const">
- <return type="SceneTree">
- </return>
- <description>
- </description>
- </method>
- <method name="get_viewport" qualifiers="const">
- <return type="Viewport">
- </return>
- <description>
- </description>
- </method>
- <method name="has_node" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_node_and_resource" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_a_parent_of" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i].
- </description>
- </method>
- <method name="is_displayed_folded" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_fixed_processing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if fixed processing is enabled (see [method set_fixed_process]).
- </description>
- </method>
- <method name="is_fixed_processing_internal" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_greater_than" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i].
- </description>
- </method>
- <method name="is_in_group" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_inside_tree" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_network_master" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_processing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether processing is enabled in the current node (see [method set_process]).
- </description>
- </method>
- <method name="is_processing_input" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the node is processing input (see [method set_process_input]).
- </description>
- </method>
- <method name="is_processing_internal" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_processing_unhandled_input" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the node is processing unhandled input (see [method set_process_unhandled_input]).
- </description>
- </method>
- <method name="is_processing_unhandled_key_input" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="move_child">
- <return type="void">
- </return>
- <argument index="0" name="child_node" type="Node">
- </argument>
- <argument index="1" name="to_pos" type="int">
- </argument>
- <description>
- Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
- </description>
- </method>
- <method name="print_stray_nodes">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="print_tree">
- <return type="void">
- </return>
- <description>
- Print the scene to stdout. Used mainly for debugging purposes.
- </description>
- </method>
- <method name="propagate_call">
- <return type="void">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <argument index="1" name="args" type="Array" default="[ ]">
- </argument>
- <argument index="2" name="parent_first" type="bool" default="false">
- </argument>
- <description>
- Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [Node] first, then on all children. If it is false then the children will get called first.
- </description>
- </method>
- <method name="propagate_notification">
- <return type="void">
- </return>
- <argument index="0" name="what" type="int">
- </argument>
- <description>
- Notify the current node and all its children recursively by calling notification() in all of them.
- </description>
- </method>
- <method name="queue_free">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="raise">
- <return type="void">
- </return>
- <description>
- Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
- </description>
- </method>
- <method name="remove_and_skip">
- <return type="void">
- </return>
- <description>
- Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed.
- </description>
- </method>
- <method name="remove_child">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
- </description>
- </method>
- <method name="remove_from_group">
- <return type="void">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <description>
- Remove a node from a group.
- </description>
- </method>
- <method name="replace_by">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <argument index="1" name="keep_data" type="bool" default="false">
- </argument>
- <description>
- Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
- </description>
- </method>
- <method name="request_ready">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="rpc" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <description>
- Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath].
- </description>
- </method>
- <method name="rpc_config">
- <return type="void">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <argument index="1" name="mode" type="int" enum="Node.RPCMode">
- </argument>
- <description>
- Change the method's RPC mode (one of RPC_MODE_* constants).
- </description>
- </method>
- <method name="rpc_id" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <description>
- Send a [method rpc] to a specific peer identified by [i]peer_id[/i].
- </description>
- </method>
- <method name="rpc_unreliable" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <description>
- Send a [method rpc] using an unreliable protocol.
- </description>
- </method>
- <method name="rpc_unreliable_id" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <description>
- Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol.
- </description>
- </method>
- <method name="rset">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely change property's value on other peers (and locally).
- </description>
- </method>
- <method name="rset_config">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="mode" type="int" enum="Node.RPCMode">
- </argument>
- <description>
- Change the property's RPC mode (one of RPC_MODE_* constants).
- </description>
- </method>
- <method name="rset_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely change property's value on a specific peer identified by [i]peer_id[/i].
- </description>
- </method>
- <method name="rset_unreliable">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely change property's value on other peers (and locally) using an unreliable protocol.
- </description>
- </method>
- <method name="rset_unreliable_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol.
- </description>
- </method>
- <method name="set_display_folded">
- <return type="void">
- </return>
- <argument index="0" name="fold" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_filename">
- <return type="void">
- </return>
- <argument index="0" name="filename" type="String">
- </argument>
- <description>
- A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded.
- </description>
- </method>
- <method name="set_fixed_process">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time].
- </description>
- </method>
- <method name="set_fixed_process_internal">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
- </description>
- </method>
- <method name="set_network_master">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="recursive" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_owner">
- <return type="void">
- </return>
- <argument index="0" name="owner" type="Node">
- </argument>
- <description>
- Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing.
- </description>
- </method>
- <method name="set_pause_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Node.PauseMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_process">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time].
- </description>
- </method>
- <method name="set_process_input">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]).
- </description>
- </method>
- <method name="set_process_internal">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_process_unhandled_input">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]).
- </description>
- </method>
- <method name="set_process_unhandled_key_input">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_scene_instance_load_placeholder">
- <return type="void">
- </return>
- <argument index="0" name="load_placeholder" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="_import_path" type="NodePath" setter="_set_import_path" getter="_get_import_path" brief="">
- </member>
- <member name="editor/display_folded" type="bool" setter="set_display_folded" getter="is_displayed_folded" brief="">
- </member>
- <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" brief="" enum="Node.PauseMode">
- </member>
- </members>
- <signals>
- <signal name="renamed">
- <description>
- Emitted when the node is renamed.
- </description>
- </signal>
- <signal name="tree_entered">
- <description>
- </description>
- </signal>
- <signal name="tree_exited">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_ENTER_TREE" value="10" enum="">
- </constant>
- <constant name="NOTIFICATION_EXIT_TREE" value="11" enum="">
- </constant>
- <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12" enum="">
- </constant>
- <constant name="NOTIFICATION_READY" value="13" enum="">
- </constant>
- <constant name="NOTIFICATION_FIXED_PROCESS" value="16" enum="">
- </constant>
- <constant name="NOTIFICATION_PROCESS" value="17" enum="">
- Notification received every frame when the process flag is set (see [method set_process]).
- </constant>
- <constant name="NOTIFICATION_PARENTED" value="18" enum="">
- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree.
- </constant>
- <constant name="NOTIFICATION_UNPARENTED" value="19" enum="">
- Notification received when a node is unparented (parent removed it from the list of children).
- </constant>
- <constant name="NOTIFICATION_PAUSED" value="14" enum="">
- </constant>
- <constant name="NOTIFICATION_UNPAUSED" value="15" enum="">
- </constant>
- <constant name="NOTIFICATION_INSTANCED" value="20" enum="">
- </constant>
- <constant name="NOTIFICATION_DRAG_BEGIN" value="21" enum="">
- </constant>
- <constant name="NOTIFICATION_DRAG_END" value="22" enum="">
- </constant>
- <constant name="NOTIFICATION_PATH_CHANGED" value="23" enum="">
- </constant>
- <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="24" enum="">
- </constant>
- <constant name="NOTIFICATION_INTERNAL_PROCESS" value="25" enum="">
- </constant>
- <constant name="NOTIFICATION_INTERNAL_FIXED_PROCESS" value="26" enum="">
- </constant>
- <constant name="RPC_MODE_DISABLED" value="0">
- </constant>
- <constant name="RPC_MODE_REMOTE" value="1">
- </constant>
- <constant name="RPC_MODE_SYNC" value="2">
- </constant>
- <constant name="RPC_MODE_MASTER" value="3">
- </constant>
- <constant name="RPC_MODE_SLAVE" value="4">
- </constant>
- <constant name="PAUSE_MODE_INHERIT" value="0">
- </constant>
- <constant name="PAUSE_MODE_STOP" value="1">
- </constant>
- <constant name="PAUSE_MODE_PROCESS" value="2">
- </constant>
- <constant name="DUPLICATE_SIGNALS" value="1">
- </constant>
- <constant name="DUPLICATE_GROUPS" value="2">
- </constant>
- <constant name="DUPLICATE_SCRIPTS" value="4">
- </constant>
- <constant name="DUPLICATE_USE_INSTANCING" value="8">
- </constant>
- </constants>
-</class>
-<class name="Node2D" inherits="CanvasItem" category="Core">
- <brief_description>
- Base node for 2D system.
- </brief_description>
- <description>
- Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform ([Transform2D]). A tree of Node2Ds allows complex hierarchies for animation and positioning.
- </description>
- <methods>
- <method name="apply_scale">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="Vector2">
- </argument>
- <description>
- Apply the 'ratio' scale to the 2D node, according to its current scale value.
- </description>
- </method>
- <method name="edit_set_pivot">
- <return type="void">
- </return>
- <argument index="0" name="pivot" type="Vector2">
- </argument>
- <description>
- Set the pivot position of the 2D node to 'pivot' value. This method is implemented only in some nodes that inherit Node2D.
- </description>
- </method>
- <method name="get_angle_to" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Return the rotation angle in radians needed for the 2d node to point at 'point' position.
- </description>
- </method>
- <method name="get_global_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the global position of the 2D node.
- </description>
- </method>
- <method name="get_global_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the global rotation in radians of the 2D node.
- </description>
- </method>
- <method name="get_global_rotation_in_degrees" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the global rotation in degrees of the 2D node.
- </description>
- </method>
- <method name="get_global_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the global scale of the 2D node.
- </description>
- </method>
- <method name="get_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the position of the 2D node.
- </description>
- </method>
- <method name="get_relative_transform_to_parent" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="parent" type="Node">
- </argument>
- <description>
- Return the transform [Transform2D] calculated relatively to the parent of this 2D node.
- </description>
- </method>
- <method name="get_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rotation in radians of the 2D node.
- </description>
- </method>
- <method name="get_rotation_in_degrees" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rotation in degrees of the 2D node.
- </description>
- </method>
- <method name="get_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the scale of the 2D node.
- </description>
- </method>
- <method name="get_z" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the Z-index of the 2D node.
- </description>
- </method>
- <method name="global_translate">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Apply a global translation of 'offset' to the 2D node, starting from its current global position.
- </description>
- </method>
- <method name="is_z_relative" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the Z-index value of this 2D node is relative to its parent's. Else, return false.
- </description>
- </method>
- <method name="look_at">
- <return type="void">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Rotate the 2d node so it points at 'point' position.
- </description>
- </method>
- <method name="move_local_x">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <argument index="1" name="scaled" type="bool" default="false">
- </argument>
- <description>
- Apply a local translation on X axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
- </description>
- </method>
- <method name="move_local_y">
- <return type="void">
- </return>
- <argument index="0" name="delta" type="float">
- </argument>
- <argument index="1" name="scaled" type="bool" default="false">
- </argument>
- <description>
- Apply a local translation on Y axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
- </description>
- </method>
- <method name="rotate">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Apply a rotation (in radians) to the 2D node, starting from its current rotation.
- </description>
- </method>
- <method name="set_global_position">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Set the global position of the 2D node.
- </description>
- </method>
- <method name="set_global_rotation">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Set the global rotation in radians of the 2D node
- </description>
- </method>
- <method name="set_global_rotation_in_degrees">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- Set the global rotation in degrees of the 2D node
- </description>
- </method>
- <method name="set_global_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- Set the global scale of the 2D node.
- </description>
- </method>
- <method name="set_global_transform">
- <return type="void">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <description>
- Set the global transform [Transform2D] of the 2D node.
- </description>
- </method>
- <method name="set_position">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Set the position of the 2D node.
- </description>
- </method>
- <method name="set_rotation">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Set the rotation in radians of the 2D node.
- </description>
- </method>
- <method name="set_rotation_in_degrees">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- Set the rotation in degrees of the 2D node.
- </description>
- </method>
- <method name="set_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- Set the scale of the 2D node.
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <description>
- Set the local transform [Transform2D] of the 2D node.
- </description>
- </method>
- <method name="set_z">
- <return type="void">
- </return>
- <argument index="0" name="z" type="int">
- </argument>
- <description>
- Set the Z-index value of the 2D node.
- </description>
- </method>
- <method name="set_z_as_relative">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the Z-index value as relative to the parent node of this 2D node. Thus, if this 2D node's Z-index value is 2 and its parent's effective Z-index is 3, then the effective Z-index value of this 2D node would be 3 + 2 = 5.
- </description>
- </method>
- <method name="to_global" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="local_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="to_local" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="global_point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="translate">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Apply a local translation of 'offset' to the 2D node, starting from its current local position.
- </description>
- </method>
- </methods>
- <members>
- <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" brief="">
- </member>
- <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation" brief="">
- </member>
- <member name="global_rotation_deg" type="float" setter="set_global_rotation_in_degrees" getter="get_global_rotation_in_degrees" brief="">
- </member>
- <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale" brief="">
- </member>
- <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform" brief="">
- </member>
- <member name="position" type="Vector2" setter="set_position" getter="get_position" brief="">
- </member>
- <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" brief="">
- </member>
- <member name="rotation_deg" type="float" setter="set_rotation_in_degrees" getter="get_rotation_in_degrees" brief="">
- </member>
- <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" brief="">
- </member>
- <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" brief="">
- </member>
- <member name="z" type="int" setter="set_z" getter="get_z" brief="">
- </member>
- <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="NodePath" category="Built-In Types">
- <brief_description>
- Pre-parsed scene tree path.
- </brief_description>
- <description>
- A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.
- You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
- A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
- </description>
- <methods>
- <method name="NodePath">
- <return type="NodePath">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
- </description>
- </method>
- <method name="get_name">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the node name indicated by [code]idx[/code] (0 to [method get_name_count])
- </description>
- </method>
- <method name="get_name_count">
- <return type="int">
- </return>
- <description>
- Get the number of node names which make up the path.
- </description>
- </method>
- <method name="get_property">
- <return type="String">
- </return>
- <description>
- Get the path's property name, or an empty string if the path doesn't have a property.
- </description>
- </method>
- <method name="get_subname">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count])
- </description>
- </method>
- <method name="get_subname_count">
- <return type="int">
- </return>
- <description>
- Get the number of resource names in the path.
- </description>
- </method>
- <method name="is_absolute">
- <return type="bool">
- </return>
- <description>
- Return true if the node path is absolute (not relative).
- </description>
- </method>
- <method name="is_empty">
- <return type="bool">
- </return>
- <description>
- Return true if the node path is empty.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="OS" inherits="Object" category="Core">
- <brief_description>
- Operating System functions.
- </brief_description>
- <description>
- Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc.
- </description>
- <methods>
- <method name="alert">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <argument index="1" name="title" type="String" default="&quot;Alert!&quot;">
- </argument>
- <description>
- Displays a modal dialog box utilizing the host OS.
- </description>
- </method>
- <method name="can_draw" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the host OS allows drawing.
- </description>
- </method>
- <method name="can_use_threads" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns if the current host platform is using multiple threads.
- </description>
- </method>
- <method name="delay_msec" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="msec" type="int">
- </argument>
- <description>
- Delay executing of the current thread by given milliseconds.
- </description>
- </method>
- <method name="delay_usec" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="usec" type="int">
- </argument>
- <description>
- Delay executing of the current thread by given microseconds.
- </description>
- </method>
- <method name="dump_memory_to_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- Dumps the memory allocation ringlist to a file (only works in debug).
- Entry format per line: "Address - Size - Description"
- </description>
- </method>
- <method name="dump_resources_to_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- Dumps all used resources to file (only works in debug).
- Entry format per line: "Resource Type : Resource Location"
- At the end of the file is a statistic of all used Resource Types.
- </description>
- </method>
- <method name="execute">
- <return type="int">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="arguments" type="PoolStringArray">
- </argument>
- <argument index="2" name="blocking" type="bool">
- </argument>
- <argument index="3" name="output" type="Array" default="[ ]">
- </argument>
- <description>
- Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
- </description>
- </method>
- <method name="find_scancode_from_string" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Returns the scancode of the given string (e.g. "Escape")
- </description>
- </method>
- <method name="get_borderless_window" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if the current window is borderless.
- </description>
- </method>
- <method name="get_clipboard" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get clipboard from the host OS.
- </description>
- </method>
- <method name="get_cmdline_args">
- <return type="PoolStringArray">
- </return>
- <description>
- Return the commandline passed to the engine.
- </description>
- </method>
- <method name="get_current_screen" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the current screen index (0 padded).
- </description>
- </method>
- <method name="get_data_dir" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the absolute directory path of user data path([user://]).
- </description>
- </method>
- <method name="get_date" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time).
- </description>
- </method>
- <method name="get_datetime" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second.
- </description>
- </method>
- <method name="get_datetime_from_unix_time" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="unix_time_val" type="int">
- </argument>
- <description>
- Get a dictionary of time values when given epoch time.
- Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch).
- </description>
- </method>
- <method name="get_dynamic_memory_usage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the total amount of dynamic memory used (only works in debug).
- </description>
- </method>
- <method name="get_environment" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="environment" type="String">
- </argument>
- <description>
- Return an environment variable.
- </description>
- </method>
- <method name="get_executable_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the path to the current engine executable.
- </description>
- </method>
- <method name="get_exit_code" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_latin_keyboard_variant" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the current latin keyboard variant as a String.
- Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR"
- </description>
- </method>
- <method name="get_locale" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the host OS locale.
- </description>
- </method>
- <method name="get_model_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the model name of the current device.
- </description>
- </method>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11".
- </description>
- </method>
- <method name="get_power_percent_left">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_power_seconds_left">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_power_state">
- <return type="int" enum="PowerState">
- </return>
- <description>
- </description>
- </method>
- <method name="get_process_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the game process ID
- </description>
- </method>
- <method name="get_processor_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of cores available in the host machine.
- </description>
- </method>
- <method name="get_scancode_string" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="code" type="int">
- </argument>
- <description>
- Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape").
- </description>
- </method>
- <method name="get_screen_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of displays attached to the host machine
- </description>
- </method>
- <method name="get_screen_dpi" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- Returns the dots per inch density of the specified screen.
-
- On Android Devices, the actual screen densities are grouped into six generalized densities:
- ldpi - 120 dpi
- mdpi - 160 dpi
- hdpi - 240 dpi
- xhdpi - 320 dpi
- xxhdpi - 480 dpi
- xxxhdpi - 640 dpi
- </description>
- </method>
- <method name="get_screen_orientation" qualifiers="const">
- <return type="int" enum="_OS.ScreenOrientation">
- </return>
- <description>
- Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
- </description>
- </method>
- <method name="get_screen_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_screen_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="screen" type="int" default="-1">
- </argument>
- <description>
- Returns the dimensions in pixels of the specified screen.
- </description>
- </method>
- <method name="get_splash_tick_msec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_static_memory_peak_usage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the max amount of static memory used (only works in debug).
- </description>
- </method>
- <method name="get_static_memory_usage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_system_dir" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="dir" type="int" enum="_OS.SystemDir">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_system_time_secs" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ticks_msec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of time passed in milliseconds since the engine started.
- </description>
- </method>
- <method name="get_time" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="utc" type="bool" default="false">
- </argument>
- <description>
- Returns current time as a dictionary of keys: hour, minute, second
- </description>
- </method>
- <method name="get_time_zone_info" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unique_id" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_unix_time" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the current unix timestamp.
- </description>
- </method>
- <method name="get_unix_time_from_datetime" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="datetime" type="Dictionary">
- </argument>
- <description>
- Get an epoch time value from a dictionary of time values.
- [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second.
- You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored.
- </description>
- </method>
- <method name="get_window_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
- </description>
- </method>
- <method name="get_window_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the size of the window (without counting window manager decorations).
- </description>
- </method>
- <method name="has_environment" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="environment" type="String">
- </argument>
- <description>
- Return true if an environment variable exists.
- </description>
- </method>
- <method name="has_touchscreen_ui_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="has_virtual_keyboard" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if the platform has a virtual keyboard, false otherwise.
- </description>
- </method>
- <method name="hide_virtual_keyboard">
- <return type="void">
- </return>
- <description>
- Hides the virtual keyboard if it is shown, does nothing otherwise.
- </description>
- </method>
- <method name="is_debug_build" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_in_low_processor_usage_mode" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if low cpu usage mode is enabled.
- </description>
- </method>
- <method name="is_keep_screen_on" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the screen is being kept on or not.
- </description>
- </method>
- <method name="is_ok_left_and_cancel_right" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_scancode_unicode" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="code" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_stdout_verbose" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the engine was executed with -v (verbose stdout).
- </description>
- </method>
- <method name="is_vsync_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_window_fullscreen" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the window is in fullscreen mode or not.
- </description>
- </method>
- <method name="is_window_maximized" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the window is maximized.
- </description>
- </method>
- <method name="is_window_minimized" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the window is minimized.
- </description>
- </method>
- <method name="is_window_resizable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the window is resizable or not.
- </description>
- </method>
- <method name="kill">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="pid" type="int">
- </argument>
- <description>
- Kill a process ID (this method can be used to kill processes that were not spawned by the game).
- </description>
- </method>
- <method name="native_video_is_playing">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_pause">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_play">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="volume" type="float">
- </argument>
- <argument index="2" name="audio_track" type="String">
- </argument>
- <argument index="3" name="subtitle_track" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="native_video_stop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="native_video_unpause">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="print_all_resources">
- <return type="void">
- </return>
- <argument index="0" name="tofile" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="print_all_textures_by_size">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="print_resources_by_type">
- <return type="void">
- </return>
- <argument index="0" name="types" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="print_resources_in_use">
- <return type="void">
- </return>
- <argument index="0" name="short" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="request_attention">
- <return type="void">
- </return>
- <description>
- Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
- </description>
- </method>
- <method name="set_borderless_window">
- <return type="void">
- </return>
- <argument index="0" name="borderless" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_clipboard">
- <return type="void">
- </return>
- <argument index="0" name="clipboard" type="String">
- </argument>
- <description>
- Set clipboard to the OS.
- </description>
- </method>
- <method name="set_current_screen">
- <return type="void">
- </return>
- <argument index="0" name="screen" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_exit_code">
- <return type="void">
- </return>
- <argument index="0" name="code" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon">
- <return type="void">
- </return>
- <argument index="0" name="icon" type="Image">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ime_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_keep_screen_on">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS)
- </description>
- </method>
- <method name="set_low_processor_usage_mode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu.
- </description>
- </method>
- <method name="set_screen_orientation">
- <return type="void">
- </return>
- <argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation">
- </argument>
- <description>
- Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
- </description>
- </method>
- <method name="set_thread_name">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_file_access_save_and_swap">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_vsync">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_window_fullscreen">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode.
- </description>
- </method>
- <method name="set_window_maximized">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the window size to maximized.
- </description>
- </method>
- <method name="set_window_minimized">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether the window is minimized.
- </description>
- </method>
- <method name="set_window_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen).
- </description>
- </method>
- <method name="set_window_resizable">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings.
- </description>
- </method>
- <method name="set_window_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Sets the window size to the specified size.
- </description>
- </method>
- <method name="set_window_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- Sets the window title to the specified string.
- </description>
- </method>
- <method name="shell_open">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="uri" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="show_virtual_keyboard">
- <return type="void">
- </return>
- <argument index="0" name="existing_text" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Shows the virtual keyboard if the platform has one. The [i]existing_text[/i] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
- </description>
- </method>
- </methods>
- <constants>
- <constant name="DAY_SUNDAY" value="0">
- </constant>
- <constant name="DAY_MONDAY" value="1">
- </constant>
- <constant name="DAY_TUESDAY" value="2">
- </constant>
- <constant name="DAY_WEDNESDAY" value="3">
- </constant>
- <constant name="DAY_THURSDAY" value="4">
- </constant>
- <constant name="DAY_FRIDAY" value="5">
- </constant>
- <constant name="DAY_SATURDAY" value="6">
- </constant>
- <constant name="MONTH_JANUARY" value="1">
- </constant>
- <constant name="MONTH_FEBRUARY" value="2">
- </constant>
- <constant name="MONTH_MARCH" value="3">
- </constant>
- <constant name="MONTH_APRIL" value="4">
- </constant>
- <constant name="MONTH_MAY" value="5">
- </constant>
- <constant name="MONTH_JUNE" value="6">
- </constant>
- <constant name="MONTH_JULY" value="7">
- </constant>
- <constant name="MONTH_AUGUST" value="8">
- </constant>
- <constant name="MONTH_SEPTEMBER" value="9">
- </constant>
- <constant name="MONTH_OCTOBER" value="10">
- </constant>
- <constant name="MONTH_NOVEMBER" value="11">
- </constant>
- <constant name="MONTH_DECEMBER" value="12">
- </constant>
- <constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0">
- </constant>
- <constant name="SCREEN_ORIENTATION_PORTRAIT" value="1">
- </constant>
- <constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2">
- </constant>
- <constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3">
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4">
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5">
- </constant>
- <constant name="SCREEN_ORIENTATION_SENSOR" value="6">
- </constant>
- <constant name="SYSTEM_DIR_DESKTOP" value="0">
- </constant>
- <constant name="SYSTEM_DIR_DCIM" value="1">
- </constant>
- <constant name="SYSTEM_DIR_DOCUMENTS" value="2">
- </constant>
- <constant name="SYSTEM_DIR_DOWNLOADS" value="3">
- </constant>
- <constant name="SYSTEM_DIR_MOVIES" value="4">
- </constant>
- <constant name="SYSTEM_DIR_MUSIC" value="5">
- </constant>
- <constant name="SYSTEM_DIR_PICTURES" value="6">
- </constant>
- <constant name="SYSTEM_DIR_RINGTONES" value="7">
- </constant>
- <constant name="POWERSTATE_UNKNOWN" value="0">
- </constant>
- <constant name="POWERSTATE_ON_BATTERY" value="1">
- </constant>
- <constant name="POWERSTATE_NO_BATTERY" value="2">
- </constant>
- <constant name="POWERSTATE_CHARGING" value="3">
- </constant>
- <constant name="POWERSTATE_CHARGED" value="4">
- </constant>
- </constants>
-</class>
-<class name="Object" category="Core">
- <brief_description>
- Base class for all non built-in types.
- </brief_description>
- <description>
- Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
- Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++).
- Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted.
- Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
- Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
- </description>
- <methods>
- <method name="_get" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- Return a property, return null if the property does not exist.
- </description>
- </method>
- <method name="_get_property_list" qualifiers="virtual">
- <return type="Array">
- </return>
- <description>
- Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]).
- </description>
- </method>
- <method name="_init" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="_notification" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="what" type="int">
- </argument>
- <description>
- Notification request, the notification id is received.
- </description>
- </method>
- <method name="_set" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Set a property. Return true if the property was found.
- </description>
- </method>
- <method name="add_user_signal">
- <return type="void">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="arguments" type="Array" default="[ ]">
- </argument>
- <description>
- Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*).
- </description>
- </method>
- <method name="call" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="call_deferred" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="callv">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <argument index="1" name="arg_array" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="can_translate_messages" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if this object can translate strings.
- </description>
- </method>
- <method name="connect">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <argument index="3" name="binds" type="Array" default="[ ]">
- </argument>
- <argument index="4" name="flags" type="int" default="0">
- </argument>
- <description>
- Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check.
- </description>
- </method>
- <method name="disconnect">
- <return type="void">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- Disconnect a signal from a method.
- </description>
- </method>
- <method name="emit_signal" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="free">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- Get a property from the object.
- </description>
- </method>
- <method name="get_class" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the class of the object as a string.
- </description>
- </method>
- <method name="get_incoming_connections" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an [Array] of dictionaries with informations about signals that are connected to this object.
- Inside each [Dictionary] there are 3 fields:
- - "source" is a reference to signal emitter.
- - "signal_name" is name of connected signal.
- - "method_name" is a name of method to which signal is connected.
- </description>
- </method>
- <method name="get_instance_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the instance ID. All objects have a unique instance ID.
- </description>
- </method>
- <method name="get_meta" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return a metadata from the object.
- </description>
- </method>
- <method name="get_meta_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Return the list of metadata in the object.
- </description>
- </method>
- <method name="get_method_list" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_property_list" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]).
- </description>
- </method>
- <method name="get_script" qualifiers="const">
- <return type="Reference">
- </return>
- <description>
- Return the object script (or null if it doesn't have one).
- </description>
- </method>
- <method name="get_signal_connection_list" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_signal_list" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return the list of signals as an array of dictionaries.
- </description>
- </method>
- <method name="has_meta" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return true if a metadata is found with the requested name.
- </description>
- </method>
- <method name="has_method" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_user_signal" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_blocking_signals" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if signal emission blocking is enabled.
- </description>
- </method>
- <method name="is_class" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Check the class of the object against a string (including inheritance).
- </description>
- </method>
- <method name="is_connected" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- Return true if a connection exists for a given signal and target/method.
- </description>
- </method>
- <method name="is_queued_for_deletion" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="notification">
- <return type="void">
- </return>
- <argument index="0" name="what" type="int">
- </argument>
- <argument index="1" name="reversed" type="bool" default="false">
- </argument>
- <description>
- Notify the object of something.
- </description>
- </method>
- <method name="property_list_changed_notify">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Set property into the object.
- </description>
- </method>
- <method name="set_block_signals">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- If set to true, signal emission is blocked.
- </description>
- </method>
- <method name="set_message_translation">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Define whether this object can translate strings (with calls to [method tr]). Default is true.
- </description>
- </method>
- <method name="set_meta">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
- </description>
- </method>
- <method name="set_script">
- <return type="void">
- </return>
- <argument index="0" name="script" type="Reference">
- </argument>
- <description>
- Set a script into the object, scripts extend the object functionality.
- </description>
- </method>
- <method name="tr" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation].
- </description>
- </method>
- </methods>
- <signals>
- <signal name="script_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_POSTINITIALIZE" value="0" enum="">
- Called right when the object is initialized. Not available in script.
- </constant>
- <constant name="NOTIFICATION_PREDELETE" value="1" enum="">
- Called before the object is about to be deleted.
- </constant>
- <constant name="CONNECT_DEFERRED" value="1">
- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time.
- </constant>
- <constant name="CONNECT_PERSIST" value="2">
- Persisting connections are saved when the object is serialized to file.
- </constant>
- <constant name="CONNECT_ONESHOT" value="4">
- One shot connections disconnect themselves after emission.
- </constant>
- </constants>
-</class>
-<class name="OccluderPolygon2D" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_cull_mode" qualifiers="const">
- <return type="int" enum="OccluderPolygon2D.CullMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_polygon" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- </description>
- </method>
- <method name="is_closed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_closed">
- <return type="void">
- </return>
- <argument index="0" name="closed" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cull_mode">
- <return type="void">
- </return>
- <argument index="0" name="cull_mode" type="int" enum="OccluderPolygon2D.CullMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="closed" type="bool" setter="set_closed" getter="is_closed" brief="">
- </member>
- <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="" enum="OccluderPolygon2D.CullMode">
- </member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" brief="">
- </member>
- </members>
- <constants>
- <constant name="CULL_DISABLED" value="0">
- </constant>
- <constant name="CULL_CLOCKWISE" value="1">
- </constant>
- <constant name="CULL_COUNTER_CLOCKWISE" value="2">
- </constant>
- </constants>
-</class>
-<class name="OmniLight" inherits="Light" category="Core">
- <brief_description>
- OmniDirectional Light, such as a light bulb or a candle.
- </brief_description>
- <description>
- An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
- </description>
- <methods>
- <method name="get_shadow_detail" qualifiers="const">
- <return type="int" enum="OmniLight.ShadowDetail">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shadow_mode" qualifiers="const">
- <return type="int" enum="OmniLight.ShadowMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_shadow_detail">
- <return type="void">
- </return>
- <argument index="0" name="detail" type="int" enum="OmniLight.ShadowDetail">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="OmniLight.ShadowMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="omni_attenuation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="omni_range" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" brief="" enum="OmniLight.ShadowDetail">
- </member>
- <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="" enum="OmniLight.ShadowMode">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="OptionButton" inherits="Button" category="Core">
- <brief_description>
- Button control that provides selectable options when pressed.
- </brief_description>
- <description>
- OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
- </description>
- <methods>
- <method name="add_icon_item">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
- <description>
- Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
- </description>
- </method>
- <method name="add_item">
- <return type="void">
- </return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <description>
- Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
- </description>
- </method>
- <method name="add_separator">
- <return type="void">
- </return>
- <description>
- Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all the items in the [OptionButton].
- </description>
- </method>
- <method name="get_item_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of items in the OptionButton.
- </description>
- </method>
- <method name="get_item_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the icon of the item at index "idx".
- </description>
- </method>
- <method name="get_item_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the ID of the item at index "idx".
- </description>
- </method>
- <method name="get_item_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_text" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the text of the item at index "idx".
- </description>
- </method>
- <method name="get_selected" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the current item index
- </description>
- </method>
- <method name="get_selected_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selected_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="is_item_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_item">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="select">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Select an item by index and make it the current item.
- </description>
- </method>
- <method name="set_item_disabled">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_icon">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- Set the icon of an item at index "idx".
- </description>
- </method>
- <method name="set_item_id">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Set the ID of an item at index "idx".
- </description>
- </method>
- <method name="set_item_metadata">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="metadata" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_text">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- Set the text of an item at index "idx".
- </description>
- </method>
- </methods>
- <members>
- <member name="items" type="Array" setter="_set_items" getter="_get_items" brief="">
- </member>
- <member name="selected" type="int" setter="_select_int" getter="get_selected" brief="">
- </member>
- </members>
- <signals>
- <signal name="item_selected">
- <argument index="0" name="ID" type="int">
- </argument>
- <description>
- This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="arrow" type="Texture">
- </theme_item>
- <theme_item name="arrow_margin" type="int">
- </theme_item>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="PCKPacker" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_file">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="pck_path" type="String">
- </argument>
- <argument index="1" name="source_path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="flush">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="verbose" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="pck_start">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="pck_name" type="String">
- </argument>
- <argument index="1" name="alignment" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PHashTranslation" inherits="Translation" category="Core">
- <brief_description>
- Optimized translation.
- </brief_description>
- <description>
- Optimized translation. Uses real-time compressed translations, which results in very small dictionaries.
- </description>
- <methods>
- <method name="generate">
- <return type="void">
- </return>
- <argument index="0" name="from" type="Translation">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PackedDataContainer" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="pack">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PackedDataContainerRef" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PackedScene" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- TODO: explain ownership, and that node does not need to own itself
- </description>
- <methods>
- <method name="can_instance" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_state">
- <return type="SceneState">
- </return>
- <description>
- </description>
- </method>
- <method name="instance" qualifiers="const">
- <return type="Node">
- </return>
- <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="pack">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="Node">
- </argument>
- <description>
- Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner].
- </description>
- </method>
- </methods>
- <members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" brief="">
- </member>
- </members>
- <constants>
- <constant name="GEN_EDIT_STATE_DISABLED" value="0">
- </constant>
- <constant name="GEN_EDIT_STATE_INSTANCE" value="1">
- </constant>
- <constant name="GEN_EDIT_STATE_MAIN" value="2">
- </constant>
- </constants>
-</class>
-<class name="PacketPeer" inherits="Reference" category="Core">
- <brief_description>
- Abstraction and base class for packet-based protocols.
- </brief_description>
- <description>
- PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering.
- </description>
- <methods>
- <method name="get_available_packet_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the number of packets currently available in the ring-buffer.
- </description>
- </method>
- <method name="get_packet" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- Get a raw packet.
- </description>
- </method>
- <method name="get_packet_error" qualifiers="const">
- <return type="int" enum="Error">
- </return>
- <description>
- Return the error state of the last packet received (via [method get_packet] and [method get_var]).
- </description>
- </method>
- <method name="get_var" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- Get a Variant.
- </description>
- </method>
- <method name="is_object_decoding_allowed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="put_packet">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="buffer" type="PoolByteArray">
- </argument>
- <description>
- Send a raw packet.
- </description>
- </method>
- <method name="put_var">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="var" type="Variant">
- </argument>
- <description>
- Send a Variant as a packet.
- </description>
- </method>
- <method name="set_allow_object_decoding">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PacketPeerStream" inherits="PacketPeer" category="Core">
- <brief_description>
- Wrapper to use a PacketPeer over a StreamPeer.
- </brief_description>
- <description>
- PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
- </description>
- <methods>
- <method name="get_input_buffer_max_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_output_buffer_max_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_input_buffer_max_size">
- <return type="void">
- </return>
- <argument index="0" name="max_size_bytes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_output_buffer_max_size">
- <return type="void">
- </return>
- <argument index="0" name="max_size_bytes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stream_peer">
- <return type="void">
- </return>
- <argument index="0" name="peer" type="Reference">
- </argument>
- <description>
- Set the [StreamPeer] object to be wrapped.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PacketPeerUDP" inherits="PacketPeer" category="Core">
- <brief_description>
- UDP packet peer.
- </brief_description>
- <description>
- UDP packet peer. Can be used to send raw UDP packets as well as [Variant]\ s.
- </description>
- <methods>
- <method name="close">
- <return type="void">
- </return>
- <description>
- Close the UDP socket the [PacketPeerUDP] is currently listening on.
- </description>
- </method>
- <method name="get_packet_ip" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
- </description>
- </method>
- <method name="get_packet_port" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
- </description>
- </method>
- <method name="is_listening" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this [PacketPeerUDP] is listening.
- </description>
- </method>
- <method name="listen">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="port" type="int">
- </argument>
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
- </argument>
- <argument index="2" name="recv_buf_size" type="int" default="65536">
- </argument>
- <description>
- Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size".
- If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6).
- If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type.
- If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).
- </description>
- </method>
- <method name="set_dest_address">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="port" type="int">
- </argument>
- <description>
- Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid.
- </description>
- </method>
- <method name="wait">
- <return type="int" enum="Error">
- </return>
- <description>
- Wait for a packet to arrive on the listening port, see [method listen].
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Panel" inherits="Control" category="Core">
- <brief_description>
- Provides an opaque background for [Control] children.
- </brief_description>
- <description>
- Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="panelf" type="StyleBox">
- </theme_item>
- <theme_item name="panelnc" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="PanelContainer" inherits="Container" category="Core">
- <brief_description>
- Panel container type.
- </brief_description>
- <description>
- Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="PanoramaSky" inherits="Sky" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_panorama" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="set_panorama">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ParallaxBackground" inherits="CanvasLayer" category="Core">
- <brief_description>
- 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.
- </description>
- <methods>
- <method name="get_limit_begin" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the beginning limit.
- </description>
- </method>
- <method name="get_limit_end" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the ending limit.
- </description>
- </method>
- <method name="get_scroll_base_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the base offset.
- </description>
- </method>
- <method name="get_scroll_base_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the base motion scale.
- </description>
- </method>
- <method name="get_scroll_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="is_ignore_camera_zoom">
- <return type="bool">
- </return>
- <description>
- Return ignoring camera zoom.
- </description>
- </method>
- <method name="set_ignore_camera_zoom">
- <return type="void">
- </return>
- <argument index="0" name="ignore" type="bool">
- </argument>
- <description>
- Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera.
- </description>
- </method>
- <method name="set_limit_begin">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis.
- </description>
- </method>
- <method name="set_limit_end">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis.
- </description>
- </method>
- <method name="set_scroll_base_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- Set the base offset in pixels of all children [ParallaxLayer] nodes.
- </description>
- </method>
- <method name="set_scroll_base_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- Set the base motion scale of all children [ParallaxLayer] nodes.
- </description>
- </method>
- <method name="set_scroll_offset">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" brief="">
- </member>
- <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" brief="">
- </member>
- <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom" brief="">
- </member>
- <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" brief="">
- </member>
- <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" brief="">
- </member>
- <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ParallaxLayer" inherits="Node2D" category="Core">
- <brief_description>
- 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.
- </description>
- <methods>
- <method name="get_mirroring" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the mirroring of the ParallaxLayer.
- </description>
- </method>
- <method name="get_motion_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_motion_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the motion scale of the ParallaxLayer.
- </description>
- </method>
- <method name="set_mirroring">
- <return type="void">
- </return>
- <argument index="0" name="mirror" type="Vector2">
- </argument>
- <description>
- Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
- </description>
- </method>
- <method name="set_motion_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_motion_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.
- </description>
- </method>
- </methods>
- <members>
- <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" brief="">
- </member>
- <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" brief="">
- </member>
- <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Particles" inherits="GeometryInstance" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="capture_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_amount" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_draw_order" qualifiers="const">
- <return type="int" enum="Particles.DrawOrder">
- </return>
- <description>
- </description>
- </method>
- <method name="get_draw_pass_mesh" qualifiers="const">
- <return type="Mesh">
- </return>
- <argument index="0" name="pass" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_draw_passes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_explosiveness_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fixed_fps" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fractional_delta" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lifetime" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_one_shot" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pre_process_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_process_material" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- </description>
- </method>
- <method name="get_randomness_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_speed_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_local_coordinates" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visibility_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="is_emitting" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="restart">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_amount">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_order">
- <return type="void">
- </return>
- <argument index="0" name="order" type="int" enum="Particles.DrawOrder">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_pass_mesh">
- <return type="void">
- </return>
- <argument index="0" name="pass" type="int">
- </argument>
- <argument index="1" name="mesh" type="Mesh">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_passes">
- <return type="void">
- </return>
- <argument index="0" name="passes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emitting">
- <return type="void">
- </return>
- <argument index="0" name="emitting" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_explosiveness_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fixed_fps">
- <return type="void">
- </return>
- <argument index="0" name="fps" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fractional_delta">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lifetime">
- <return type="void">
- </return>
- <argument index="0" name="secs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_one_shot">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pre_process_time">
- <return type="void">
- </return>
- <argument index="0" name="secs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_process_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_randomness_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_speed_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_local_coordinates">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visibility_aabb">
- <return type="void">
- </return>
- <argument index="0" name="aabb" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="amount" type="int" setter="set_amount" getter="get_amount" brief="">
- </member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="" enum="Particles.DrawOrder">
- </member>
- <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" brief="">
- </member>
- <member name="draw_pass_2" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" brief="">
- </member>
- <member name="draw_pass_3" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" brief="">
- </member>
- <member name="draw_pass_4" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" brief="">
- </member>
- <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" brief="">
- </member>
- <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" brief="">
- </member>
- <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" brief="">
- </member>
- <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" brief="">
- </member>
- <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" brief="">
- </member>
- <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" brief="">
- </member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" brief="">
- </member>
- <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" brief="">
- </member>
- <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" brief="">
- </member>
- <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" brief="">
- </member>
- <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" brief="">
- </member>
- <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" brief="">
- </member>
- <member name="visibility_aabb" type="Rect3" setter="set_visibility_aabb" getter="get_visibility_aabb" brief="">
- </member>
- </members>
- <constants>
- <constant name="DRAW_ORDER_INDEX" value="0">
- </constant>
- <constant name="DRAW_ORDER_LIFETIME" value="1">
- </constant>
- <constant name="DRAW_ORDER_VIEW_DEPTH" value="2">
- </constant>
- <constant name="MAX_DRAW_PASSES" value="4" enum="">
- </constant>
- </constants>
-</class>
-<class name="Particles2D" inherits="Node2D" category="Core">
- <brief_description>
- 2D Particle emitter
- </brief_description>
- <description>
- Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist).
- </description>
- <methods>
- <method name="capture_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_amount" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the amount of particles spawned at each emission
- </description>
- </method>
- <method name="get_draw_order" qualifiers="const">
- <return type="int" enum="Particles2D.DrawOrder">
- </return>
- <description>
- </description>
- </method>
- <method name="get_explosiveness_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fixed_fps" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fractional_delta" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_h_frames" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_lifetime" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Gets the amount of seconds that each particle will be visible.
- </description>
- </method>
- <method name="get_normal_map" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_one_shot" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pre_process_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_process_material" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- </description>
- </method>
- <method name="get_randomness_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_speed_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- Returns the texture for emitted particles
- </description>
- </method>
- <method name="get_use_local_coordinates" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_frames" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visibility_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="is_emitting" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this emitter is currently emitting or not
- </description>
- </method>
- <method name="restart">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_amount">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Sets the amount of particles spawned at each emission
- </description>
- </method>
- <method name="set_draw_order">
- <return type="void">
- </return>
- <argument index="0" name="order" type="int" enum="Particles2D.DrawOrder">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emitting">
- <return type="void">
- </return>
- <argument index="0" name="emitting" type="bool">
- </argument>
- <description>
- If this is set to true then the particle emitter will emit particles, if its false it will not.
- </description>
- </method>
- <method name="set_explosiveness_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fixed_fps">
- <return type="void">
- </return>
- <argument index="0" name="fps" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fractional_delta">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_frames">
- <return type="void">
- </return>
- <argument index="0" name="frames" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_lifetime">
- <return type="void">
- </return>
- <argument index="0" name="secs" type="float">
- </argument>
- <description>
- Sets the amount of seconds that each particle will be visible.
- </description>
- </method>
- <method name="set_normal_map">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_one_shot">
- <return type="void">
- </return>
- <argument index="0" name="secs" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pre_process_time">
- <return type="void">
- </return>
- <argument index="0" name="secs" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_process_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_randomness_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_speed_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_local_coordinates">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_frames">
- <return type="void">
- </return>
- <argument index="0" name="frames" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visibility_rect">
- <return type="void">
- </return>
- <argument index="0" name="aabb" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="amount" type="int" setter="set_amount" getter="get_amount" brief="">
- </member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="" enum="Particles2D.DrawOrder">
- </member>
- <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" brief="">
- </member>
- <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" brief="">
- </member>
- <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" brief="">
- </member>
- <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" brief="">
- </member>
- <member name="h_frames" type="int" setter="set_h_frames" getter="get_h_frames" brief="">
- </member>
- <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" brief="">
- </member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" brief="">
- </member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" brief="">
- </member>
- <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" brief="">
- </member>
- <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" brief="">
- </member>
- <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" brief="">
- </member>
- <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" brief="">
- </member>
- <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames" brief="">
- </member>
- <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" brief="">
- </member>
- </members>
- <constants>
- <constant name="DRAW_ORDER_INDEX" value="0">
- </constant>
- <constant name="DRAW_ORDER_LIFETIME" value="1">
- </constant>
- </constants>
-</class>
-<class name="ParticlesMaterial" inherits="Material" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_color_ramp" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_box_extents" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_color_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_normal_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_point_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_shape" qualifiers="const">
- <return type="int" enum="ParticlesMaterial.EmissionShape">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_sphere_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flatness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gravity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_randomness" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_spread" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_trail_color_modifier" qualifiers="const">
- <return type="GradientTexture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_trail_divisor" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_trail_size_modifier" qualifiers="const">
- <return type="CurveTexture">
- </return>
- <description>
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_color_ramp">
- <return type="void">
- </return>
- <argument index="0" name="ramp" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_box_extents">
- <return type="void">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_color_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_normal_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_point_count">
- <return type="void">
- </return>
- <argument index="0" name="point_count" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_point_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="int" enum="ParticlesMaterial.EmissionShape">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_sphere_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flatness">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gravity">
- <return type="void">
- </return>
- <argument index="0" name="accel_vec" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param_randomness">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <argument index="1" name="randomness" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param_texture">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_spread">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_trail_color_modifier">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="GradientTexture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_trail_divisor">
- <return type="void">
- </return>
- <argument index="0" name="divisor" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_trail_size_modifier">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="CurveTexture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="angle" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="angular_velocity" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="anim_loop" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="anim_offset" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="anim_speed" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="color" type="Color" setter="set_color" getter="get_color" brief="">
- </member>
- <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp" brief="">
- </member>
- <member name="damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents" brief="">
- </member>
- <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture" brief="">
- </member>
- <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture" brief="">
- </member>
- <member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count" brief="">
- </member>
- <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture" brief="">
- </member>
- <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" brief="" enum="ParticlesMaterial.EmissionShape">
- </member>
- <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius" brief="">
- </member>
- <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" brief="">
- </member>
- <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" brief="">
- </member>
- <member name="hue_variation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="initial_velocity" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="linear_accel" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="orbit_velocity" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="radial_accel" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="scale" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="spread" type="float" setter="set_spread" getter="get_spread" brief="">
- </member>
- <member name="tangential_accel" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
- </member>
- <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
- </member>
- <member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier" brief="">
- </member>
- <member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor" brief="">
- </member>
- <member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0">
- </constant>
- <constant name="PARAM_ANGULAR_VELOCITY" value="1">
- </constant>
- <constant name="PARAM_ORBIT_VELOCITY" value="2">
- </constant>
- <constant name="PARAM_LINEAR_ACCEL" value="3">
- </constant>
- <constant name="PARAM_RADIAL_ACCEL" value="4">
- </constant>
- <constant name="PARAM_TANGENTIAL_ACCEL" value="5">
- </constant>
- <constant name="PARAM_DAMPING" value="6">
- </constant>
- <constant name="PARAM_ANGLE" value="7">
- </constant>
- <constant name="PARAM_SCALE" value="8">
- </constant>
- <constant name="PARAM_HUE_VARIATION" value="9">
- </constant>
- <constant name="PARAM_ANIM_SPEED" value="10">
- </constant>
- <constant name="PARAM_ANIM_OFFSET" value="11">
- </constant>
- <constant name="PARAM_MAX" value="12">
- </constant>
- <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0">
- </constant>
- <constant name="FLAG_ROTATE_Y" value="1">
- </constant>
- <constant name="FLAG_MAX" value="4">
- </constant>
- <constant name="EMISSION_SHAPE_POINT" value="0">
- </constant>
- <constant name="EMISSION_SHAPE_SPHERE" value="1">
- </constant>
- <constant name="EMISSION_SHAPE_BOX" value="2">
- </constant>
- <constant name="EMISSION_SHAPE_POINTS" value="3">
- </constant>
- <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4">
- </constant>
- </constants>
-</class>
-<class name="Path" inherits="Spatial" category="Core">
- <brief_description>
- Container for a [Curve3D].
- </brief_description>
- <description>
- This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info.
- </description>
- <methods>
- <method name="get_curve" qualifiers="const">
- <return type="Curve3D">
- </return>
- <description>
- Returns the [Curve3D] contained.
- </description>
- </method>
- <method name="set_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="Curve3D">
- </argument>
- <description>
- Sets the [Curve3D].
- </description>
- </method>
- </methods>
- <members>
- <member name="curve" type="Curve3D" setter="set_curve" getter="get_curve" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Path2D" inherits="Node2D" category="Core">
- <brief_description>
- Container for a [Curve2D].
- </brief_description>
- <description>
- This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
- </description>
- <methods>
- <method name="get_curve" qualifiers="const">
- <return type="Curve2D">
- </return>
- <description>
- Returns the [Curve2D] contained.
- </description>
- </method>
- <method name="set_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="Curve2D">
- </argument>
- <description>
- Sets the [Curve2D].
- </description>
- </method>
- </methods>
- <members>
- <member name="curve" type="Curve2D" setter="set_curve" getter="get_curve" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PathFollow" inherits="Spatial" category="Core">
- <brief_description>
- Point sampler for a [Path].
- </brief_description>
- <description>
- This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex.
- It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
- </description>
- <methods>
- <method name="get_cubic_interpolation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the X displacement this node has from its parent [Path].
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path in 3D units.
- </description>
- </method>
- <method name="get_rotation_mode" qualifiers="const">
- <return type="int" enum="PathFollow.RotationMode">
- </return>
- <description>
- Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode.
- </description>
- </method>
- <method name="get_unit_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the Y displacement this node has from its parent [Path].
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node wraps its offsets around, or truncates them to the path ends.
- </description>
- </method>
- <method name="set_cubic_interpolation">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
- There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
- This method controls whether the position between two cached points is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="h_offset" type="float">
- </argument>
- <description>
- Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
- A similar effect may be achieved moving the this node's descendants.
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="loop" type="bool">
- </argument>
- <description>
- If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
- </description>
- </method>
- <method name="set_rotation_mode">
- <return type="void">
- </return>
- <argument index="0" name="rotation_mode" type="int" enum="PathFollow.RotationMode">
- </argument>
- <description>
- Allows or forbids rotation on one or more axes, per the constants below.
- </description>
- </method>
- <method name="set_unit_offset">
- <return type="void">
- </return>
- <argument index="0" name="unit_offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="v_offset" type="float">
- </argument>
- <description>
- Moves this node in the Y axis, for the same reasons of [method set_h_offset].
- </description>
- </method>
- </methods>
- <constants>
- <constant name="ROTATION_NONE" value="0">
- Forbids the PathFollow to rotate.
- </constant>
- <constant name="ROTATION_Y" value="1">
- Allows the PathFollow to rotate in the Y axis only.
- </constant>
- <constant name="ROTATION_XY" value="2">
- Allows the PathFollow to rotate in both the X, and Y axes.
- </constant>
- <constant name="ROTATION_XYZ" value="3">
- Allows the PathFollow to rotate in any axis.
- </constant>
- </constants>
-</class>
-<class name="PathFollow2D" inherits="Node2D" category="Core">
- <brief_description>
- Point sampler for a [Path2D].
- </brief_description>
- <description>
- This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex.
- It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
- </description>
- <methods>
- <method name="get_cubic_interpolation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the horizontal displacement this node has from its parent [Path2D].
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path in pixels.
- </description>
- </method>
- <method name="get_unit_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the vertical displacement this node has from its parent [Path2D].
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node wraps its offsets around, or truncates them to the path ends.
- </description>
- </method>
- <method name="is_rotating" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node rotates to follow the path.
- </description>
- </method>
- <method name="set_cubic_interpolation">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
- There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
- This method controls whether the position between two cached points is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="h_offset" type="float">
- </argument>
- <description>
- Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
- A similar effect may be achieved moving this node's descendants.
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="loop" type="bool">
- </argument>
- <description>
- If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path.
- </description>
- </method>
- <method name="set_rotate">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- If set, this node rotates to follow the path, making its descendants rotate.
- </description>
- </method>
- <method name="set_unit_offset">
- <return type="void">
- </return>
- <argument index="0" name="unit_offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="v_offset" type="float">
- </argument>
- <description>
- Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset].
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Performance" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_monitor" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="monitor" type="int" enum="Performance.Monitor">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="TIME_FPS" value="0">
- </constant>
- <constant name="TIME_PROCESS" value="1">
- </constant>
- <constant name="TIME_FIXED_PROCESS" value="2">
- </constant>
- <constant name="MEMORY_STATIC" value="3">
- </constant>
- <constant name="MEMORY_DYNAMIC" value="4">
- </constant>
- <constant name="MEMORY_STATIC_MAX" value="5">
- </constant>
- <constant name="MEMORY_DYNAMIC_MAX" value="6">
- </constant>
- <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7">
- </constant>
- <constant name="OBJECT_COUNT" value="8">
- </constant>
- <constant name="OBJECT_RESOURCE_COUNT" value="9">
- </constant>
- <constant name="OBJECT_NODE_COUNT" value="10">
- </constant>
- <constant name="RENDER_OBJECTS_IN_FRAME" value="11">
- </constant>
- <constant name="RENDER_VERTICES_IN_FRAME" value="12">
- </constant>
- <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="13">
- </constant>
- <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="14">
- </constant>
- <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="15">
- </constant>
- <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16">
- </constant>
- <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
- </constant>
- <constant name="RENDER_VIDEO_MEM_USED" value="17">
- </constant>
- <constant name="RENDER_TEXTURE_MEM_USED" value="18">
- </constant>
- <constant name="RENDER_VERTEX_MEM_USED" value="19">
- </constant>
- <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21">
- </constant>
- <constant name="PHYSICS_2D_COLLISION_PAIRS" value="22">
- </constant>
- <constant name="PHYSICS_2D_ISLAND_COUNT" value="23">
- </constant>
- <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24">
- </constant>
- <constant name="PHYSICS_3D_COLLISION_PAIRS" value="25">
- </constant>
- <constant name="PHYSICS_3D_ISLAND_COUNT" value="26">
- </constant>
- <constant name="MONITOR_MAX" value="27">
- </constant>
- </constants>
-</class>
-<class name="Physics2DDirectBodyState" inherits="Object" category="Core">
- <brief_description>
- Direct access object to a physics body in the [Physics2DServer].
- </brief_description>
- <description>
- Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body.
- </description>
- <methods>
- <method name="get_angular_velocity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the angular velocity of the body.
- </description>
- </method>
- <method name="get_contact_collider" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the [RID] of the collider.
- </description>
- </method>
- <method name="get_contact_collider_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the object id of the collider.
- </description>
- </method>
- <method name="get_contact_collider_object" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the collider object, this depends on how it was created (will return a scene node if such was used to create it).
- </description>
- </method>
- <method name="get_contact_collider_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the contact position in the collider.
- </description>
- </method>
- <method name="get_contact_collider_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the collider shape index.
- </description>
- </method>
- <method name="get_contact_collider_shape_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- </description>
- </method>
- <method name="get_contact_collider_velocity_at_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the linear velocity vector at contact point of the collider.
- </description>
- </method>
- <method name="get_contact_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts.
- </description>
- </method>
- <method name="get_contact_local_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the local normal (of this body) of the contact point.
- </description>
- </method>
- <method name="get_contact_local_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the local position (of this body) of the contact point.
- </description>
- </method>
- <method name="get_contact_local_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- Return the local shape index of the collision.
- </description>
- </method>
- <method name="get_inverse_inertia" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the inverse of the inertia of the body.
- </description>
- </method>
- <method name="get_inverse_mass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the inverse of the mass of the body.
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the current linear velocity of the body.
- </description>
- </method>
- <method name="get_space_state">
- <return type="Physics2DDirectSpaceState">
- </return>
- <description>
- Return the current state of space, useful for queries.
- </description>
- </method>
- <method name="get_step" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the timestep (delta) used for the simulation.
- </description>
- </method>
- <method name="get_total_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rate at which the body stops rotating, if there are not any other forces moving it.
- </description>
- </method>
- <method name="get_total_gravity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the total gravity vector being currently applied to this body.
- </description>
- </method>
- <method name="get_total_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rate at which the body stops moving, if there are not any other forces moving it.
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Return the transform matrix of the body.
- </description>
- </method>
- <method name="integrate_forces">
- <return type="void">
- </return>
- <description>
- Call the built-in force integration code.
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if this body is currently sleeping (not active).
- </description>
- </method>
- <method name="set_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="velocity" type="float">
- </argument>
- <description>
- Change the angular velocity of the body.
- </description>
- </method>
- <method name="set_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="velocity" type="Vector2">
- </argument>
- <description>
- Change the linear velocity of the body.
- </description>
- </method>
- <method name="set_sleep_state">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the sleeping state of the body, only affects character/rigid bodies.
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="transform" type="Transform2D">
- </argument>
- <description>
- Change the transform matrix of the body.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core">
- <brief_description>
- Software implementation of [Physics2DDirectBodyState].
- </brief_description>
- <description>
- Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Physics2DDirectSpaceState" inherits="Object" category="Core">
- <brief_description>
- Direct access object to a space in the [Physics2DServer].
- </brief_description>
- <description>
- Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
- </description>
- <methods>
- <method name="cast_motion">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
- </argument>
- <description>
- Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide.
- If the shape can not move, the array will be empty.
- </description>
- </method>
- <method name="collide_shape">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
- </argument>
- <argument index="1" name="max_results" type="int" default="32">
- </argument>
- <description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
- </description>
- </method>
- <method name="get_rest_info">
- <return type="Dictionary">
- </return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
- </argument>
- <description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
- pointo: Place where the shapes intersect.
- normal: Normal of the object at the point where the shapes intersect.
- shape: Shape index within the object against which the shape intersected.
- metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the shape intersected.
- collider: Object against which the shape intersected.
- rid: [RID] of the object against which the shape intersected.
- linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0).
- If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
- </description>
- </method>
- <method name="intersect_point">
- <return type="Array">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="max_results" type="int" default="32">
- </argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
- </argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
- </argument>
- <argument index="4" name="type_mask" type="int" default="15">
- </argument>
- <description>
- Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the point is in.
- metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the point is in.
- collider: Object the point is inside of.
- rid: [RID] of the object the point is in.
- Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
- </description>
- </method>
- <method name="intersect_ray">
- <return type="Dictionary">
- </return>
- <argument index="0" name="from" type="Vector2">
- </argument>
- <argument index="1" name="to" type="Vector2">
- </argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
- </argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
- </argument>
- <argument index="4" name="type_mask" type="int" default="15">
- </argument>
- <description>
- Intersect a ray in a given space. The returned object is a dictionary with the following fields:
- position: Place where ray is stopped.
- normal: Normal of the object at the point where the ray was stopped.
- shape: Shape index within the object against which the ray was stopped.
- metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the ray was stopped.
- collider: Object against which the ray was stopped.
- rid: [RID] of the object against which the ray was stopped.
- If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
- Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
- </description>
- </method>
- <method name="intersect_shape">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
- </argument>
- <argument index="1" name="max_results" type="int" default="32">
- </argument>
- <description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the shape intersected.
- metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the shape intersected.
- collider: Object the shape intersected.
- rid: [RID] of the object the shape intersected.
- The number of intersections can be limited with the second parameter, to reduce the processing time.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="TYPE_MASK_STATIC_BODY" value="1">
- Check for collisions with static bodies.
- </constant>
- <constant name="TYPE_MASK_KINEMATIC_BODY" value="2">
- Check for collisions with kinematic bodies.
- </constant>
- <constant name="TYPE_MASK_RIGID_BODY" value="4">
- Check for collisions with rigid bodies.
- </constant>
- <constant name="TYPE_MASK_CHARACTER_BODY" value="8">
- Check for collisions with rigid bodies in character mode.
- </constant>
- <constant name="TYPE_MASK_AREA" value="16">
- Check for collisions with areas.
- </constant>
- <constant name="TYPE_MASK_COLLISION" value="15">
- Check for collisions with any kind of bodies (but not areas).
- </constant>
- </constants>
-</class>
-<class name="Physics2DServer" inherits="Object" category="Core">
- <brief_description>
- Physics 2D Server.
- </brief_description>
- <description>
- Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
- </description>
- <methods>
- <method name="area_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
- </argument>
- <description>
- Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
- </description>
- </method>
- <method name="area_attach_object_instance_id">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Assign the area to a descendant of [Object], so it can exist in the node tree.
- </description>
- </method>
- <method name="area_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later.
- </description>
- </method>
- <method name="area_create">
- <return type="RID">
- </return>
- <description>
- Create an [Area2D].
- </description>
- </method>
- <method name="area_get_object_instance_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Get the instance ID of the object the area is assigned to.
- </description>
- </method>
- <method name="area_get_param" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
- </argument>
- <description>
- Return an area parameter value.
- </description>
- </method>
- <method name="area_get_shape" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Return the [RID] of the nth shape of an area.
- </description>
- </method>
- <method name="area_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Return the number of shapes assigned to an area.
- </description>
- </method>
- <method name="area_get_shape_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Return the transform matrix of a shape within an area.
- </description>
- </method>
- <method name="area_get_space" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Return the space assigned to the area.
- </description>
- </method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Return the space override mode for the area.
- </description>
- </method>
- <method name="area_get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- Return the transform matrix for an area.
- </description>
- </method>
- <method name="area_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Remove a shape from an area. It does not delete the shape, so it can be reassigned later.
- </description>
- </method>
- <method name="area_set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
- <description>
- Assign the area to one or many physics layers.
- </description>
- </method>
- <method name="area_set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="mask" type="int">
- </argument>
- <description>
- Set which physics layers the area will monitor.
- </description>
- </method>
- <method name="area_set_monitor_callback">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
- 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
- 2: [RID] of the object that entered/exited the area.
- 3: Instance ID of the object that entered/exited the area.
- 4: The shape index of the object that entered/exited the area.
- 5: The shape index of the area where the object entered/exited.
- </description>
- </method>
- <method name="area_set_param">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants.
- </description>
- </method>
- <method name="area_set_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="shape" type="RID">
- </argument>
- <description>
- Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID].
- </description>
- </method>
- <method name="area_set_shape_disabled">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_shape_transform">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform2D">
- </argument>
- <description>
- Set the transform matrix for an area shape.
- </description>
- </method>
- <method name="area_set_space">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="space" type="RID">
- </argument>
- <description>
- Assign a space to the area.
- </description>
- </method>
- <method name="area_set_space_override_mode">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
- </argument>
- <description>
- Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*.
- </description>
- </method>
- <method name="area_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="transform" type="Transform2D">
- </argument>
- <description>
- Set the transform matrix for an area.
- </description>
- </method>
- <method name="body_add_collision_exception">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="excepted_body" type="RID">
- </argument>
- <description>
- Add a body to the list of bodies exempt from collisions.
- </description>
- </method>
- <method name="body_add_force">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="offset" type="Vector2">
- </argument>
- <argument index="2" name="force" type="Vector2">
- </argument>
- <description>
- Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
- </description>
- </method>
- <method name="body_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
- </argument>
- <description>
- Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
- </description>
- </method>
- <method name="body_apply_impulse">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="impulse" type="Vector2">
- </argument>
- <description>
- Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
- </description>
- </method>
- <method name="body_attach_object_instance_id">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Assign the area to a descendant of [Object], so it can exist in the node tree.
- </description>
- </method>
- <method name="body_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Remove all shapes from a body.
- </description>
- </method>
- <method name="body_create">
- <return type="RID">
- </return>
- <argument index="0" name="mode" type="int" enum="Physics2DServer.BodyMode" default="2">
- </argument>
- <argument index="1" name="init_sleeping" type="bool" default="false">
- </argument>
- <description>
- Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
- </description>
- </method>
- <method name="body_get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the physics layer or layers a body belongs to.
- </description>
- </method>
- <method name="body_get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the physics layer or layers a body can collide with.
- </description>
- </method>
- <method name="body_get_continuous_collision_detection_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.CCDMode">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the continuous collision detection mode.
- </description>
- </method>
- <method name="body_get_max_contacts_reported" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
- </description>
- </method>
- <method name="body_get_mode" qualifiers="const">
- <return type="int" enum="Physics2DServer.BodyMode">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the body mode.
- </description>
- </method>
- <method name="body_get_object_instance_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Get the instance ID of the object the area is assigned to.
- </description>
- </method>
- <method name="body_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
- </argument>
- <description>
- Return the value of a body parameter.
- </description>
- </method>
- <method name="body_get_shape" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Return the [RID] of the nth shape of a body.
- </description>
- </method>
- <method name="body_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the number of shapes assigned to a body.
- </description>
- </method>
- <method name="body_get_shape_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Return the metadata of a shape of a body.
- </description>
- </method>
- <method name="body_get_shape_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Return the transform matrix of a body shape.
- </description>
- </method>
- <method name="body_get_space" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return the [RID] of the space assigned to a body.
- </description>
- </method>
- <method name="body_get_state" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
- </argument>
- <description>
- Return a body state.
- </description>
- </method>
- <method name="body_is_omitting_force_integration" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
- </description>
- </method>
- <method name="body_remove_collision_exception">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="excepted_body" type="RID">
- </argument>
- <description>
- Remove a body from the list of bodies exempt from collisions.
- </description>
- </method>
- <method name="body_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- Remove a shape from a body. The shape is not deleted, so it can be reused afterwards.
- </description>
- </method>
- <method name="body_set_axis_velocity">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="axis_velocity" type="Vector2">
- </argument>
- <description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
- </description>
- </method>
- <method name="body_set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
- <description>
- Set the physics layer or layers a body belongs to.
- </description>
- </method>
- <method name="body_set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mask" type="int">
- </argument>
- <description>
- Set the physics layer or layers a body can collide with.
- </description>
- </method>
- <method name="body_set_continuous_collision_detection_mode">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.CCDMode">
- </argument>
- <description>
- Set the continuous collision detection mode from any of the CCD_MODE_* constants.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
- </description>
- </method>
- <method name="body_set_force_integration_callback">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <argument index="3" name="userdata" type="Variant" default="null">
- </argument>
- <description>
- Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]).
- </description>
- </method>
- <method name="body_set_max_contacts_reported">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="amount" type="int">
- </argument>
- <description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
- </description>
- </method>
- <method name="body_set_mode">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mode" type="int" enum="Physics2DServer.BodyMode">
- </argument>
- <description>
- Set the body mode, from one of the constants BODY_MODE*.
- </description>
- </method>
- <method name="body_set_omit_force_integration">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
- </description>
- </method>
- <method name="body_set_param">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- Set a body parameter (see BODY_PARAM* constants).
- </description>
- </method>
- <method name="body_set_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="shape" type="RID">
- </argument>
- <description>
- Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID].
- </description>
- </method>
- <method name="body_set_shape_as_one_way_collision">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape_disabled">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape_metadata">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="metadata" type="Variant">
- </argument>
- <description>
- Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries.
- </description>
- </method>
- <method name="body_set_shape_transform">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform2D">
- </argument>
- <description>
- Set the transform matrix for a body shape.
- </description>
- </method>
- <method name="body_set_space">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="space" type="RID">
- </argument>
- <description>
- Assign a space to the body (see [method create_space]).
- </description>
- </method>
- <method name="body_set_state">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Set a body state (see BODY_STATE* constants).
- </description>
- </method>
- <method name="body_test_motion">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="from" type="Transform2D">
- </argument>
- <argument index="2" name="motion" type="Vector2">
- </argument>
- <argument index="3" name="margin" type="float" default="0.08">
- </argument>
- <argument index="4" name="result" type="Physics2DTestMotionResult" default="null">
- </argument>
- <description>
- Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
- </description>
- </method>
- <method name="damped_spring_joint_create">
- <return type="RID">
- </return>
- <argument index="0" name="anchor_a" type="Vector2">
- </argument>
- <argument index="1" name="anchor_b" type="Vector2">
- </argument>
- <argument index="2" name="body_a" type="RID">
- </argument>
- <argument index="3" name="body_b" type="RID">
- </argument>
- <description>
- Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
- </description>
- </method>
- <method name="damped_string_joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
- </argument>
- <description>
- Return the value of a damped spring joint parameter.
- </description>
- </method>
- <method name="damped_string_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants.
- </description>
- </method>
- <method name="free_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console.
- </description>
- </method>
- <method name="get_process_info">
- <return type="int">
- </return>
- <argument index="0" name="process_info" type="int" enum="Physics2DServer.ProcessInfo">
- </argument>
- <description>
- Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants.
- </description>
- </method>
- <method name="groove_joint_create">
- <return type="RID">
- </return>
- <argument index="0" name="groove1_a" type="Vector2">
- </argument>
- <argument index="1" name="groove2_a" type="Vector2">
- </argument>
- <argument index="2" name="anchor_b" type="Vector2">
- </argument>
- <argument index="3" name="body_a" type="RID">
- </argument>
- <argument index="4" name="body_b" type="RID">
- </argument>
- <description>
- Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself.
- </description>
- </method>
- <method name="joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
- </argument>
- <description>
- Return the value of a joint parameter.
- </description>
- </method>
- <method name="joint_get_type" qualifiers="const">
- <return type="int" enum="Physics2DServer.JointType">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <description>
- Return the type of a joint (see JOINT_* constants).
- </description>
- </method>
- <method name="joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants.
- </description>
- </method>
- <method name="pin_joint_create">
- <return type="RID">
- </return>
- <argument index="0" name="anchor" type="Vector2">
- </argument>
- <argument index="1" name="body_a" type="RID">
- </argument>
- <argument index="2" name="body_b" type="RID">
- </argument>
- <description>
- Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
- </description>
- </method>
- <method name="set_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- Activate or deactivate the 2D physics engine.
- </description>
- </method>
- <method name="shape_create">
- <return type="RID">
- </return>
- <argument index="0" name="type" type="int" enum="Physics2DServer.ShapeType">
- </argument>
- <description>
- Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
- </description>
- </method>
- <method name="shape_get_data" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- Return the shape data.
- </description>
- </method>
- <method name="shape_get_type" qualifiers="const">
- <return type="int" enum="Physics2DServer.ShapeType">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- Return the type of shape (see SHAPE_* constants).
- </description>
- </method>
- <method name="shape_set_data">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
- </description>
- </method>
- <method name="space_create">
- <return type="RID">
- </return>
- <description>
- Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space].
- </description>
- </method>
- <method name="space_get_direct_state">
- <return type="Physics2DDirectSpaceState">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <description>
- Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries.
- </description>
- </method>
- <method name="space_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
- </argument>
- <description>
- Return the value of a space parameter.
- </description>
- </method>
- <method name="space_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <description>
- Return whether the space is active.
- </description>
- </method>
- <method name="space_set_active">
- <return type="void">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="active" type="bool">
- </argument>
- <description>
- Mark a space as active. It will not have an effect, unless it is assigned to an area or body.
- </description>
- </method>
- <method name="space_set_param">
- <return type="void">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0">
- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
- </constant>
- <constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1">
- Constant to set/get the maximum distance a shape can be from another before they are considered separated.
- </constant>
- <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2">
- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
- </constant>
- <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3">
- </constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4">
- </constant>
- <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5">
- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
- </constant>
- <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6">
- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
- </constant>
- <constant name="SHAPE_LINE" value="0">
- This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks.
- </constant>
- <constant name="SHAPE_SEGMENT" value="2">
- This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections.
- </constant>
- <constant name="SHAPE_CIRCLE" value="3">
- This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks.
- </constant>
- <constant name="SHAPE_RECTANGLE" value="4">
- This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks.
- </constant>
- <constant name="SHAPE_CAPSULE" value="5">
- This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks.
- </constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="6">
- This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form, in fact, a convex polygon.
- </constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="7">
- This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks.
- </constant>
- <constant name="SHAPE_CUSTOM" value="8">
- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
- </constant>
- <constant name="AREA_PARAM_GRAVITY" value="0">
- Constant to set/get gravity strength in an area.
- </constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1">
- Constant to set/get gravity vector/center in an area.
- </constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2">
- Constant to set/get whether the gravity vector of an area is a direction, or a center point.
- </constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3">
- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
- </constant>
- <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4">
- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
- </constant>
- <constant name="AREA_PARAM_LINEAR_DAMP" value="5">
- Constant to set/get the linear dampening factor of an area.
- </constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6">
- Constant to set/get the angular dampening factor of an area.
- </constant>
- <constant name="AREA_PARAM_PRIORITY" value="7">
- Constant to set/get the priority (order of processing) of an area.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0">
- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1">
- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_REPLACE" value="3">
- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
- </constant>
- <constant name="BODY_MODE_STATIC" value="0">
- Constant for static bodies.
- </constant>
- <constant name="BODY_MODE_KINEMATIC" value="1">
- Constant for kinematic bodies.
- </constant>
- <constant name="BODY_MODE_RIGID" value="2">
- Constant for rigid bodies.
- </constant>
- <constant name="BODY_MODE_CHARACTER" value="3">
- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
- </constant>
- <constant name="BODY_PARAM_BOUNCE" value="0">
- Constant to set/get a body's bounce factor.
- </constant>
- <constant name="BODY_PARAM_FRICTION" value="1">
- Constant to set/get a body's friction.
- </constant>
- <constant name="BODY_PARAM_MASS" value="2">
- Constant to set/get a body's mass.
- </constant>
- <constant name="BODY_PARAM_INERTIA" value="3">
- Constant to set/get a body's inertia.
- </constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="4">
- Constant to set/get a body's gravity multiplier.
- </constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="5">
- Constant to set/get a body's linear dampening factor.
- </constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="6">
- Constant to set/get a body's angular dampening factor.
- </constant>
- <constant name="BODY_PARAM_MAX" value="7">
- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0.
- </constant>
- <constant name="BODY_STATE_TRANSFORM" value="0">
- Constant to set/get the current transform matrix of the body.
- </constant>
- <constant name="BODY_STATE_LINEAR_VELOCITY" value="1">
- Constant to set/get the current linear velocity of the body.
- </constant>
- <constant name="BODY_STATE_ANGULAR_VELOCITY" value="2">
- Constant to set/get the current angular velocity of the body.
- </constant>
- <constant name="BODY_STATE_SLEEPING" value="3">
- Constant to sleep/wake up a body, or to get whether it is sleeping.
- </constant>
- <constant name="BODY_STATE_CAN_SLEEP" value="4">
- Constant to set/get whether the body can sleep.
- </constant>
- <constant name="JOINT_PIN" value="0">
- Constant to create pin joints.
- </constant>
- <constant name="JOINT_GROOVE" value="1">
- Constant to create groove joints.
- </constant>
- <constant name="JOINT_DAMPED_SPRING" value="2">
- Constant to create damped spring joints.
- </constant>
- <constant name="DAMPED_STRING_REST_LENGTH" value="0">
- Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
- </constant>
- <constant name="DAMPED_STRING_STIFFNESS" value="1">
- Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
- </constant>
- <constant name="DAMPED_STRING_DAMPING" value="2">
- Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
- </constant>
- <constant name="CCD_MODE_DISABLED" value="0">
- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
- </constant>
- <constant name="CCD_MODE_CAST_RAY" value="1">
- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise.
- </constant>
- <constant name="CCD_MODE_CAST_SHAPE" value="2">
- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise.
- </constant>
- <constant name="AREA_BODY_ADDED" value="0">
- The value of the first parameter and area callback function receives, when an object enters one of its shapes.
- </constant>
- <constant name="AREA_BODY_REMOVED" value="1">
- The value of the first parameter and area callback function receives, when an object exits one of its shapes.
- </constant>
- <constant name="INFO_ACTIVE_OBJECTS" value="0">
- Constant to get the number of objects that are not sleeping.
- </constant>
- <constant name="INFO_COLLISION_PAIRS" value="1">
- Constant to get the number of possible collisions.
- </constant>
- <constant name="INFO_ISLAND_COUNT" value="2">
- Constant to get the number of space regions where a collision could occur.
- </constant>
- </constants>
-</class>
-<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core">
- <brief_description>
- Software implementation of [Physics2DServer].
- </brief_description>
- <description>
- Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core">
- <brief_description>
- Parameters to be sent to a 2D shape physics query.
- </brief_description>
- <description>
- This class contains the shape and other parameters for intersection/collision queries.
- </description>
- <methods>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layer the shape belongs to.
- </description>
- </method>
- <method name="get_exclude" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return the list of objects, or object [RID]\ s, that will be excluded from collisions.
- </description>
- </method>
- <method name="get_margin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the collision margin for the shape.
- </description>
- </method>
- <method name="get_motion" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the current movement speed of the shape.
- </description>
- </method>
- <method name="get_object_type_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the type of object the shape belongs to.
- </description>
- </method>
- <method name="get_shape_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Return the [RID] of the shape queried.
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Return the transform matrix of the shape queried.
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="collision_layer" type="int">
- </argument>
- <description>
- Set the physics layer the shape belongs to.
- </description>
- </method>
- <method name="set_exclude">
- <return type="void">
- </return>
- <argument index="0" name="exclude" type="Array">
- </argument>
- <description>
- Set the list of objects, or object [RID]\ s, that will be excluded from collisions.
- </description>
- </method>
- <method name="set_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="float">
- </argument>
- <description>
- Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
- </description>
- </method>
- <method name="set_motion">
- <return type="void">
- </return>
- <argument index="0" name="motion" type="Vector2">
- </argument>
- <description>
- Set the current movement speed of the shape.
- </description>
- </method>
- <method name="set_object_type_mask">
- <return type="void">
- </return>
- <argument index="0" name="object_type_mask" type="int">
- </argument>
- <description>
- Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).
- </description>
- </method>
- <method name="set_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="Resource">
- </argument>
- <description>
- Set the [Shape2D] that will be used for collision/intersection queries.
- </description>
- </method>
- <method name="set_shape_rid">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- Set the [RID] of the shape to be used in queries.
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="transform" type="Transform2D">
- </argument>
- <description>
- Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_result_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_result_object" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_object_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_object_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_rid" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Physics2DTestMotionResult" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_collider" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_shape" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collider_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_point" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_motion" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_motion_remainder" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsBody" inherits="CollisionObject" category="Core">
- <brief_description>
- Base class for different types of Physics bodies.
- </brief_description>
- <description>
- PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it.
- </description>
- <methods>
- <method name="add_collision_exception_with">
- <return type="void">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_collision_exception_with">
- <return type="void">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- Removes a body from the collision exception list.
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core">
- <brief_description>
- Base class for all objects affected by physics.
- </brief_description>
- <description>
- PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
- </description>
- <methods>
- <method name="add_collision_exception_with">
- <return type="void">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layer this area is in.
- </description>
- </method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the collision mask.
- </description>
- </method>
- <method name="get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- Return an individual bit on the collision mask.
- </description>
- </method>
- <method name="remove_collision_exception_with">
- <return type="void">
- </return>
- <argument index="0" name="body" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the physics layers this area is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier.
- </description>
- </method>
- <method name="set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- Set the physics layers this area can scan for collisions.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
- </description>
- </method>
- </methods>
- <members>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
- </member>
- <member name="layers" type="int" setter="_set_layers" getter="_get_layers" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PhysicsDirectBodyState" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_force">
- <return type="void">
- </return>
- <argument index="0" name="force" type="Vector3">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="apply_impulse">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="j" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="apply_torqe_impulse">
- <return type="void">
- </return>
- <argument index="0" name="j" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_angular_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_center_of_mass" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_contact_collider" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_object" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_pos" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_velocity_at_pos" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_contact_local_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_local_pos" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_local_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_inverse_inertia" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_inverse_mass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_principal_inertia_axes" qualifiers="const">
- <return type="Basis">
- </return>
- <description>
- </description>
- </method>
- <method name="get_space_state">
- <return type="PhysicsDirectSpaceState">
- </return>
- <description>
- </description>
- </method>
- <method name="get_step" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_total_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_total_gravity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_total_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="integrate_forces">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sleep_state">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsDirectBodyStateSW" inherits="PhysicsDirectBodyState" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsDirectSpaceState" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="cast_motion">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
- </argument>
- <argument index="1" name="motion" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="collide_shape">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
- </argument>
- <argument index="1" name="max_results" type="int" default="32">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_rest_info">
- <return type="Dictionary">
- </return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
- </argument>
- <description>
- </description>
- </method>
- <method name="intersect_ray">
- <return type="Dictionary">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <argument index="2" name="exclude" type="Array" default="[ ]">
- </argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
- </argument>
- <argument index="4" name="type_mask" type="int" default="15">
- </argument>
- <description>
- </description>
- </method>
- <method name="intersect_shape">
- <return type="Array">
- </return>
- <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
- </argument>
- <argument index="1" name="max_results" type="int" default="32">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="TYPE_MASK_STATIC_BODY" value="1">
- </constant>
- <constant name="TYPE_MASK_KINEMATIC_BODY" value="2">
- </constant>
- <constant name="TYPE_MASK_RIGID_BODY" value="4">
- </constant>
- <constant name="TYPE_MASK_CHARACTER_BODY" value="8">
- </constant>
- <constant name="TYPE_MASK_AREA" value="16">
- </constant>
- <constant name="TYPE_MASK_COLLISION" value="15">
- </constant>
- </constants>
-</class>
-<class name="PhysicsServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="area_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_attach_object_instance_id">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_create">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="area_get_object_instance_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_param" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_shape" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_shape_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_space" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_monitor_callback">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_param">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_ray_pickable">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_shape">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_shape_transform">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_space">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="space" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_space_override_mode">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_add_collision_exception">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="excepted_body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_apply_impulse">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <argument index="2" name="impulse" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_apply_torque_impulse">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="impulse" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_attach_object_instance_id">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_create">
- <return type="RID">
- </return>
- <argument index="0" name="mode" type="int" enum="PhysicsServer.BodyMode" default="2">
- </argument>
- <argument index="1" name="init_sleeping" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_axis_lock" qualifiers="const">
- <return type="int" enum="PhysicsServer.BodyAxisLock">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_max_contacts_reported" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer.BodyMode">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_object_instance_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_space" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_state" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_is_continuous_collision_detection_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_is_omitting_force_integration" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_remove_collision_exception">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="excepted_body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="axis" type="int" enum="PhysicsServer.BodyAxisLock">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_axis_velocity">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="axis_velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_enable_continuous_collision_detection">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_force_integration_callback">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="receiver" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <argument index="3" name="userdata" type="Variant" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_max_contacts_reported">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_mode">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_omit_force_integration">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_param">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_ray_pickable">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape_transform">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_space">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="space" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_state">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="cone_twist_joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="cone_twist_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="free_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="generic_6dof_joint_get_flag">
- <return type="bool">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="axis" type="int" enum="Vector3.Axis">
- </argument>
- <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
- </argument>
- <description>
- </description>
- </method>
- <method name="generic_6dof_joint_get_param">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="axis" type="int" enum="Vector3.Axis">
- </argument>
- <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="generic_6dof_joint_set_flag">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="axis" type="int" enum="Vector3.Axis">
- </argument>
- <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
- </argument>
- <argument index="3" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="generic_6dof_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="axis" type="int" enum="Vector3.Axis">
- </argument>
- <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
- </argument>
- <argument index="3" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_process_info">
- <return type="int">
- </return>
- <argument index="0" name="process_info" type="int" enum="PhysicsServer.ProcessInfo">
- </argument>
- <description>
- </description>
- </method>
- <method name="hinge_joint_get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
- </argument>
- <description>
- </description>
- </method>
- <method name="hinge_joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="hinge_joint_set_flag">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
- </argument>
- <argument index="2" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="hinge_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_create_cone_twist">
- <return type="RID">
- </return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_ref_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="local_ref_B" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_create_generic_6dof">
- <return type="RID">
- </return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_ref_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="local_ref_B" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_create_hinge">
- <return type="RID">
- </return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="hinge_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="hinge_B" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_create_pin">
- <return type="RID">
- </return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_A" type="Vector3">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="local_B" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_create_slider">
- <return type="RID">
- </return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_ref_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="local_ref_B" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_get_solver_priority" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_get_type" qualifiers="const">
- <return type="int" enum="PhysicsServer.JointType">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="joint_set_solver_priority">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="priority" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_get_local_a" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_get_local_b" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_set_local_a">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="local_A" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_set_local_b">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="local_B" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="pin_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_create">
- <return type="RID">
- </return>
- <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_get_data" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_get_type" qualifiers="const">
- <return type="int" enum="PhysicsServer.ShapeType">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_set_data">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="slider_joint_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="slider_joint_set_param">
- <return type="void">
- </return>
- <argument index="0" name="joint" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_create">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="space_get_direct_state">
- <return type="PhysicsDirectSpaceState">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_is_active" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_set_active">
- <return type="void">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_set_param">
- <return type="void">
- </return>
- <argument index="0" name="space" type="RID">
- </argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
- </argument>
- <argument index="2" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="JOINT_PIN" value="0">
- </constant>
- <constant name="JOINT_HINGE" value="1">
- </constant>
- <constant name="JOINT_SLIDER" value="2">
- </constant>
- <constant name="JOINT_CONE_TWIST" value="3">
- </constant>
- <constant name="JOINT_6DOF" value="4">
- </constant>
- <constant name="PIN_JOINT_BIAS" value="0">
- </constant>
- <constant name="PIN_JOINT_DAMPING" value="1">
- </constant>
- <constant name="PIN_JOINT_IMPULSE_CLAMP" value="2">
- </constant>
- <constant name="HINGE_JOINT_BIAS" value="0">
- </constant>
- <constant name="HINGE_JOINT_LIMIT_UPPER" value="1">
- </constant>
- <constant name="HINGE_JOINT_LIMIT_LOWER" value="2">
- </constant>
- <constant name="HINGE_JOINT_LIMIT_BIAS" value="3">
- </constant>
- <constant name="HINGE_JOINT_LIMIT_SOFTNESS" value="4">
- </constant>
- <constant name="HINGE_JOINT_LIMIT_RELAXATION" value="5">
- </constant>
- <constant name="HINGE_JOINT_MOTOR_TARGET_VELOCITY" value="6">
- </constant>
- <constant name="HINGE_JOINT_MOTOR_MAX_IMPULSE" value="7">
- </constant>
- <constant name="HINGE_JOINT_FLAG_USE_LIMIT" value="0">
- </constant>
- <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_LIMIT_LOWER" value="1">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS" value="2">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION" value="3">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_LIMIT_DAMPING" value="4">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_MOTION_SOFTNESS" value="5">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_MOTION_RESTITUTION" value="6">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_MOTION_DAMPING" value="7">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS" value="8">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION" value="9">
- </constant>
- <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING" value="10">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_LIMIT_UPPER" value="11">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_LIMIT_LOWER" value="12">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS" value="13">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION" value="14">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_LIMIT_DAMPING" value="15">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS" value="16">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION" value="17">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_MOTION_DAMPING" value="18">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS" value="19">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION" value="20">
- </constant>
- <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING" value="21">
- </constant>
- <constant name="SLIDER_JOINT_MAX" value="22">
- </constant>
- <constant name="CONE_TWIST_JOINT_SWING_SPAN" value="0">
- </constant>
- <constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1">
- </constant>
- <constant name="CONE_TWIST_JOINT_BIAS" value="2">
- </constant>
- <constant name="CONE_TWIST_JOINT_SOFTNESS" value="3">
- </constant>
- <constant name="CONE_TWIST_JOINT_RELAXATION" value="4">
- </constant>
- <constant name="G6DOF_JOINT_LINEAR_LOWER_LIMIT" value="0">
- </constant>
- <constant name="G6DOF_JOINT_LINEAR_UPPER_LIMIT" value="1">
- </constant>
- <constant name="G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS" value="2">
- </constant>
- <constant name="G6DOF_JOINT_LINEAR_RESTITUTION" value="3">
- </constant>
- <constant name="G6DOF_JOINT_LINEAR_DAMPING" value="4">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_LOWER_LIMIT" value="5">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_UPPER_LIMIT" value="6">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS" value="7">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_DAMPING" value="8">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_RESTITUTION" value="9">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_FORCE_LIMIT" value="10">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_ERP" value="11">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY" value="12">
- </constant>
- <constant name="G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT" value="13">
- </constant>
- <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0">
- </constant>
- <constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1">
- </constant>
- <constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="2">
- </constant>
- <constant name="SHAPE_PLANE" value="0">
- </constant>
- <constant name="SHAPE_RAY" value="1">
- </constant>
- <constant name="SHAPE_SPHERE" value="2">
- </constant>
- <constant name="SHAPE_BOX" value="3">
- </constant>
- <constant name="SHAPE_CAPSULE" value="4">
- </constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="5">
- </constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="6">
- </constant>
- <constant name="SHAPE_HEIGHTMAP" value="7">
- </constant>
- <constant name="SHAPE_CUSTOM" value="8">
- </constant>
- <constant name="AREA_PARAM_GRAVITY" value="0">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4">
- </constant>
- <constant name="AREA_PARAM_LINEAR_DAMP" value="5">
- </constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6">
- </constant>
- <constant name="AREA_PARAM_PRIORITY" value="7">
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0">
- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1">
- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_REPLACE" value="3">
- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
- </constant>
- <constant name="AREA_SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
- </constant>
- <constant name="BODY_MODE_STATIC" value="0">
- </constant>
- <constant name="BODY_MODE_KINEMATIC" value="1">
- </constant>
- <constant name="BODY_MODE_RIGID" value="2">
- </constant>
- <constant name="BODY_MODE_CHARACTER" value="3">
- </constant>
- <constant name="BODY_PARAM_BOUNCE" value="0">
- </constant>
- <constant name="BODY_PARAM_FRICTION" value="1">
- </constant>
- <constant name="BODY_PARAM_MASS" value="2">
- </constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="3">
- </constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="5">
- </constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="4">
- </constant>
- <constant name="BODY_PARAM_MAX" value="6">
- </constant>
- <constant name="BODY_STATE_TRANSFORM" value="0">
- </constant>
- <constant name="BODY_STATE_LINEAR_VELOCITY" value="1">
- </constant>
- <constant name="BODY_STATE_ANGULAR_VELOCITY" value="2">
- </constant>
- <constant name="BODY_STATE_SLEEPING" value="3">
- </constant>
- <constant name="BODY_STATE_CAN_SLEEP" value="4">
- </constant>
- <constant name="AREA_BODY_ADDED" value="0">
- </constant>
- <constant name="AREA_BODY_REMOVED" value="1">
- </constant>
- <constant name="INFO_ACTIVE_OBJECTS" value="0">
- </constant>
- <constant name="INFO_COLLISION_PAIRS" value="1">
- </constant>
- <constant name="INFO_ISLAND_COUNT" value="2">
- </constant>
- </constants>
-</class>
-<class name="PhysicsServerSW" inherits="PhysicsServer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_exclude" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_margin" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_object_type_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shape_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="collision_layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_exclude">
- <return type="void">
- </return>
- <argument index="0" name="exclude" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_object_type_mask">
- <return type="void">
- </return>
- <argument index="0" name="object_type_mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape_rid">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core">
- <brief_description>
- Result of a shape query in Physics2DServer.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_result_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_result_object" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_object_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_object_shape" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_result_rid" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PinJoint" inherits="Joint" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="PinJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="PinJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="params/bias" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="params/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="params/impulse_clamp" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_BIAS" value="0">
- </constant>
- <constant name="PARAM_DAMPING" value="1">
- </constant>
- <constant name="PARAM_IMPULSE_CLAMP" value="2">
- </constant>
- </constants>
-</class>
-<class name="PinJoint2D" inherits="Joint2D" category="Core">
- <brief_description>
- Pin Joint for 2D Shapes.
- </brief_description>
- <description>
- Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space.
- </description>
- <methods>
- <method name="get_softness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_softness">
- <return type="void">
- </return>
- <argument index="0" name="softness" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="softness" type="float" setter="set_softness" getter="get_softness" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Plane" category="Built-In Types">
- <brief_description>
- Plane in hessian form.
- </brief_description>
- <description>
- Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
- </description>
- <methods>
- <method name="Plane">
- <return type="Plane">
- </return>
- <argument index="0" name="a" type="float">
- </argument>
- <argument index="1" name="b" type="float">
- </argument>
- <argument index="2" name="c" type="float">
- </argument>
- <argument index="3" name="d" type="float">
- </argument>
- <description>
- Creates a plane from the three parameters "a", "b", "c" and "d".
- </description>
- </method>
- <method name="Plane">
- <return type="Plane">
- </return>
- <argument index="0" name="v1" type="Vector3">
- </argument>
- <argument index="1" name="v2" type="Vector3">
- </argument>
- <argument index="2" name="v3" type="Vector3">
- </argument>
- <description>
- Creates a plane from three points.
- </description>
- </method>
- <method name="Plane">
- <return type="Plane">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <argument index="1" name="d" type="float">
- </argument>
- <description>
- Creates a plane from the normal and the plane's distance to the origin.
- </description>
- </method>
- <method name="center">
- <return type="Vector3">
- </return>
- <description>
- Returns the center of the plane.
- </description>
- </method>
- <method name="distance_to">
- <return type="float">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <description>
- Returns the shortest distance from the plane to the position "point".
- </description>
- </method>
- <method name="get_any_point">
- <return type="Vector3">
- </return>
- <description>
- Returns a point on the plane.
- </description>
- </method>
- <method name="has_point">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <argument index="1" name="epsilon" type="float" default="0.00001">
- </argument>
- <description>
- Returns true if "point" is inside the plane (by a very minimum threshold).
- </description>
- </method>
- <method name="intersect_3">
- <return type="Vector3">
- </return>
- <argument index="0" name="b" type="Plane">
- </argument>
- <argument index="1" name="c" type="Plane">
- </argument>
- <description>
- Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.
- </description>
- </method>
- <method name="intersects_ray">
- <return type="Vector3">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="dir" type="Vector3">
- </argument>
- <description>
- Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned.
- </description>
- </method>
- <method name="intersects_segment">
- <return type="Vector3">
- </return>
- <argument index="0" name="begin" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <description>
- Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.
- </description>
- </method>
- <method name="is_point_over">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <description>
- Returns true if "point" is located above the plane.
- </description>
- </method>
- <method name="normalized">
- <return type="Plane">
- </return>
- <description>
- Returns a copy of the plane, normalized.
- </description>
- </method>
- <method name="project">
- <return type="Vector3">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <description>
- Returns the orthogonal projection of point "p" into a point in the plane.
- </description>
- </method>
- </methods>
- <members>
- <member name="d" type="float" setter="" getter="" brief="">
- </member>
- <member name="normal" type="Vector3" setter="" getter="" brief="">
- </member>
- <member name="x" type="float" setter="" getter="" brief="">
- </member>
- <member name="y" type="float" setter="" getter="" brief="">
- </member>
- <member name="z" type="float" setter="" getter="" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_depth" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_depth">
- <return type="void">
- </return>
- <argument index="0" name="subdivide" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_width">
- <return type="void">
- </return>
- <argument index="0" name="subdivide" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
- </member>
- <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PlaneShape" inherits="Shape" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_plane" qualifiers="const">
- <return type="Plane">
- </return>
- <description>
- </description>
- </method>
- <method name="set_plane">
- <return type="void">
- </return>
- <argument index="0" name="plane" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="plane" type="Plane" setter="set_plane" getter="get_plane" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Polygon2D" inherits="Node2D" category="Core">
- <brief_description>
- 2D polygon representation
- </brief_description>
- <description>
- A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon.
- </description>
- <methods>
- <method name="get_antialiased" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Return the polygon fill color.
- </description>
- </method>
- <method name="get_invert" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this polygon is inverted or not.
- </description>
- </method>
- <method name="get_invert_border" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the added padding around the bounding box.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the offset for the polygon vertices.
- </description>
- </method>
- <method name="get_polygon" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return the set of vertices that defines this polygon.
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- Return the polygon texture
- </description>
- </method>
- <method name="get_texture_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the polygon texture offset.
- </description>
- </method>
- <method name="get_texture_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the rotation in radians of the texture polygon.
- </description>
- </method>
- <method name="get_texture_scale" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the uv coordinate multiplier.
- </description>
- </method>
- <method name="get_uv" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return the texture coordinates associated with every vertex of the polygon.
- </description>
- </method>
- <method name="get_vertex_colors" qualifiers="const">
- <return type="PoolColorArray">
- </return>
- <description>
- Return the list of vertex colors.
- </description>
- </method>
- <method name="set_antialiased">
- <return type="void">
- </return>
- <argument index="0" name="antialiased" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors].
- </description>
- </method>
- <method name="set_invert">
- <return type="void">
- </return>
- <argument index="0" name="invert" type="bool">
- </argument>
- <description>
- Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon).
- </description>
- </method>
- <method name="set_invert_border">
- <return type="void">
- </return>
- <argument index="0" name="invert_border" type="float">
- </argument>
- <description>
- Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom.
- </description>
- </method>
- <method name="set_polygon">
- <return type="void">
- </return>
- <argument index="0" name="polygon" type="PoolVector2Array">
- </argument>
- <description>
- Define the set of vertices that will represent the polygon.
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture_offset">
- <return type="void">
- </return>
- <argument index="0" name="texture_offset" type="Vector2">
- </argument>
- <description>
- Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top.
- </description>
- </method>
- <method name="set_texture_rotation">
- <return type="void">
- </return>
- <argument index="0" name="texture_rotation" type="float">
- </argument>
- <description>
- Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation.
- </description>
- </method>
- <method name="set_texture_scale">
- <return type="void">
- </return>
- <argument index="0" name="texture_scale" type="Vector2">
- </argument>
- <description>
- Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa.
- </description>
- </method>
- <method name="set_uv">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="PoolVector2Array">
- </argument>
- <description>
- Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored.
- </description>
- </method>
- <method name="set_vertex_colors">
- <return type="void">
- </return>
- <argument index="0" name="vertex_colors" type="PoolColorArray">
- </argument>
- <description>
- Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored.
- Colors are interpolated between vertices, resulting in smooth gradients when they differ.
- </description>
- </method>
- </methods>
- <members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" brief="">
- </member>
- <member name="color" type="Color" setter="set_color" getter="get_color" brief="">
- </member>
- <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border" brief="">
- </member>
- <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" brief="">
- </member>
- <member name="texture_rotation" type="float" setter="_set_texture_rotationd" getter="_get_texture_rotationd" brief="">
- </member>
- <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" brief="">
- </member>
- <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" brief="">
- </member>
- <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PolygonPathFinder" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="find_path">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="from" type="Vector2">
- </argument>
- <argument index="1" name="to" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bounds" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_closest_point" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_intersections" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="from" type="Vector2">
- </argument>
- <argument index="1" name="to" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_point_penalty" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_point_inside" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_penalty">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="penalty" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="setup">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <argument index="1" name="connections" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PoolByteArray" category="Built-In Types">
- <brief_description>
- Raw byte array.
- </brief_description>
- <description>
- Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory.
- </description>
- <methods>
- <method name="PoolByteArray">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Create from a generic array.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="byte" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolByteArray">
- </argument>
- <description>
- Append an [PoolByteArray] at the end of this array.
- </description>
- </method>
- <method name="compress">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="compression_mode" type="int" default="0">
- </argument>
- <description>
- Returns a new [PoolByteArray] with the data compressed. The compression mode can be set using one of the COMPRESS_* constants of [File].
- </description>
- </method>
- <method name="decompress">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="buffer_size" type="int">
- </argument>
- <argument index="1" name="compression_mode" type="int" default="0">
- </argument>
- <description>
- Returns a new [PoolByteArray] with the data decompressed. The buffer_size should be set as the size of the uncompressed data. The compression mode can be set using one of the COMPRESS_* constants of [File].
- </description>
- </method>
- <method name="get_string_from_ascii">
- <return type="String">
- </return>
- <description>
- Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart).
- </description>
- </method>
- <method name="get_string_from_utf8">
- <return type="String">
- </return>
- <description>
- Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="byte" type="int">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="byte" type="int">
- </argument>
- <description>
- Append an element at the end of the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the [PoolByteArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="byte" type="int">
- </argument>
- <description>
- Change the byte at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the array.
- </description>
- </method>
- <method name="subarray">
- <return type="PoolByteArray">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <argument index="1" name="to" type="int">
- </argument>
- <description>
- Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolColorArray" category="Built-In Types">
- <brief_description>
- Array of Colors
- </brief_description>
- <description>
- Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
- </description>
- <methods>
- <method name="PoolColorArray">
- <return type="PoolColorArray">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Create from a generic array.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolColorArray">
- </argument>
- <description>
- Append an [PoolColorArray] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Append a value to the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the [PoolColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Change the [Color] at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the array size.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolIntArray" category="Built-In Types">
- <brief_description>
- Integer Array.
- </brief_description>
- <description>
- Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
- </description>
- <methods>
- <method name="PoolIntArray">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Create from a generic array.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="integer" type="int">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolIntArray">
- </argument>
- <description>
- Append an [PoolIntArray] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="integer" type="int">
- </argument>
- <description>
- Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="integer" type="int">
- </argument>
- <description>
- Append a value to the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the [PoolIntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="integer" type="int">
- </argument>
- <description>
- Change the int at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the array size.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolRealArray" category="Built-In Types">
- <brief_description>
- Real Array.
- </brief_description>
- <description>
- Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory.
- </description>
- <methods>
- <method name="PoolRealArray">
- <return type="PoolRealArray">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Create from a generic array.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolRealArray">
- </argument>
- <description>
- Append an [RealArray] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Append an element at the end of the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- Change the float at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the array.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolStringArray" category="Built-In Types">
- <brief_description>
- String Array.
- </brief_description>
- <description>
- String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory.
- </description>
- <methods>
- <method name="PoolStringArray">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Create from a generic array.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolStringArray">
- </argument>
- <description>
- Append an [StringArray] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="string" type="String">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- </description>
- </method>
- <method name="join">
- <return type="String">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Append a string element at end of the array.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="string" type="String">
- </argument>
- <description>
- Change the [String] at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the array.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolVector2Array" category="Built-In Types">
- <brief_description>
- An Array of Vector2.
- </brief_description>
- <description>
- An Array specifically designed to hold Vector2.
- </description>
- <methods>
- <method name="PoolVector2Array">
- <return type="PoolVector2Array">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Construct a new [PoolVector2Array]. Optionally, you can pass in an Array that will be converted.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="vector2" type="Vector2">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolVector2Array">
- </argument>
- <description>
- Append an [PoolVector2Array] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vector2" type="Vector2">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="vector2" type="Vector2">
- </argument>
- <description>
- Insert a [Vector2] at the end.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the PoolVector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vector2" type="Vector2">
- </argument>
- <description>
- Change the [Vector2] at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the array.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PoolVector3Array" category="Built-In Types">
- <brief_description>
- An Array of Vector3.
- </brief_description>
- <description>
- An Array specifically designed to hold Vector3.
- </description>
- <methods>
- <method name="PoolVector3Array">
- <return type="PoolVector3Array">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted.
- </description>
- </method>
- <method name="append">
- <argument index="0" name="vector3" type="Vector3">
- </argument>
- <description>
- Append an element at the end of the array (alias of [method push_back]).
- </description>
- </method>
- <method name="append_array">
- <argument index="0" name="array" type="PoolVector3Array">
- </argument>
- <description>
- Append an [PoolVector3Array] at the end of this array.
- </description>
- </method>
- <method name="insert">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vector3" type="Vector3">
- </argument>
- <description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- </description>
- </method>
- <method name="invert">
- <description>
- Reverse the order of the elements in the array (so first element will now be the last).
- </description>
- </method>
- <method name="push_back">
- <argument index="0" name="vector3" type="Vector3">
- </argument>
- <description>
- Insert a Vector3 at the end.
- </description>
- </method>
- <method name="remove">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove an element from the array by index.
- </description>
- </method>
- <method name="resize">
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Set the size of the PoolVector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- </description>
- </method>
- <method name="set">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="vector3" type="Vector3">
- </argument>
- <description>
- Change the [Vector3] at the given index.
- </description>
- </method>
- <method name="size">
- <return type="int">
- </return>
- <description>
- Return the size of the array.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Popup" inherits="Control" category="Core">
- <brief_description>
- Base container control for popups and dialogs.
- </brief_description>
- <description>
- Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
- </description>
- <methods>
- <method name="is_exclusive" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the popup will hide other popups when shown on the screen.
- </description>
- </method>
- <method name="popup">
- <return type="void">
- </return>
- <argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form).
- </description>
- </method>
- <method name="popup_centered">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
- </description>
- </method>
- <method name="popup_centered_minsize">
- <return type="void">
- </return>
- <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code].
- </description>
- </method>
- <method name="popup_centered_ratio">
- <return type="void">
- </return>
- <argument index="0" name="ratio" type="float" default="0.75">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
- </description>
- </method>
- <method name="set_exclusive">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Make the popup hide other popups when shown on the screen.
- </description>
- </method>
- </methods>
- <members>
- <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" brief="">
- </member>
- </members>
- <signals>
- <signal name="about_to_show">
- <description>
- This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
- </description>
- </signal>
- <signal name="popup_hide">
- <description>
- This signal is emitted when a popup is hidden.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_POST_POPUP" value="80" enum="">
- Notification sent right after the popup is shown.
- </constant>
- <constant name="NOTIFICATION_POPUP_HIDE" value="81" enum="">
- Notification sent right after the popup is hidden.
- </constant>
- </constants>
-</class>
-<class name="PopupDialog" inherits="Popup" category="Core">
- <brief_description>
- Base class for Popup Dialogs.
- </brief_description>
- <description>
- PopupDialog is a base class for popup dialogs, along with [WindowDialog].
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PopupMenu" inherits="Popup" category="Core">
- <brief_description>
- PopupMenu displays a list of options.
- </brief_description>
- <description>
- PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
- </description>
- <methods>
- <method name="add_check_item">
- <return type="void">
- </return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="add_check_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="shortcut" type="ShortCut">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="global" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_icon_check_item">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be
- created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="add_icon_check_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="shortcut" type="ShortCut">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="global" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_icon_item">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
- </description>
- </method>
- <method name="add_icon_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <argument index="1" name="shortcut" type="ShortCut">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="global" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_item">
- <return type="void">
- </return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
- </description>
- </method>
- <method name="add_separator">
- <return type="void">
- </return>
- <description>
- Add a separator between items. Separators also occupy an index.
- </description>
- </method>
- <method name="add_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="shortcut" type="ShortCut">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="global" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_submenu_item">
- <return type="void">
- </return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="submenu" type="String">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <description>
- Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the popup menu, in effect removing all items.
- </description>
- </method>
- <method name="get_item_accelerator" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
- </description>
- </method>
- <method name="get_item_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of items.
- </description>
- </method>
- <method name="get_item_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the icon of the item at index "idx".
- </description>
- </method>
- <method name="get_item_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the id of the item at index "idx".
- </description>
- </method>
- <method name="get_item_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Find and return the index of the item containing a given id.
- </description>
- </method>
- <method name="get_item_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
- </description>
- </method>
- <method name="get_item_shortcut" qualifiers="const">
- <return type="ShortCut">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_submenu" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the submenu name of the item at index "idx".
- </description>
- </method>
- <method name="get_item_text" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the text of the item at index "idx".
- </description>
- </method>
- <method name="get_item_tooltip" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_hide_on_checkable_item_selection">
- <return type="bool">
- </return>
- <description>
- Returns a boolean that indicates whether or not the PopupMenu will hide on checkable item selection.
- </description>
- </method>
- <method name="is_hide_on_item_selection">
- <return type="bool">
- </return>
- <description>
- Returns a boolean that indicates whether or not the PopupMenu will hide on item selection.
- </description>
- </method>
- <method name="is_item_checkable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="is_item_checked" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the checkstate status of the item at index "idx".
- </description>
- </method>
- <method name="is_item_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked.
- </description>
- </method>
- <method name="is_item_separator" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return whether the item is a seperator. If it is, it would be displayed as a line.
- </description>
- </method>
- <method name="remove_item">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
- </description>
- </method>
- <method name="set_hide_on_checkable_item_selection">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Sets whether or not the PopupMenu will hide on checkable item selection.
- </description>
- </method>
- <method name="set_hide_on_item_selection">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Sets whether or not the PopupMenu will hide on item selection.
- </description>
- </method>
- <method name="set_item_accelerator">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="accel" type="int">
- </argument>
- <description>
- Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
- </description>
- </method>
- <method name="set_item_as_checkable">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="set_item_as_separator">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line.
- </description>
- </method>
- <method name="set_item_checked">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="checked" type="bool">
- </argument>
- <description>
- Set the checkstate status of the item at index "idx".
- </description>
- </method>
- <method name="set_item_disabled">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
- </description>
- </method>
- <method name="set_item_icon">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_id">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Set the id of the item at index "idx".
- </description>
- </method>
- <method name="set_item_metadata">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="metadata" type="Variant">
- </argument>
- <description>
- Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
- </description>
- </method>
- <method name="set_item_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="shortcut" type="ShortCut">
- </argument>
- <argument index="2" name="global" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_submenu">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="submenu" type="String">
- </argument>
- <description>
- Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked.
- </description>
- </method>
- <method name="set_item_text">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- Set the text of the item at index "idx".
- </description>
- </method>
- <method name="set_item_tooltip">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="tooltip" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="toggle_item_checked">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" brief="">
- </member>
- <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection" brief="">
- </member>
- <member name="items" type="Array" setter="_set_items" getter="_get_items" brief="">
- </member>
- </members>
- <signals>
- <signal name="id_pressed">
- <argument index="0" name="ID" type="int">
- </argument>
- <description>
- This event is emitted when an item of some id is pressed or its accelerator is activated.
- </description>
- </signal>
- <signal name="index_pressed">
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- This event is emitted when an item of some index is pressed or its accelerator is activated.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="checked" type="Texture">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_accel" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="panel_disabled" type="StyleBox">
- </theme_item>
- <theme_item name="separator" type="StyleBox">
- </theme_item>
- <theme_item name="submenu" type="Texture">
- </theme_item>
- <theme_item name="unchecked" type="Texture">
- </theme_item>
- <theme_item name="vseparation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="PopupPanel" inherits="Popup" category="Core">
- <brief_description>
- Class for displaying popups with a panel background.
- </brief_description>
- <description>
- Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="Position2D" inherits="Node2D" category="Core">
- <brief_description>
- Generic 2D Position hint for editing.
- </brief_description>
- <description>
- Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Position3D" inherits="Spatial" category="Core">
- <brief_description>
- Generic 3D Position hint for editing
- </brief_description>
- <description>
- Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PrimitiveMesh" inherits="Mesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_material" qualifiers="const">
- <return type="Material">
- </return>
- <description>
- </description>
- </method>
- <method name="set_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="material" type="Material" setter="set_material" getter="get_material" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="PrismMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_left_to_right" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_depth" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subdivide_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_left_to_right">
- <return type="void">
- </return>
- <argument index="0" name="left_to_right" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_depth">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_height">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subdivide_width">
- <return type="void">
- </return>
- <argument index="0" name="segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" brief="">
- </member>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
- </member>
- <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief="">
- </member>
- <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ProceduralSky" inherits="Sky" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_ground_bottom_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ground_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ground_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ground_horizon_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky_horizon_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sky_top_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_angle_max" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_angle_min" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_curve" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_latitude" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sun_longitude" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture_size" qualifiers="const">
- <return type="int" enum="ProceduralSky.TextureSize">
- </return>
- <description>
- </description>
- </method>
- <method name="set_ground_bottom_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ground_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ground_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ground_horizon_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky_horizon_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sky_top_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_angle_max">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_angle_min">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_curve">
- <return type="void">
- </return>
- <argument index="0" name="curve" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_energy">
- <return type="void">
- </return>
- <argument index="0" name="energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_latitude">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sun_longitude">
- <return type="void">
- </return>
- <argument index="0" name="degrees" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int" enum="ProceduralSky.TextureSize">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" brief="">
- </member>
- <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" brief="">
- </member>
- <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" brief="">
- </member>
- <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" brief="">
- </member>
- <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" brief="">
- </member>
- <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" brief="">
- </member>
- <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" brief="">
- </member>
- <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" brief="">
- </member>
- <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" brief="">
- </member>
- <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min" brief="">
- </member>
- <member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color" brief="">
- </member>
- <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" brief="">
- </member>
- <member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy" brief="">
- </member>
- <member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude" brief="">
- </member>
- <member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude" brief="">
- </member>
- <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" brief="" enum="ProceduralSky.TextureSize">
- </member>
- </members>
- <constants>
- <constant name="TEXTURE_SIZE_256" value="0">
- </constant>
- <constant name="TEXTURE_SIZE_512" value="1">
- </constant>
- <constant name="TEXTURE_SIZE_1024" value="2">
- </constant>
- <constant name="TEXTURE_SIZE_2048" value="3">
- </constant>
- <constant name="TEXTURE_SIZE_4096" value="4">
- </constant>
- <constant name="TEXTURE_SIZE_MAX" value="5">
- </constant>
- </constants>
-</class>
-<class name="ProgressBar" inherits="Range" category="Core">
- <brief_description>
- General purpose progress bar.
- </brief_description>
- <description>
- General purpose progress bar. Shows fill percentage from right to left.
- </description>
- <methods>
- <method name="is_percent_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_percent_visible">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" brief="">
- </member>
- </members>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="fg" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_shadow" type="Color">
- </theme_item>
- </theme_items>
-</class>
-<class name="ProjectSettings" inherits="Object" category="Core">
- <brief_description>
- Contains global variables accessible from everywhere.
- </brief_description>
- <description>
- Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
- </description>
- <methods>
- <method name="add_property_info">
- <return type="void">
- </return>
- <argument index="0" name="hint" type="Dictionary">
- </argument>
- <description>
- Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
- Example:
- [codeblock]
- ProjectSettings.set("category/property_name", 0)
-
- var property_info = {
- "name": "category/property_name",
- "type": TYPE_INT,
- "hint": PROPERTY_HINT_ENUM,
- "hint_string": "one,two,three"
- }
-
- ProjectSettings.add_property_info(property_info)
- [/codeblock]
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Clear the whole configuration (not recommended, may break things).
- </description>
- </method>
- <method name="get_order" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return the order of a configuration value (influences when saved to the config file).
- </description>
- </method>
- <method name="get_singleton" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="globalize_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Convert a localized path (res://) to a full native OS path.
- </description>
- </method>
- <method name="has" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return true if a configuration value is present.
- </description>
- </method>
- <method name="has_singleton" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="load_resource_pack">
- <return type="bool">
- </return>
- <argument index="0" name="pack" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="localize_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Convert a path to a localized path (res:// path).
- </description>
- </method>
- <method name="property_can_revert">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="save">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- <method name="save_custom">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_initial_value">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_order">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="pos" type="int">
- </argument>
- <description>
- Set the order of a configuration value (influences when saved to the config file).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ProximityGroup" inherits="Spatial" category="Core">
- <brief_description>
- General purpose proximity-detection node.
- </brief_description>
- <description>
- General purpose proximity-detection node.
- </description>
- <methods>
- <method name="broadcast">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="parameters" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_grid_radius" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_dispatch_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_grid_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_group_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" brief="">
- </member>
- </members>
- <signals>
- <signal name="broadcast">
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="parameters" type="Array">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="QuadMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Quat" category="Built-In Types">
- <brief_description>
- 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.
- </description>
- <methods>
- <method name="Quat">
- <return type="Quat">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <argument index="2" name="z" type="float">
- </argument>
- <argument index="3" name="w" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="Quat">
- <return type="Quat">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="angle" type="float">
- </argument>
- <description>
- Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
- </description>
- </method>
- <method name="Quat">
- <return type="Quat">
- </return>
- <argument index="0" name="from" type="Basis">
- </argument>
- <description>
- Returns the rotation matrix corresponding to the given quaternion.
- </description>
- </method>
- <method name="cubic_slerp">
- <return type="Quat">
- </return>
- <argument index="0" name="b" type="Quat">
- </argument>
- <argument index="1" name="pre_a" type="Quat">
- </argument>
- <argument index="2" name="post_b" type="Quat">
- </argument>
- <argument index="3" name="t" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="dot">
- <return type="float">
- </return>
- <argument index="0" name="b" type="Quat">
- </argument>
- <description>
- Returns the dot product of two quaternions.
- </description>
- </method>
- <method name="inverse">
- <return type="Quat">
- </return>
- <description>
- Returns the inverse of the quaternion.
- </description>
- </method>
- <method name="is_normalized">
- <return type="bool">
- </return>
- <description>
- Returns whether the quaternion is normalized or not.
- </description>
- </method>
- <method name="length">
- <return type="float">
- </return>
- <description>
- Returns the length of the quaternion.
- </description>
- </method>
- <method name="length_squared">
- <return type="float">
- </return>
- <description>
- Returns the length of the quaternion, squared.
- </description>
- </method>
- <method name="normalized">
- <return type="Quat">
- </return>
- <description>
- Returns a copy of the quaternion, normalized to unit length.
- </description>
- </method>
- <method name="slerp">
- <return type="Quat">
- </return>
- <argument index="0" name="b" type="Quat">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Perform a spherical-linear interpolation with another quaternion.
- </description>
- </method>
- <method name="slerpni">
- <return type="Quat">
- </return>
- <argument index="0" name="b" type="Quat">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="xform">
- <return type="Vector3">
- </return>
- <argument index="0" name="v" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="w" type="float" setter="" getter="" brief="">
- </member>
- <member name="x" type="float" setter="" getter="" brief="">
- </member>
- <member name="y" type="float" setter="" getter="" brief="">
- </member>
- <member name="z" type="float" setter="" getter="" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RID" category="Built-In Types">
- <brief_description>
- Handle for a [Resource]'s unique ID.
- </brief_description>
- <description>
- The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer].
- </description>
- <methods>
- <method name="RID">
- <return type="RID">
- </return>
- <argument index="0" name="from" type="Object">
- </argument>
- <description>
- Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
- </description>
- </method>
- <method name="get_id">
- <return type="int">
- </return>
- <description>
- Retrieve the ID of the referenced resource.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Range" inherits="Control" category="Core">
- <brief_description>
- Abstract base class for range-based controls.
- </brief_description>
- <description>
- Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
- </description>
- <methods>
- <method name="get_as_ratio" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return value mapped to 0 to 1 range.
- </description>
- </method>
- <method name="get_max" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the maximum value.
- </description>
- </method>
- <method name="get_min" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the minimum value.
- </description>
- </method>
- <method name="get_page" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the page size, if page is 0, paging is disabled.
- </description>
- </method>
- <method name="get_step" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the stepping, if step is 0, stepping is disabled.
- </description>
- </method>
- <method name="get_value" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_ratio_exp" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_using_rounded_values" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_as_ratio">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
- </description>
- </method>
- <method name="set_exp_ratio">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max">
- <return type="void">
- </return>
- <argument index="0" name="maximum" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_min">
- <return type="void">
- </return>
- <argument index="0" name="minimum" type="float">
- </argument>
- <description>
- Set minimum value, clamped range value to it if it's less.
- </description>
- </method>
- <method name="set_page">
- <return type="void">
- </return>
- <argument index="0" name="pagesize" type="float">
- </argument>
- <description>
- Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
- </description>
- </method>
- <method name="set_step">
- <return type="void">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Set step value. If step is 0, stepping will be disabled.
- </description>
- </method>
- <method name="set_use_rounded_values">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_value">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="share">
- <return type="void">
- </return>
- <argument index="0" name="with" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="unshare">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp" brief="">
- </member>
- <member name="max_value" type="float" setter="set_max" getter="get_max" brief="">
- </member>
- <member name="min_value" type="float" setter="set_min" getter="get_min" brief="">
- </member>
- <member name="page" type="float" setter="set_page" getter="get_page" brief="">
- </member>
- <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" brief="">
- </member>
- <member name="step" type="float" setter="set_step" getter="get_step" brief="">
- </member>
- <member name="value" type="float" setter="set_value" getter="get_value" brief="">
- </member>
- </members>
- <signals>
- <signal name="changed">
- <description>
- This signal is emitted when min, max, range or step change.
- </description>
- </signal>
- <signal name="value_changed">
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- This signal is emitted when value changes.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="RayCast" inherits="Spatial" category="Core">
- <brief_description>
- Query the closest object intersecting a ray.
- </brief_description>
- <description>
- A RayCast represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 3D space in order to find the closest object intersecting with the ray.
-
- RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks.
-
- Only enabled raycasts will be able to query the space and report collisions!
-
- RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
- </description>
- <methods>
- <method name="add_exception">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- Adds a collision exception so the ray does not report collisions with the specified [code]node[/code].
- </description>
- </method>
- <method name="add_exception_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_exceptions">
- <return type="void">
- </return>
- <description>
- Removes all collision exception for this ray.
- </description>
- </method>
- <method name="force_raycast_update">
- <return type="void">
- </return>
- <description>
- Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
- </description>
- </method>
- <method name="get_cast_to" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the destination point of this ray object.
- </description>
- </method>
- <method name="get_collider" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
- </description>
- </method>
- <method name="get_collider_shape" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the collision shape of the closest object the ray is pointing to.
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the collision layer for this ray.
- </description>
- </method>
- <method name="get_collision_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the normal of the intersecting object shape face containing the collision point.
- </description>
- </method>
- <method name="get_collision_point" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns collision point. This point is in [b]global[/b] coordinate system.
- </description>
- </method>
- <method name="get_type_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [PhysicsDirectSpaceState].
- </description>
- </method>
- <method name="is_colliding" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this raycast is enabled or not.
- </description>
- </method>
- <method name="remove_exception">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- Removes a collision exception so the ray does report collisions with the specified [code]node[/code].
- </description>
- </method>
- <method name="remove_exception_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cast_to">
- <return type="void">
- </return>
- <argument index="0" name="local_point" type="Vector3">
- </argument>
- <description>
- Sets to which point ray should be casted. This point is in [b]local[/b] coordinate system.
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the mask to filter objects. Only objects with at least the same mask element set will be detected.
- </description>
- </method>
- <method name="set_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
- </description>
- </method>
- <method name="set_type_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [PhysicsDirectSpaceState], eg. [code]PhysicsDirectSpaceState.TYPE_MASK_STATIC_BODY | PhysicsDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types.
- </description>
- </method>
- </methods>
- <members>
- <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to" brief="">
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
- </member>
- <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RayCast2D" inherits="Node2D" category="Core">
- <brief_description>
- Query the closest object intersecting a ray.
- </brief_description>
- <description>
- A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray.
-
- RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks.
-
- Only enabled raycasts will be able to query the space and report collisions!
-
- RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
- </description>
- <methods>
- <method name="add_exception">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- Adds a collision exception so the ray does not report collisions with the specified [code]node[/code].
- </description>
- </method>
- <method name="add_exception_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_exceptions">
- <return type="void">
- </return>
- <description>
- Removes all collision exception for this ray.
- </description>
- </method>
- <method name="force_raycast_update">
- <return type="void">
- </return>
- <description>
- Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
- </description>
- </method>
- <method name="get_cast_to" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the destination point of this ray object.
- </description>
- </method>
- <method name="get_collider" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
- </description>
- </method>
- <method name="get_collider_shape" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the collision shape of the closest object the ray is pointing to.
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the collision layer for this ray.
- </description>
- </method>
- <method name="get_collision_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the normal of the intersecting object shape face containing the collision point.
- </description>
- </method>
- <method name="get_collision_point" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the collision point in which the ray intersects the closest object. This point is in [b]global[/b] coordinate system.
- </description>
- </method>
- <method name="get_exclude_parent_body" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this ray should hit your parent node, if it's a body.
- </description>
- </method>
- <method name="get_type_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [Physics2DDirectSpaceState].
- </description>
- </method>
- <method name="is_colliding" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this raycast is enabled or not.
- </description>
- </method>
- <method name="remove_exception">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- Removes a collision exception so the ray does report collisions with the specified [code]node[/code].
- </description>
- </method>
- <method name="remove_exception_rid">
- <return type="void">
- </return>
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cast_to">
- <return type="void">
- </return>
- <argument index="0" name="local_point" type="Vector2">
- </argument>
- <description>
- Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the mask to filter objects. Only objects with at least the same mask element set will be detected.
- </description>
- </method>
- <method name="set_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
- </description>
- </method>
- <method name="set_exclude_parent_body">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="bool">
- </argument>
- <description>
- Toggle whether this ray should hit your parent node, if it's a body.
- </description>
- </method>
- <method name="set_type_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [Physics2DDirectSpaceState], eg. [code]Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types.
- </description>
- </method>
- </methods>
- <members>
- <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to" brief="">
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
- </member>
- <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" brief="">
- </member>
- <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RayShape" inherits="Shape" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_length">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="length" type="float" setter="set_length" getter="get_length" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RayShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Ray 2D shape resource for physics.
- </brief_description>
- <description>
- Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
- </description>
- <methods>
- <method name="get_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the length of the ray.
- </description>
- </method>
- <method name="set_length">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- Set the length of the ray.
- </description>
- </method>
- </methods>
- <members>
- <member name="length" type="float" setter="set_length" getter="get_length" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Rect2" category="Built-In Types">
- <brief_description>
- 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.
- </description>
- <methods>
- <method name="Rect2">
- <return type="Rect2">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="size" type="Vector2">
- </argument>
- <description>
- Construct a [Rect2] by position and size.
- </description>
- </method>
- <method name="Rect2">
- <return type="Rect2">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <argument index="2" name="width" type="float">
- </argument>
- <argument index="3" name="height" type="float">
- </argument>
- <description>
- Construct a [Rect2] by x, y, width and height.
- </description>
- </method>
- <method name="clip">
- <return type="Rect2">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Returns the intersection of this [Rect2] and b.
- </description>
- </method>
- <method name="encloses">
- <return type="bool">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Returns true if this [Rect2] completely encloses another one.
- </description>
- </method>
- <method name="expand">
- <return type="Rect2">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Return this [Rect2] expanded to include a given point.
- </description>
- </method>
- <method name="get_area">
- <return type="float">
- </return>
- <description>
- Get the area of the [Rect2].
- </description>
- </method>
- <method name="grow">
- <return type="Rect2">
- </return>
- <argument index="0" name="by" type="float">
- </argument>
- <description>
- Return a copy of the [Rect2] grown a given amount of units towards all the sides.
- </description>
- </method>
- <method name="grow_individual">
- <return type="Rect2">
- </return>
- <argument index="0" name="left" type="float">
- </argument>
- <argument index="1" name="top" type="float">
- </argument>
- <argument index="2" name="right" type="float">
- </argument>
- <argument index="3" name=" bottom" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="grow_margin">
- <return type="Rect2">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="by" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_no_area">
- <return type="bool">
- </return>
- <description>
- Return true if the [Rect2] is flat or empty.
- </description>
- </method>
- <method name="has_point">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Return true if the [Rect2] contains a point.
- </description>
- </method>
- <method name="intersects">
- <return type="bool">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Return true if the [Rect2] overlaps with another.
- </description>
- </method>
- <method name="merge">
- <return type="Rect2">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Combine this [Rect2] with another, a larger one is returned that contains both.
- </description>
- </method>
- </methods>
- <members>
- <member name="end" type="Vector2" setter="" getter="" brief="">
- Ending corner.
- </member>
- <member name="position" type="Vector2" setter="" getter="" brief="">
- Position (starting corner).
- </member>
- <member name="size" type="Vector2" setter="" getter="" brief="">
- Size from position to end.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Rect3" category="Built-In Types">
- <brief_description>
- 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.
- </description>
- <methods>
- <method name="Rect3">
- <return type="Rect3">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="size" type="Vector3">
- </argument>
- <description>
- Optional constructor, accepts position and size.
- </description>
- </method>
- <method name="encloses">
- <return type="bool">
- </return>
- <argument index="0" name="with" type="Rect3">
- </argument>
- <description>
- Return true if this [Rect3] completely encloses another one.
- </description>
- </method>
- <method name="expand">
- <return type="Rect3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Return this [Rect3] expanded to include a given point.
- </description>
- </method>
- <method name="get_area">
- <return type="float">
- </return>
- <description>
- Get the area of the [Rect3].
- </description>
- </method>
- <method name="get_endpoint">
- <return type="Vector3">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the position of the 8 endpoints of the [Rect3] in space.
- </description>
- </method>
- <method name="get_longest_axis">
- <return type="Vector3">
- </return>
- <description>
- Return the normalized longest axis of the [Rect3].
- </description>
- </method>
- <method name="get_longest_axis_index">
- <return type="int">
- </return>
- <description>
- Return the index of the longest axis of the [Rect3] (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 [Rect3].
- </description>
- </method>
- <method name="get_shortest_axis">
- <return type="Vector3">
- </return>
- <description>
- Return the normalized shortest axis of the [Rect3].
- </description>
- </method>
- <method name="get_shortest_axis_index">
- <return type="int">
- </return>
- <description>
- Return the index of the shortest axis of the [Rect3] (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 [Rect3].
- </description>
- </method>
- <method name="get_support">
- <return type="Vector3">
- </return>
- <argument index="0" name="dir" type="Vector3">
- </argument>
- <description>
- Return the support point in a given direction. This is useful for collision detection algorithms.
- </description>
- </method>
- <method name="grow">
- <return type="Rect3">
- </return>
- <argument index="0" name="by" type="float">
- </argument>
- <description>
- Return a copy of the [Rect3] 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 [Rect3] is flat or empty.
- </description>
- </method>
- <method name="has_no_surface">
- <return type="bool">
- </return>
- <description>
- Return true if the [Rect3] is empty.
- </description>
- </method>
- <method name="has_point">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector3">
- </argument>
- <description>
- Return true if the [Rect3] contains a point.
- </description>
- </method>
- <method name="intersection">
- <return type="Rect3">
- </return>
- <argument index="0" name="with" type="Rect3">
- </argument>
- <description>
- Return the intersection between two [Rect3]. An empty Rect3 (size 0,0,0) is returned on failure.
- </description>
- </method>
- <method name="intersects">
- <return type="bool">
- </return>
- <argument index="0" name="with" type="Rect3">
- </argument>
- <description>
- Return true if the [Rect3] overlaps with another.
- </description>
- </method>
- <method name="intersects_plane">
- <return type="bool">
- </return>
- <argument index="0" name="plane" type="Plane">
- </argument>
- <description>
- Return true if the [Rect3] is at both sides of a plane.
- </description>
- </method>
- <method name="intersects_segment">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <argument index="1" name="to" type="Vector3">
- </argument>
- <description>
- Return true if the [Rect3] intersects the line segment between from and to
- </description>
- </method>
- <method name="merge">
- <return type="Rect3">
- </return>
- <argument index="0" name="with" type="Rect3">
- </argument>
- <description>
- Combine this [Rect3] with another, a larger one is returned that contains both.
- </description>
- </method>
- </methods>
- <members>
- <member name="end" type="Vector3" setter="" getter="" brief="">
- Ending corner.
- </member>
- <member name="position" type="Vector3" setter="" getter="" brief="">
- </member>
- <member name="size" type="Vector3" setter="" getter="" brief="">
- Size from position to end.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RectangleShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Rectangle Shape for 2D Physics.
- </brief_description>
- <description>
- Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects.
- </description>
- <methods>
- <method name="get_extents" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the half extents, the actual width and height of this shape is twice the half extents.
- </description>
- </method>
- <method name="set_extents">
- <return type="void">
- </return>
- <argument index="0" name="extents" type="Vector2">
- </argument>
- <description>
- Set the half extents, the actual width and height of this shape is twice the half extents.
- </description>
- </method>
- </methods>
- <members>
- <member name="extents" type="Vector2" setter="set_extents" getter="get_extents" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Reference" inherits="Object" category="Core">
- <brief_description>
- Base class for anything that keeps a reference count.
- </brief_description>
- <description>
- Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use.
- </description>
- <methods>
- <method name="init_ref">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="reference">
- <return type="void">
- </return>
- <description>
- Increase the internal reference counter. Use this only if you really know what you are doing.
- </description>
- </method>
- <method name="unreference">
- <return type="bool">
- </return>
- <description>
- Decrease the internal reference counter. Use this only if you really know what you are doing.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ReferenceRect" inherits="Control" category="Core">
- <brief_description>
- Reference frame for GUI.
- </brief_description>
- <description>
- Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="border" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="ReflectionProbe" inherits="VisualInstance" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="are_shadows_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cull_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_extents" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_intensity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_interior_ambient" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_interior_ambient_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_interior_ambient_probe_contribution" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_max_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_origin_offset" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_mode" qualifiers="const">
- <return type="int" enum="ReflectionProbe.UpdateMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_box_projection_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_set_as_interior" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_as_interior">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cull_mask">
- <return type="void">
- </return>
- <argument index="0" name="layers" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_enable_box_projection">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_enable_shadows">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_extents">
- <return type="void">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_intensity">
- <return type="void">
- </return>
- <argument index="0" name="intensity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_interior_ambient">
- <return type="void">
- </return>
- <argument index="0" name="ambient" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_interior_ambient_energy">
- <return type="void">
- </return>
- <argument index="0" name="ambient_energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_interior_ambient_probe_contribution">
- <return type="void">
- </return>
- <argument index="0" name="ambient_probe_contribution" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_distance">
- <return type="void">
- </return>
- <argument index="0" name="max_distance" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_origin_offset">
- <return type="void">
- </return>
- <argument index="0" name="origin_offset" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="ReflectionProbe.UpdateMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled" brief="">
- </member>
- <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" brief="">
- </member>
- <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" brief="">
- </member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" brief="">
- </member>
- <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" brief="">
- </member>
- <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient" brief="">
- </member>
- <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution" brief="">
- </member>
- <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy" brief="">
- </member>
- <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior" brief="">
- </member>
- <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" brief="">
- </member>
- <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" brief="">
- </member>
- <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="" enum="ReflectionProbe.UpdateMode">
- </member>
- </members>
- <constants>
- <constant name="UPDATE_ONCE" value="0">
- </constant>
- <constant name="UPDATE_ALWAYS" value="1">
- </constant>
- </constants>
-</class>
-<class name="RegEx" inherits="Reference" category="Core">
- <brief_description>
- Simple regular expression matcher.
- </brief_description>
- <description>
- Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations.
- Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example:
- [code]var exp = RegEx.new()[/code]
- [code]exp.compile("\\d+")[/code]
- would be read by RegEx as [code]\d+[/code]
- Similarly:
- [code]exp.compile("\"(?:\\\\.|[^\"])*\"")[/code]
- would be read as [code]"(?:\\.|[^"])*"[/code]
- Currently supported features:
- * Capturing [code]()[/code] and non-capturing [code](?:)[/code] groups
- * Named capturing groups [code](?P&lt;name&gt;)[/code]
- * Any character [code].[/code]
- * Shorthand character classes [code]\w \W \s \S \d \D[/code]
- * User-defined character classes such as [code][A-Za-z][/code]
- * Simple quantifiers [code]?[/code], [code]*[/code] and [code]+[/code]
- * Range quantifiers [code]{x,y}[/code]
- * Lazy (non-greedy) quantifiers [code]*?[/code]
- * Beginning [code]^[/code] and end [code]$[/code] anchors
- * Alternation [code]|[/code]
- * Backreferences [code]\1[/code], [code]\g{1}[/code], and [code]\g&lt;name&gt;[/code]
- * POSIX character classes [code][[:alnum:]][/code]
- * Lookahead [code](?=)[/code], [code](?!)[/code] and lookbehind [code](?&lt;=)[/code], [code](?&lt;!)[/code]
- * ASCII [code]\xFF[/code] and Unicode [code]\uFFFF[/code] code points (in a style similar to Python)
- * Word boundaries [code]\b[/code], [code]\B[/code]
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object.
- </description>
- </method>
- <method name="compile">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="pattern" type="String">
- </argument>
- <description>
- Compiles and assign the regular expression pattern to use.
- </description>
- </method>
- <method name="get_group_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of numeric capturing groups.
- </description>
- </method>
- <method name="get_names" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an array of names of named capturing groups.
- </description>
- </method>
- <method name="get_pattern" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the expression used to compile the code.
- </description>
- </method>
- <method name="is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this object has a valid regular expression assigned.
- </description>
- </method>
- <method name="search" qualifiers="const">
- <return type="RegExMatch">
- </return>
- <argument index="0" name="subject" type="String">
- </argument>
- <argument index="1" name="offset" type="int" default="0">
- </argument>
- <argument index="2" name="end" type="int" default="-1">
- </argument>
- <description>
- Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be.
- </description>
- </method>
- <method name="sub" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="subject" type="String">
- </argument>
- <argument index="1" name="replacement" type="String">
- </argument>
- <argument index="2" name="all" type="bool" default="false">
- </argument>
- <argument index="3" name="offset" type="int" default="0">
- </argument>
- <argument index="4" name="end" type="int" default="-1">
- </argument>
- <description>
- Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]\1[/code] and [code]\g&lt;name&gt;[/code] expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="RegExMatch" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_end" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="Variant" default="0">
- </argument>
- <description>
- Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
- </description>
- </method>
- <method name="get_group_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of numeric capturing groups.
- </description>
- </method>
- <method name="get_names" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- Returns an array of names of named capturing groups.
- </description>
- </method>
- <method name="get_start" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="Variant" default="0">
- </argument>
- <description>
- Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
- </description>
- </method>
- <method name="get_string" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="name" type="Variant" default="0">
- </argument>
- <description>
- Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
- </description>
- </method>
- <method name="get_strings" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subject" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="RemoteTransform" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_remote_node" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_position" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_rotation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_scale" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_global_coordinates" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_remote_node">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_position">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_position" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_rotation">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_rotation" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_scale">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_scale" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_global_coordinates">
- <return type="void">
- </return>
- <argument index="0" name="use_global_coordinates" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node" brief="">
- </member>
- <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position" brief="">
- </member>
- <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation" brief="">
- </member>
- <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale" brief="">
- </member>
- <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RemoteTransform2D" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_remote_node" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_position" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_rotation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_scale" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_global_coordinates" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_remote_node">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_position">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_position" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_rotation">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_rotation" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_update_scale">
- <return type="void">
- </return>
- <argument index="0" name="update_remote_scale" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_global_coordinates">
- <return type="void">
- </return>
- <argument index="0" name="use_global_coordinates" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node" brief="">
- </member>
- <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position" brief="">
- </member>
- <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation" brief="">
- </member>
- <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale" brief="">
- </member>
- <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Resource" inherits="Reference" category="Core">
- <brief_description>
- Base class for all resources.
- </brief_description>
- <description>
- Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
- </description>
- <methods>
- <method name="_setup_local_to_scene" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="duplicate" qualifiers="const">
- <return type="Resource">
- </return>
- <argument index="0" name="subresources" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_local_scene" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
- </description>
- </method>
- <method name="get_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else.
- </description>
- </method>
- <method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
- </description>
- </method>
- <method name="is_local_to_scene" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_local_to_scene">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
- </description>
- </method>
- <method name="set_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path".
- </description>
- </method>
- <method name="setup_local_to_scene">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="take_over_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing.
- </description>
- </method>
- </methods>
- <members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" brief="">
- </member>
- <member name="resource_name" type="String" setter="set_name" getter="get_name" brief="">
- </member>
- <member name="resource_path" type="String" setter="set_path" getter="get_path" brief="">
- </member>
- </members>
- <signals>
- <signal name="changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="ResourceImporter" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ResourceInteractiveLoader" inherits="Reference" category="Core">
- <brief_description>
- Interactive Resource Loader.
- </brief_description>
- <description>
- Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
- </description>
- <methods>
- <method name="get_resource">
- <return type="Resource">
- </return>
- <description>
- Return the loaded resource (only if loaded). Otherwise, returns null.
- </description>
- </method>
- <method name="get_stage" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the load stage. The total amount of stages can be queried with [method get_stage_count]
- </description>
- </method>
- <method name="get_stage_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the total amount of stages (calls to [method poll]) needed to completely load this resource.
- </description>
- </method>
- <method name="poll">
- <return type="int" enum="Error">
- </return>
- <description>
- Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource].
- </description>
- </method>
- <method name="wait">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ResourceLoader" inherits="Object" category="Core">
- <brief_description>
- Resource Loader.
- </brief_description>
- <description>
- Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
- </description>
- <methods>
- <method name="get_dependencies">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_recognized_extensions_for_type">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- Return the list of recognized extensions for a resource type.
- </description>
- </method>
- <method name="has">
- <return type="bool">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="load">
- <return type="Resource">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
- </argument>
- <argument index="2" name="p_no_cache" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="load_interactive">
- <return type="ResourceInteractiveLoader">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Load a resource interactively, the returned object allows to load with high granularity.
- </description>
- </method>
- <method name="set_abort_on_missing_resources">
- <return type="void">
- </return>
- <argument index="0" name="abort" type="bool">
- </argument>
- <description>
- Change the behavior on missing sub-resources. Default is to abort load.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ResourcePreloader" inherits="Node" category="Core">
- <brief_description>
- Resource Preloader Node.
- </brief_description>
- <description>
- Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
- </description>
- <methods>
- <method name="add_resource">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_resource" qualifiers="const">
- <return type="Resource">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return the resource given a text-id.
- </description>
- </method>
- <method name="get_resource_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Return the list of resources inside the preloader.
- </description>
- </method>
- <method name="has_resource" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return true if the preloader has a given resource.
- </description>
- </method>
- <method name="remove_resource">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Remove a resource from the preloader by text id.
- </description>
- </method>
- <method name="rename_resource">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="newname" type="String">
- </argument>
- <description>
- Rename a resource inside the preloader, from a text-id to a new text-id.
- </description>
- </method>
- </methods>
- <members>
- <member name="resources" type="Array" setter="_set_resources" getter="_get_resources" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ResourceSaver" inherits="Object" category="Core">
- <brief_description>
- Resource Saving Interface.
- </brief_description>
- <description>
- Resource Saving Interface. This interface is used for saving resources to disk.
- </description>
- <methods>
- <method name="get_recognized_extensions">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="Resource">
- </argument>
- <description>
- Return the list of extensions available for saving a resource of a given type.
- </description>
- </method>
- <method name="save">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="resource" type="Resource">
- </argument>
- <argument index="2" name="flags" type="int" default="0">
- </argument>
- <description>
- Save a resource to disk, to a given path.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="FLAG_RELATIVE_PATHS" value="1">
- </constant>
- <constant name="FLAG_BUNDLE_RESOURCES" value="2">
- </constant>
- <constant name="FLAG_CHANGE_PATH" value="4">
- </constant>
- <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8">
- </constant>
- <constant name="FLAG_SAVE_BIG_ENDIAN" value="16">
- </constant>
- <constant name="FLAG_COMPRESS" value="32">
- </constant>
- </constants>
-</class>
-<class name="RichTextLabel" inherits="Control" category="Core">
- <brief_description>
- Label that displays rich text.
- </brief_description>
- <description>
- Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
- </description>
- <methods>
- <method name="add_image">
- <return type="void">
- </return>
- <argument index="0" name="image" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="append_bbcode">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="bbcode" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bbcode" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_percent_visible" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tab_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_text">
- <return type="String">
- </return>
- <description>
- Returns the raw text, stripping out the formatting information.
- </description>
- </method>
- <method name="get_total_character_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_scroll">
- <return type="VScrollBar">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visible_characters" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_meta_underlined" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_scroll_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_scroll_following" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_selection_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if selecting the text inside this richtext is allowed.
- </description>
- </method>
- <method name="is_using_bbcode" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="newline">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="parse_bbcode">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="bbcode" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="pop">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="push_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_cell">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="push_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_font">
- <return type="void">
- </return>
- <argument index="0" name="font" type="Font">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_indent">
- <return type="void">
- </return>
- <argument index="0" name="level" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_list">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="RichTextLabel.ListType">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_meta">
- <return type="void">
- </return>
- <argument index="0" name="data" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_table">
- <return type="void">
- </return>
- <argument index="0" name="columns" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_underline">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_line">
- <return type="bool">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="scroll_to_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bbcode">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_meta_underline">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_percent_visible">
- <return type="void">
- </return>
- <argument index="0" name="percent_visible" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_scroll_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_scroll_follow">
- <return type="void">
- </return>
- <argument index="0" name="follow" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_selection_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set to true if selecting the text inside this richtext is allowed.
- </description>
- </method>
- <method name="set_tab_size">
- <return type="void">
- </return>
- <argument index="0" name="spaces" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_table_column_expand">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="expand" type="bool">
- </argument>
- <argument index="2" name="ratio" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_bbcode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visible_characters">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" brief="">
- </member>
- <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" brief="">
- </member>
- <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" brief="">
- </member>
- <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" brief="">
- </member>
- </members>
- <signals>
- <signal name="meta_clicked">
- <argument index="0" name="meta" type="Nil">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ALIGN_LEFT" value="0">
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- </constant>
- <constant name="ALIGN_FILL" value="3">
- </constant>
- <constant name="LIST_NUMBERS" value="0">
- </constant>
- <constant name="LIST_LETTERS" value="1">
- </constant>
- <constant name="LIST_DOTS" value="2">
- </constant>
- <constant name="ITEM_FRAME" value="0">
- </constant>
- <constant name="ITEM_TEXT" value="1">
- </constant>
- <constant name="ITEM_IMAGE" value="2">
- </constant>
- <constant name="ITEM_NEWLINE" value="3">
- </constant>
- <constant name="ITEM_FONT" value="4">
- </constant>
- <constant name="ITEM_COLOR" value="5">
- </constant>
- <constant name="ITEM_UNDERLINE" value="6">
- </constant>
- <constant name="ITEM_ALIGN" value="7">
- </constant>
- <constant name="ITEM_INDENT" value="8">
- </constant>
- <constant name="ITEM_LIST" value="9">
- </constant>
- <constant name="ITEM_META" value="11">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="bold_font" type="Font">
- </theme_item>
- <theme_item name="bold_italics_font" type="Font">
- </theme_item>
- <theme_item name="default_color" type="Color">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font_color_selected" type="Color">
- </theme_item>
- <theme_item name="italics_font" type="Font">
- </theme_item>
- <theme_item name="line_separation" type="int">
- </theme_item>
- <theme_item name="mono_font" type="Font">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="normal_font" type="Font">
- </theme_item>
- <theme_item name="selection_color" type="Color">
- </theme_item>
- <theme_item name="table_hseparation" type="int">
- </theme_item>
- <theme_item name="table_vseparation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="RigidBody" inherits="PhysicsBody" category="Core">
- <brief_description>
- Rigid body node.
- </brief_description>
- <description>
- Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static.
- </description>
- <methods>
- <method name="_integrate_forces" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="state" type="PhysicsDirectBodyState">
- </argument>
- <description>
- Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
- </description>
- </method>
- <method name="apply_impulse">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="impulse" type="Vector3">
- </argument>
- <description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
- </description>
- </method>
- <method name="get_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body angular damp. Default is -1.
- </description>
- </method>
- <method name="get_angular_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the current body angular velocity.
- </description>
- </method>
- <method name="get_axis_lock" qualifiers="const">
- <return type="int" enum="RigidBody.AxisLock">
- </return>
- <description>
- Return the current axis lock of the body. One of AXIS_LOCK_* enum.
- </description>
- </method>
- <method name="get_bounce" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body bounciness.
- </description>
- </method>
- <method name="get_colliding_bodies" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it.
- </description>
- </method>
- <method name="get_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body friction, from 0 (frictionless) to 1 (max friction).
- </description>
- </method>
- <method name="get_gravity_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body gravity scale.
- </description>
- </method>
- <method name="get_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body linear damp. Default is -1.
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the current body linear velocity.
- </description>
- </method>
- <method name="get_mass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body mass.
- </description>
- </method>
- <method name="get_max_contacts_reported" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="RigidBody.Mode">
- </return>
- <description>
- Return the current body mode, see [method set_mode].
- </description>
- </method>
- <method name="get_weight" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current body weight, given standard earth-weight (gravity 9.8).
- </description>
- </method>
- <method name="is_able_to_sleep" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep].
- </description>
- </method>
- <method name="is_contact_monitor_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether contact monitoring is enabled.
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the body is sleeping.
- </description>
- </method>
- <method name="is_using_continuous_collision_detection" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this body is using continuous collision detection.
- </description>
- </method>
- <method name="is_using_custom_integrator">
- <return type="bool">
- </return>
- <description>
- Return whether the body is using a custom integrator.
- </description>
- </method>
- <method name="set_angular_damp">
- <return type="void">
- </return>
- <argument index="0" name="angular_damp" type="float">
- </argument>
- <description>
- Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
- </description>
- </method>
- <method name="set_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="angular_velocity" type="Vector3">
- </argument>
- <description>
- Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
- </description>
- </method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis_lock" type="int" enum="RigidBody.AxisLock">
- </argument>
- <description>
- Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes.
- </description>
- </method>
- <method name="set_axis_velocity">
- <return type="void">
- </return>
- <argument index="0" name="axis_velocity" type="Vector3">
- </argument>
- <description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
- </description>
- </method>
- <method name="set_bounce">
- <return type="void">
- </return>
- <argument index="0" name="bounce" type="float">
- </argument>
- <description>
- Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness).
- </description>
- </method>
- <method name="set_can_sleep">
- <return type="void">
- </return>
- <argument index="0" name="able_to_sleep" type="bool">
- </argument>
- <description>
- Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
- Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
- </description>
- </method>
- <method name="set_contact_monitor">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Enable contact monitoring. This allows the body to emit signals when it collides with another.
- </description>
- </method>
- <method name="set_friction">
- <return type="void">
- </return>
- <argument index="0" name="friction" type="float">
- </argument>
- <description>
- Set the body friction, from 0 (frictionless) to 1 (max friction).
- </description>
- </method>
- <method name="set_gravity_scale">
- <return type="void">
- </return>
- <argument index="0" name="gravity_scale" type="float">
- </argument>
- <description>
- Set the gravity factor. This factor multiplies gravity intensity just for this body.
- </description>
- </method>
- <method name="set_linear_damp">
- <return type="void">
- </return>
- <argument index="0" name="linear_damp" type="float">
- </argument>
- <description>
- Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
- </description>
- </method>
- <method name="set_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <description>
- Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
- </description>
- </method>
- <method name="set_mass">
- <return type="void">
- </return>
- <argument index="0" name="mass" type="float">
- </argument>
- <description>
- Set the body mass.
- </description>
- </method>
- <method name="set_max_contacts_reported">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="RigidBody.Mode">
- </argument>
- <description>
- Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
- </description>
- </method>
- <method name="set_sleeping">
- <return type="void">
- </return>
- <argument index="0" name="sleeping" type="bool">
- </argument>
- <description>
- Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body.
- </description>
- </method>
- <method name="set_use_continuous_collision_detection">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the continuous collision detection mode from the enum CCD_MODE_*.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
- </description>
- </method>
- <method name="set_use_custom_integrator">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
- </description>
- </method>
- <method name="set_weight">
- <return type="void">
- </return>
- <argument index="0" name="weight" type="float">
- </argument>
- <description>
- Set the body weight given standard earth-weight (gravity 9.8).
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
- </member>
- <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" brief="">
- </member>
- <member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" brief="" enum="RigidBody.AxisLock">
- </member>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
- </member>
- <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" brief="">
- </member>
- <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" brief="">
- </member>
- <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" brief="">
- </member>
- <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" brief="">
- </member>
- <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" brief="">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
- </member>
- <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" brief="">
- </member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
- </member>
- <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" brief="">
- </member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody.Mode">
- </member>
- <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief="">
- </member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" brief="">
- </member>
- </members>
- <signals>
- <signal name="body_entered">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- </description>
- </signal>
- <signal name="body_exited">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- </description>
- </signal>
- <signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="local_shape" type="int">
- </argument>
- <description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
- </description>
- </signal>
- <signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="local_shape" type="int">
- </argument>
- <description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
- </description>
- </signal>
- <signal name="sleeping_state_changed">
- <description>
- Emitted when the body changes its sleeping state. Either by sleeping or waking up.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_STATIC" value="1">
- Static mode. The body behaves like a [StaticBody], and can only move by user code.
- </constant>
- <constant name="MODE_KINEMATIC" value="3">
- Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
- </constant>
- <constant name="MODE_RIGID" value="0">
- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
- </constant>
- <constant name="MODE_CHARACTER" value="2">
- Character body. This behaves like a rigid body, but can not rotate.
- </constant>
- </constants>
-</class>
-<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core">
- <brief_description>
- Rigid body 2D node.
- </brief_description>
- <description>
- Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static.
- Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node.
- As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
- </description>
- <methods>
- <method name="_integrate_forces" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="state" type="Physics2DDirectBodyState">
- </argument>
- <description>
- Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
- </description>
- </method>
- <method name="add_force">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <argument index="1" name="force" type="Vector2">
- </argument>
- <description>
- Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates.
- </description>
- </method>
- <method name="apply_impulse">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <argument index="1" name="impulse" type="Vector2">
- </argument>
- <description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
- </description>
- </method>
- <method name="get_angular_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the angular damp for this body.
- </description>
- </method>
- <method name="get_angular_velocity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity].
- </description>
- </method>
- <method name="get_applied_force" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the applied force vector.
- </description>
- </method>
- <method name="get_applied_torque" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the torque which is being applied to this body.
- </description>
- </method>
- <method name="get_bounce" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body bounciness.
- </description>
- </method>
- <method name="get_colliding_bodies" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. You must also enable contact monitor, see [method set_contact_monitor]
- </description>
- </method>
- <method name="get_continuous_collision_detection_mode" qualifiers="const">
- <return type="int" enum="RigidBody2D.CCDMode">
- </return>
- <description>
- Return whether this body is using continuous collision detection.
- </description>
- </method>
- <method name="get_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body friction.
- </description>
- </method>
- <method name="get_gravity_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the gravity factor.
- </description>
- </method>
- <method name="get_inertia" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet.
- </description>
- </method>
- <method name="get_linear_damp" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the linear damp for this body.
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity].
- </description>
- </method>
- <method name="get_mass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body mass.
- </description>
- </method>
- <method name="get_max_contacts_reported" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="RigidBody2D.Mode">
- </return>
- <description>
- Return the current body mode, see [method set_mode].
- </description>
- </method>
- <method name="get_weight" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body weight given standard earth-weight (gravity 9.8).
- </description>
- </method>
- <method name="is_able_to_sleep" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep].
- </description>
- </method>
- <method name="is_contact_monitor_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether contact monitoring is enabled.
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the body is sleeping.
- </description>
- </method>
- <method name="is_using_custom_integrator">
- <return type="bool">
- </return>
- <description>
- Return true if the body is not doing any built-in force integration.
- </description>
- </method>
- <method name="set_angular_damp">
- <return type="void">
- </return>
- <argument index="0" name="angular_damp" type="float">
- </argument>
- <description>
- Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
- </description>
- </method>
- <method name="set_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="angular_velocity" type="float">
- </argument>
- <description>
- Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
- </description>
- </method>
- <method name="set_applied_force">
- <return type="void">
- </return>
- <argument index="0" name="force" type="Vector2">
- </argument>
- <description>
- Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly.
- </description>
- </method>
- <method name="set_applied_torque">
- <return type="void">
- </return>
- <argument index="0" name="torque" type="float">
- </argument>
- <description>
- Set a constant torque which will be applied to this body.
- </description>
- </method>
- <method name="set_axis_velocity">
- <return type="void">
- </return>
- <argument index="0" name="axis_velocity" type="Vector2">
- </argument>
- <description>
- Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
- </description>
- </method>
- <method name="set_bounce">
- <return type="void">
- </return>
- <argument index="0" name="bounce" type="float">
- </argument>
- <description>
- Set the body bounciness, from 0 (no bounce) to 1 (full bounce).
- </description>
- </method>
- <method name="set_can_sleep">
- <return type="void">
- </return>
- <argument index="0" name="able_to_sleep" type="bool">
- </argument>
- <description>
- Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
- Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
- </description>
- </method>
- <method name="set_contact_monitor">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Enable contact monitoring. This allows the body to emit signals when it collides with another.
- </description>
- </method>
- <method name="set_continuous_collision_detection_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="RigidBody2D.CCDMode">
- </argument>
- <description>
- Set the continuous collision detection mode from the enum CCD_MODE_*.
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
- </description>
- </method>
- <method name="set_friction">
- <return type="void">
- </return>
- <argument index="0" name="friction" type="float">
- </argument>
- <description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
- </description>
- </method>
- <method name="set_gravity_scale">
- <return type="void">
- </return>
- <argument index="0" name="gravity_scale" type="float">
- </argument>
- <description>
- Set the gravity factor. This factor multiplies gravity intensity just for this body.
- </description>
- </method>
- <method name="set_inertia">
- <return type="void">
- </return>
- <argument index="0" name="inertia" type="float">
- </argument>
- <description>
- Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it.
- </description>
- </method>
- <method name="set_linear_damp">
- <return type="void">
- </return>
- <argument index="0" name="linear_damp" type="float">
- </argument>
- <description>
- Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
- </description>
- </method>
- <method name="set_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <description>
- Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
- </description>
- </method>
- <method name="set_mass">
- <return type="void">
- </return>
- <argument index="0" name="mass" type="float">
- </argument>
- <description>
- Set the body mass.
- </description>
- </method>
- <method name="set_max_contacts_reported">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="RigidBody2D.Mode">
- </argument>
- <description>
- Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
- </description>
- </method>
- <method name="set_sleeping">
- <return type="void">
- </return>
- <argument index="0" name="sleeping" type="bool">
- </argument>
- <description>
- Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
- </description>
- </method>
- <method name="set_use_custom_integrator">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
- </description>
- </method>
- <method name="set_weight">
- <return type="void">
- </return>
- <argument index="0" name="weight" type="float">
- </argument>
- <description>
- Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels.
- </description>
- </method>
- <method name="test_motion">
- <return type="bool">
- </return>
- <argument index="0" name="motion" type="Vector2">
- </argument>
- <argument index="1" name="margin" type="float" default="0.08">
- </argument>
- <argument index="2" name="result" type="Physics2DTestMotionResult" default="null">
- </argument>
- <description>
- Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one).
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
- </member>
- <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" brief="">
- </member>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
- </member>
- <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" brief="">
- </member>
- <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" brief="">
- </member>
- <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" brief="">
- </member>
- <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" brief="" enum="RigidBody2D.CCDMode">
- </member>
- <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" brief="">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
- </member>
- <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" brief="">
- </member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
- </member>
- <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" brief="">
- </member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody2D.Mode">
- </member>
- <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief="">
- </member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" brief="">
- </member>
- </members>
- <signals>
- <signal name="body_entered">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- </description>
- </signal>
- <signal name="body_exited">
- <argument index="0" name="body" type="Object">
- </argument>
- <description>
- Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- </description>
- </signal>
- <signal name="body_shape_entered">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="local_shape" type="int">
- </argument>
- <description>
- Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
- </description>
- </signal>
- <signal name="body_shape_exited">
- <argument index="0" name="body_id" type="int">
- </argument>
- <argument index="1" name="body" type="Object">
- </argument>
- <argument index="2" name="body_shape" type="int">
- </argument>
- <argument index="3" name="local_shape" type="int">
- </argument>
- <description>
- Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
- This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
- </description>
- </signal>
- <signal name="sleeping_state_changed">
- <description>
- Emitted when the body changes its sleeping state. Either by sleeping or waking up.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_STATIC" value="1">
- Static mode. The body behaves like a [StaticBody2D], and can only move by user code.
- </constant>
- <constant name="MODE_KINEMATIC" value="3">
- Kinematic body. The body behaves like a [KinematicBody2D], and can only move by user code.
- </constant>
- <constant name="MODE_RIGID" value="0">
- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
- </constant>
- <constant name="MODE_CHARACTER" value="2">
- Character body. This behaves like a rigid body, but can not rotate.
- </constant>
- <constant name="CCD_MODE_DISABLED" value="0">
- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
- </constant>
- <constant name="CCD_MODE_CAST_RAY" value="1">
- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise.
- </constant>
- <constant name="CCD_MODE_CAST_SHAPE" value="2">
- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise.
- </constant>
- </constants>
-</class>
-<class name="SceneState" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_connection_binds" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_connection_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_connection_flags" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_connection_method" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_connection_signal" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_connection_source" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_connection_target" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_groups" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_instance" qualifiers="const">
- <return type="PackedScene">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_instance_placeholder" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_owner_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="for_parent" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_property_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_property_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="prop_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_property_value" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="prop_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_type" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_node_instance_placeholder" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="GEN_EDIT_STATE_DISABLED" value="0">
- </constant>
- <constant name="GEN_EDIT_STATE_INSTANCE" value="1">
- </constant>
- <constant name="GEN_EDIT_STATE_MAIN" value="2">
- </constant>
- </constants>
-</class>
-<class name="SceneTree" inherits="MainLoop" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="call_group" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="call_group_flags" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <argument index="1" name="group" type="String">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="change_scene">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="change_scene_to">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="packed_scene" type="PackedScene">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_timer">
- <return type="SceneTreeTimer">
- </return>
- <argument index="0" name="time_sec" type="float">
- </argument>
- <argument index="1" name="pause_mode_process" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_current_scene" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_edited_scene_root" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- </description>
- </method>
- <method name="get_frame" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_network_connected_peers" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_network_unique_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_node_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_nodes_in_group">
- <return type="Array">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_root" qualifiers="const">
- <return type="Viewport">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rpc_sender_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="has_group" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_network_peer" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if there is a [NetworkedMultiplayerPeer] set (with [method SceneTree.set_network_peer]).
- </description>
- </method>
- <method name="is_debugging_collisions_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_debugging_navigation_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_input_handled">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_network_server" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections).
- </description>
- </method>
- <method name="is_paused" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_refusing_new_network_connections" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="notify_group">
- <return type="void">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <argument index="1" name="notification" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="notify_group_flags">
- <return type="void">
- </return>
- <argument index="0" name="call_flags" type="int">
- </argument>
- <argument index="1" name="group" type="String">
- </argument>
- <argument index="2" name="notification" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="queue_delete">
- <return type="void">
- </return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="quit">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="reload_current_scene">
- <return type="int" enum="Error">
- </return>
- <description>
- </description>
- </method>
- <method name="set_auto_accept_quit">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_scene">
- <return type="void">
- </return>
- <argument index="0" name="child_node" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_debug_collisions_hint">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_debug_navigation_hint">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_edited_scene_root">
- <return type="void">
- </return>
- <argument index="0" name="scene" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_group">
- <return type="void">
- </return>
- <argument index="0" name="group" type="String">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_group_flags">
- <return type="void">
- </return>
- <argument index="0" name="call_flags" type="int">
- </argument>
- <argument index="1" name="group" type="String">
- </argument>
- <argument index="2" name="property" type="String">
- </argument>
- <argument index="3" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_input_as_handled">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_network_peer">
- <return type="void">
- </return>
- <argument index="0" name="peer" type="NetworkedMultiplayerPeer">
- </argument>
- <description>
- Set the peer object to handle the RPC system (effectively enabling networking). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals.
- </description>
- </method>
- <method name="set_pause">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_refuse_new_network_connections">
- <return type="void">
- </return>
- <argument index="0" name="refuse" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_screen_stretch">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
- </argument>
- <argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
- </argument>
- <argument index="2" name="minsize" type="Vector2">
- </argument>
- <argument index="3" name="shrink" type="int" default="1">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="connected_to_server">
- <description>
- </description>
- </signal>
- <signal name="connection_failed">
- <description>
- </description>
- </signal>
- <signal name="files_dropped">
- <argument index="0" name="files" type="PoolStringArray">
- </argument>
- <argument index="1" name="screen" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="fixed_frame">
- <description>
- </description>
- </signal>
- <signal name="idle_frame">
- <description>
- </description>
- </signal>
- <signal name="network_peer_connected">
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="network_peer_disconnected">
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="node_configuration_warning_changed">
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="node_removed">
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="screen_resized">
- <description>
- </description>
- </signal>
- <signal name="server_disconnected">
- <description>
- </description>
- </signal>
- <signal name="tree_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="GROUP_CALL_DEFAULT" value="0">
- </constant>
- <constant name="GROUP_CALL_REVERSE" value="1">
- </constant>
- <constant name="GROUP_CALL_REALTIME" value="2">
- </constant>
- <constant name="GROUP_CALL_UNIQUE" value="4">
- </constant>
- <constant name="STRETCH_MODE_DISABLED" value="0">
- </constant>
- <constant name="STRETCH_MODE_2D" value="1">
- </constant>
- <constant name="STRETCH_MODE_VIEWPORT" value="2">
- </constant>
- <constant name="STRETCH_ASPECT_IGNORE" value="0">
- </constant>
- <constant name="STRETCH_ASPECT_KEEP" value="1">
- </constant>
- <constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2">
- </constant>
- <constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3">
- </constant>
- </constants>
-</class>
-<class name="SceneTreeTimer" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_time_left" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_time_left">
- <return type="void">
- </return>
- <argument index="0" name="time" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="timeout">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Script" inherits="Resource" category="Core">
- <brief_description>
- Base class for scripts.
- </brief_description>
- <description>
- Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances.
- </description>
- <methods>
- <method name="can_instance" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if this script can be instance (ie not a library).
- </description>
- </method>
- <method name="get_node_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_source_code" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the script source code (if available).
- </description>
- </method>
- <method name="has_script_signal" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="signal_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_source_code" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the script contains source code.
- </description>
- </method>
- <method name="instance_has" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="base_object" type="Object">
- </argument>
- <description>
- Return true if a given object uses an instance of this script.
- </description>
- </method>
- <method name="is_tool" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="reload">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="keep_state" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_source_code">
- <return type="void">
- </return>
- <argument index="0" name="source" type="String">
- </argument>
- <description>
- Set the script source code.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ScriptEditor" inherits="PanelContainer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_current_script">
- <return type="Script">
- </return>
- <description>
- Returns a [Script] that is currently active in editor.
- </description>
- </method>
- <method name="get_open_scripts" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an array with all [Script] objects which are currently open in editor.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="editor_script_changed">
- <argument index="0" name="script" type="Object">
- </argument>
- <description>
- Emitted when user changed active script. Argument is a freshly activated [Script].
- </description>
- </signal>
- <signal name="script_close">
- <argument index="0" name="script" type="Object">
- </argument>
- <description>
- Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="ScrollBar" inherits="Range" category="Core">
- <brief_description>
- Base class for scroll bars.
- </brief_description>
- <description>
- Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available.
- </description>
- <methods>
- <method name="get_custom_step" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_custom_step">
- <return type="void">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" brief="">
- </member>
- </members>
- <signals>
- <signal name="scrolling">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="ScrollContainer" inherits="Container" category="Core">
- <brief_description>
- A helper node for displaying scrollable elements (e.g. lists).
- </brief_description>
- <description>
- A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).
- </description>
- <methods>
- <method name="get_h_scroll" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return current horizontal scroll value.
- </description>
- </method>
- <method name="get_v_scroll" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return current vertical scroll value.
- </description>
- </method>
- <method name="is_h_scroll_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if horizontal scroll is allowed.
- </description>
- </method>
- <method name="is_v_scroll_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if vertical scroll is allowed.
- </description>
- </method>
- <method name="set_enable_h_scroll">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set allows horizontal scroll.
- </description>
- </method>
- <method name="set_enable_v_scroll">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set allows vertical scroll.
- </description>
- </method>
- <method name="set_h_scroll">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Set horizontal scroll value.
- </description>
- </method>
- <method name="set_v_scroll">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Set vertical scroll value.
- </description>
- </method>
- </methods>
- <members>
- <member name="scroll_horizontal" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" brief="">
- </member>
- <member name="scroll_vertical" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="SegmentShape2D" inherits="Shape2D" category="Core">
- <brief_description>
- Segment Shape for 2D Collision Detection.
- </brief_description>
- <description>
- Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'.
- </description>
- <methods>
- <method name="get_a" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the first point's position.
- </description>
- </method>
- <method name="get_b" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the second point's position.
- </description>
- </method>
- <method name="set_a">
- <return type="void">
- </return>
- <argument index="0" name="a" type="Vector2">
- </argument>
- <description>
- Set the first point's position.
- </description>
- </method>
- <method name="set_b">
- <return type="void">
- </return>
- <argument index="0" name="b" type="Vector2">
- </argument>
- <description>
- Set the second point's position.
- </description>
- </method>
- </methods>
- <members>
- <member name="a" type="Vector2" setter="set_a" getter="get_a" brief="">
- </member>
- <member name="b" type="Vector2" setter="set_b" getter="get_b" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Semaphore" inherits="Reference" category="Core">
- <brief_description>
- A synchronization Semaphore.
- </brief_description>
- <description>
- A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
- </description>
- <methods>
- <method name="post">
- <return type="int" enum="Error">
- </return>
- <description>
- Lowers the [Semaphore], allowing one more thread in.
- </description>
- </method>
- <method name="wait">
- <return type="int" enum="Error">
- </return>
- <description>
- Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Separator" inherits="Control" category="Core">
- <brief_description>
- Base class for separators.
- </brief_description>
- <description>
- Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Shader" inherits="Resource" category="Core">
- <brief_description>
- To be changed, ignore.
- </brief_description>
- <description>
- To be changed, ignore.
- </description>
- <methods>
- <method name="get_code" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_texture_param" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="param" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="Shader.Mode">
- </return>
- <description>
- </description>
- </method>
- <method name="has_param" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_code">
- <return type="void">
- </return>
- <argument index="0" name="code" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_texture_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="String">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="code" type="String" setter="set_code" getter="get_code" brief="">
- </member>
- </members>
- <constants>
- <constant name="MODE_SPATIAL" value="0">
- </constant>
- <constant name="MODE_CANVAS_ITEM" value="1">
- </constant>
- <constant name="MODE_PARTICLES" value="2">
- </constant>
- </constants>
-</class>
-<class name="ShaderMaterial" inherits="Material" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_shader" qualifiers="const">
- <return type="Shader">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shader_param" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="param" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shader">
- <return type="void">
- </return>
- <argument index="0" name="shader" type="Shader">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shader_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Shape" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Shape2D" inherits="Resource" category="Core">
- <brief_description>
- Base class for all 2D Shapes.
- </brief_description>
- <description>
- Base class for all 2D Shapes. All 2D shape types inherit from this.
- </description>
- <methods>
- <method name="collide">
- <return type="bool">
- </return>
- <argument index="0" name="local_xform" type="Transform2D">
- </argument>
- <argument index="1" name="with_shape" type="Shape2D">
- </argument>
- <argument index="2" name="shape_xform" type="Transform2D">
- </argument>
- <description>
- Return whether this shape is colliding with another.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
- </description>
- </method>
- <method name="collide_and_get_contacts">
- <return type="Variant">
- </return>
- <argument index="0" name="local_xform" type="Transform2D">
- </argument>
- <argument index="1" name="with_shape" type="Shape2D">
- </argument>
- <argument index="2" name="shape_xform" type="Transform2D">
- </argument>
- <description>
- Return a list of the points where this shape touches another. If there are no collisions, the list is empty.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
- </description>
- </method>
- <method name="collide_with_motion">
- <return type="bool">
- </return>
- <argument index="0" name="local_xform" type="Transform2D">
- </argument>
- <argument index="1" name="local_motion" type="Vector2">
- </argument>
- <argument index="2" name="with_shape" type="Shape2D">
- </argument>
- <argument index="3" name="shape_xform" type="Transform2D">
- </argument>
- <argument index="4" name="shape_motion" type="Vector2">
- </argument>
- <description>
- Return whether this shape would collide with another, if a given movement was applied.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
- </description>
- </method>
- <method name="collide_with_motion_and_get_contacts">
- <return type="Variant">
- </return>
- <argument index="0" name="local_xform" type="Transform2D">
- </argument>
- <argument index="1" name="local_motion" type="Vector2">
- </argument>
- <argument index="2" name="with_shape" type="Shape2D">
- </argument>
- <argument index="3" name="shape_xform" type="Transform2D">
- </argument>
- <argument index="4" name="shape_motion" type="Vector2">
- </argument>
- <description>
- Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
- </description>
- </method>
- <method name="get_custom_solver_bias" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the custom solver bias.
- </description>
- </method>
- <method name="set_custom_solver_bias">
- <return type="void">
- </return>
- <argument index="0" name="bias" type="float">
- </argument>
- <description>
- Use a custom solver bias. No need to change this unless you really know what you are doing.
- The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision.
- </description>
- </method>
- </methods>
- <members>
- <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ShortCut" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_as_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shortcut" qualifiers="const">
- <return type="InputEvent">
- </return>
- <description>
- </description>
- </method>
- <method name="is_shortcut" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_shortcut">
- <return type="void">
- </return>
- <argument index="0" name="event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Skeleton" inherits="Spatial" category="Core">
- <brief_description>
- Skeleton for characters and animated objects.
- </brief_description>
- <description>
- Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
- </description>
- <methods>
- <method name="add_bone">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Add a bone, with name "name". [method get_bone_count] will become the bone index.
- </description>
- </method>
- <method name="bind_child_node_to_bone">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Node">
- </argument>
- <description>
- Deprecated soon.
- </description>
- </method>
- <method name="clear_bones">
- <return type="void">
- </return>
- <description>
- Clear all the bones in this skeleton.
- </description>
- </method>
- <method name="find_bone" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return the bone index that matches "name" as its name.
- </description>
- </method>
- <method name="get_bone_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of bones in the skeleton.
- </description>
- </method>
- <method name="get_bone_custom_pose" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bone_global_pose" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bone_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the name of the bone at index "index"
- </description>
- </method>
- <method name="get_bone_parent" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
- </description>
- </method>
- <method name="get_bone_pose" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the pose transform for bone "bone_idx".
- </description>
- </method>
- <method name="get_bone_rest" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the rest transform for a bone "bone_idx".
- </description>
- </method>
- <method name="get_bone_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bound_child_nodes_to_bone" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Deprecated soon.
- </description>
- </method>
- <method name="is_bone_rest_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bone_custom_pose">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="custom_pose" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bone_disable_rest">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bone_global_pose">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="pose" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bone_parent">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="parent_idx" type="int">
- </argument>
- <description>
- Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
- </description>
- </method>
- <method name="set_bone_pose">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="pose" type="Transform">
- </argument>
- <description>
- Return the pose transform for bone "bone_idx".
- </description>
- </method>
- <method name="set_bone_rest">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="rest" type="Transform">
- </argument>
- <description>
- Set the rest transform for bone "bone_idx"
- </description>
- </method>
- <method name="unbind_child_node_from_bone">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Node">
- </argument>
- <description>
- Deprecated soon.
- </description>
- </method>
- <method name="unparent_bone_and_rest">
- <return type="void">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_UPDATE_SKELETON" value="50" enum="">
- </constant>
- </constants>
-</class>
-<class name="Sky" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_radiance_size" qualifiers="const">
- <return type="int" enum="Sky.RadianceSize">
- </return>
- <description>
- </description>
- </method>
- <method name="set_radiance_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int" enum="Sky.RadianceSize">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" brief="" enum="Sky.RadianceSize">
- </member>
- </members>
- <constants>
- <constant name="RADIANCE_SIZE_32" value="0">
- </constant>
- <constant name="RADIANCE_SIZE_64" value="1">
- </constant>
- <constant name="RADIANCE_SIZE_128" value="2">
- </constant>
- <constant name="RADIANCE_SIZE_256" value="3">
- </constant>
- <constant name="RADIANCE_SIZE_512" value="4">
- </constant>
- <constant name="RADIANCE_SIZE_1024" value="5">
- </constant>
- <constant name="RADIANCE_SIZE_2048" value="6">
- </constant>
- <constant name="RADIANCE_SIZE_MAX" value="7">
- </constant>
- </constants>
-</class>
-<class name="Slider" inherits="Range" category="Core">
- <brief_description>
- Base class for GUI Sliders.
- </brief_description>
- <description>
- Base class for GUI Sliders.
- </description>
- <methods>
- <method name="get_ticks" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return amounts of ticks to display on slider.
- </description>
- </method>
- <method name="get_ticks_on_borders" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if ticks are visible on borders.
- </description>
- </method>
- <method name="is_editable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_editable">
- <return type="void">
- </return>
- <argument index="0" name="editable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ticks">
- <return type="void">
- </return>
- <argument index="0" name="count" type="int">
- </argument>
- <description>
- Set amount of ticks to display in slider.
- </description>
- </method>
- <method name="set_ticks_on_borders">
- <return type="void">
- </return>
- <argument index="0" name="ticks_on_border" type="bool">
- </argument>
- <description>
- Set true if ticks are visible on borders.
- </description>
- </method>
- </methods>
- <members>
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" brief="">
- </member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="" enum="Control.FocusMode">
- </member>
- <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" brief="">
- </member>
- <member name="ticks_on_borders" type="bool" setter="set_ticks_on_borders" getter="get_ticks_on_borders" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="SliderJoint" inherits="Joint" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_param" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="param" type="int" enum="SliderJoint.Param">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_param">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="SliderJoint.Param">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="angular_limit/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular" brief="">
- </member>
- <member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular" brief="">
- </member>
- <member name="angular_motion/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_motion/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_motion/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_ortho/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_ortho/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="angular_ortho/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_limit/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_limit/lower_distance" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_limit/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_limit/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_limit/upper_distance" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_motion/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_motion/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_motion/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_ortho/damping" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_ortho/restitution" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="linear_ortho/softness" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- </members>
- <constants>
- <constant name="PARAM_LINEAR_LIMIT_UPPER" value="0">
- </constant>
- <constant name="PARAM_LINEAR_LIMIT_LOWER" value="1">
- </constant>
- <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2">
- </constant>
- <constant name="PARAM_LINEAR_LIMIT_RESTITUTION" value="3">
- </constant>
- <constant name="PARAM_LINEAR_LIMIT_DAMPING" value="4">
- </constant>
- <constant name="PARAM_LINEAR_MOTION_SOFTNESS" value="5">
- </constant>
- <constant name="PARAM_LINEAR_MOTION_RESTITUTION" value="6">
- </constant>
- <constant name="PARAM_LINEAR_MOTION_DAMPING" value="7">
- </constant>
- <constant name="PARAM_LINEAR_ORTHOGONAL_SOFTNESS" value="8">
- </constant>
- <constant name="PARAM_LINEAR_ORTHOGONAL_RESTITUTION" value="9">
- </constant>
- <constant name="PARAM_LINEAR_ORTHOGONAL_DAMPING" value="10">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_UPPER" value="11">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_LOWER" value="12">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="13">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_RESTITUTION" value="14">
- </constant>
- <constant name="PARAM_ANGULAR_LIMIT_DAMPING" value="15">
- </constant>
- <constant name="PARAM_ANGULAR_MOTION_SOFTNESS" value="16">
- </constant>
- <constant name="PARAM_ANGULAR_MOTION_RESTITUTION" value="17">
- </constant>
- <constant name="PARAM_ANGULAR_MOTION_DAMPING" value="18">
- </constant>
- <constant name="PARAM_ANGULAR_ORTHOGONAL_SOFTNESS" value="19">
- </constant>
- <constant name="PARAM_ANGULAR_ORTHOGONAL_RESTITUTION" value="20">
- </constant>
- <constant name="PARAM_ANGULAR_ORTHOGONAL_DAMPING" value="21">
- </constant>
- <constant name="PARAM_MAX" value="22">
- </constant>
- </constants>
-</class>
-<class name="Spatial" inherits="Node" category="Core">
- <brief_description>
- Base class for all 3D nodes.
- </brief_description>
- <description>
- Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent.
- </description>
- <methods>
- <method name="get_gizmo" qualifiers="const">
- <return type="SpatialGizmo">
- </return>
- <description>
- </description>
- </method>
- <method name="get_global_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- Return the global transform, relative to worldspace.
- </description>
- </method>
- <method name="get_parent_spatial" qualifiers="const">
- <return type="Spatial">
- </return>
- <description>
- Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
- </description>
- </method>
- <method name="get_rotation" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the rotation (in radians).
- </description>
- </method>
- <method name="get_rotation_deg" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the rotation (in degrees).
- </description>
- </method>
- <method name="get_scale" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <description>
- Return the local transform, relative to the bone parent.
- </description>
- </method>
- <method name="get_translation" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_world" qualifiers="const">
- <return type="World">
- </return>
- <description>
- </description>
- </method>
- <method name="global_rotate">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <argument index="1" name="radians" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="global_translate">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="hide">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="is_local_transform_notification_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_set_as_toplevel" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_transform_notification_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_visible_in_tree" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="look_at">
- <return type="void">
- </return>
- <argument index="0" name="target" type="Vector3">
- </argument>
- <argument index="1" name="up" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="look_at_from_pos">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="target" type="Vector3">
- </argument>
- <argument index="2" name="up" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="orthonormalize">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="rotate">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <argument index="1" name="radians" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="rotate_x">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="rotate_y">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="rotate_z">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_as_toplevel">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gizmo">
- <return type="void">
- </return>
- <argument index="0" name="gizmo" type="SpatialGizmo">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_global_transform">
- <return type="void">
- </return>
- <argument index="0" name="global" type="Transform">
- </argument>
- <description>
- Set the transform globally, relative to worldspace.
- </description>
- </method>
- <method name="set_identity">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="set_ignore_transform_notification">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_notify_local_transform">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_notify_transform">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rotation">
- <return type="void">
- </return>
- <argument index="0" name="rotation_rad" type="Vector3">
- </argument>
- <description>
- Set the rotation (in radians).
- </description>
- </method>
- <method name="set_rotation_deg">
- <return type="void">
- </return>
- <argument index="0" name="rotation_deg" type="Vector3">
- </argument>
- <description>
- Set the rotation (in degrees).
- </description>
- </method>
- <method name="set_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_transform">
- <return type="void">
- </return>
- <argument index="0" name="local" type="Transform">
- </argument>
- <description>
- Set the transform locally, relative to the parent spatial node.
- </description>
- </method>
- <method name="set_translation">
- <return type="void">
- </return>
- <argument index="0" name="translation" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visible">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="show">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="to_global" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="local_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="to_local" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="global_point" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="translate">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="update_gizmo">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform" brief="">
- </member>
- <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" brief="">
- </member>
- <member name="rotation_deg" type="Vector3" setter="set_rotation_deg" getter="get_rotation_deg" brief="">
- </member>
- <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" brief="">
- </member>
- <member name="transform" type="Transform" setter="set_transform" getter="get_transform" brief="">
- </member>
- <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" brief="">
- </member>
- <member name="visible" type="bool" setter="set_visible" getter="is_visible" brief="">
- </member>
- </members>
- <signals>
- <signal name="visibility_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
- Spatial nodes receive this notification with their global transform changes. This means that either the current or a parent node changed its transform.
- </constant>
- <constant name="NOTIFICATION_ENTER_WORLD" value="41" enum="">
- </constant>
- <constant name="NOTIFICATION_EXIT_WORLD" value="42" enum="">
- </constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum="">
- </constant>
- </constants>
-</class>
-<class name="SpatialGizmo" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpatialMaterial" inherits="Material" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_albedo" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_alpha_scissor_threshold" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_anisotropy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_ao_texture_channel" qualifiers="const">
- <return type="int" enum="SpatialMaterial.TextureChannel">
- </return>
- <description>
- </description>
- </method>
- <method name="get_billboard_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.BillboardMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_blend_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.BlendMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_clearcoat" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_clearcoat_gloss" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cull_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.CullMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_depth_deep_parallax_max_layers" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_depth_deep_parallax_min_layers" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_depth_draw_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.DepthDrawMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_depth_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_detail_blend_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.BlendMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_detail_uv" qualifiers="const">
- <return type="int" enum="SpatialMaterial.DetailUV">
- </return>
- <description>
- </description>
- </method>
- <method name="get_diffuse_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.DiffuseMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_emission_energy" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_feature" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_grow" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_line_width" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_metallic" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_metallic_texture_channel" qualifiers="const">
- <return type="int" enum="SpatialMaterial.TextureChannel">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_particles_anim_h_frames" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_particles_anim_loop" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_particles_anim_v_frames" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_point_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_refraction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_refraction_texture_channel" qualifiers="const">
- <return type="int" enum="SpatialMaterial.TextureChannel">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rim" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rim_tint" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_roughness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_roughness_texture_channel" qualifiers="const">
- <return type="int" enum="SpatialMaterial.TextureChannel">
- </return>
- <description>
- </description>
- </method>
- <method name="get_specular" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_specular_mode" qualifiers="const">
- <return type="int" enum="SpatialMaterial.SpecularMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_subsurface_scattering_strength" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_transmission" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv1_offset" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv1_scale" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv1_triplanar_blend_sharpness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv2_offset" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv2_scale" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_uv2_triplanar_blend_sharpness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_depth_deep_parallax_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_grow_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_albedo">
- <return type="void">
- </return>
- <argument index="0" name="albedo" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_alpha_scissor_threshold">
- <return type="void">
- </return>
- <argument index="0" name="threshold" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_anisotropy">
- <return type="void">
- </return>
- <argument index="0" name="anisotropy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_ao_texture_channel">
- <return type="void">
- </return>
- <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_billboard_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="SpatialMaterial.BillboardMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_blend_mode">
- <return type="void">
- </return>
- <argument index="0" name="blend_mode" type="int" enum="SpatialMaterial.BlendMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_clearcoat">
- <return type="void">
- </return>
- <argument index="0" name="clearcoat" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_clearcoat_gloss">
- <return type="void">
- </return>
- <argument index="0" name="clearcoat_gloss" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cull_mode">
- <return type="void">
- </return>
- <argument index="0" name="cull_mode" type="int" enum="SpatialMaterial.CullMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_depth_deep_parallax">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_depth_deep_parallax_max_layers">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_depth_deep_parallax_min_layers">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_depth_draw_mode">
- <return type="void">
- </return>
- <argument index="0" name="depth_draw_mode" type="int" enum="SpatialMaterial.DepthDrawMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_depth_scale">
- <return type="void">
- </return>
- <argument index="0" name="depth_scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_detail_blend_mode">
- <return type="void">
- </return>
- <argument index="0" name="detail_blend_mode" type="int" enum="SpatialMaterial.BlendMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_detail_uv">
- <return type="void">
- </return>
- <argument index="0" name="detail_uv" type="int" enum="SpatialMaterial.DetailUV">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_diffuse_mode">
- <return type="void">
- </return>
- <argument index="0" name="diffuse_mode" type="int" enum="SpatialMaterial.DiffuseMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission">
- <return type="void">
- </return>
- <argument index="0" name="emission" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_emission_energy">
- <return type="void">
- </return>
- <argument index="0" name="emission_energy" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_feature">
- <return type="void">
- </return>
- <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_grow">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_grow_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_line_width">
- <return type="void">
- </return>
- <argument index="0" name="line_width" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_metallic">
- <return type="void">
- </return>
- <argument index="0" name="metallic" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_metallic_texture_channel">
- <return type="void">
- </return>
- <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_normal_scale">
- <return type="void">
- </return>
- <argument index="0" name="normal_scale" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_particles_anim_h_frames">
- <return type="void">
- </return>
- <argument index="0" name="frames" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_particles_anim_loop">
- <return type="void">
- </return>
- <argument index="0" name="frames" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_particles_anim_v_frames">
- <return type="void">
- </return>
- <argument index="0" name="frames" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_size">
- <return type="void">
- </return>
- <argument index="0" name="point_size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_refraction">
- <return type="void">
- </return>
- <argument index="0" name="refraction" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_refraction_texture_channel">
- <return type="void">
- </return>
- <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rim">
- <return type="void">
- </return>
- <argument index="0" name="rim" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rim_tint">
- <return type="void">
- </return>
- <argument index="0" name="rim_tint" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_roughness">
- <return type="void">
- </return>
- <argument index="0" name="roughness" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_roughness_texture_channel">
- <return type="void">
- </return>
- <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_specular">
- <return type="void">
- </return>
- <argument index="0" name="specular" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_specular_mode">
- <return type="void">
- </return>
- <argument index="0" name="specular_mode" type="int" enum="SpatialMaterial.SpecularMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_subsurface_scattering_strength">
- <return type="void">
- </return>
- <argument index="0" name="strength" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_transmission">
- <return type="void">
- </return>
- <argument index="0" name="transmission" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv1_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv1_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv1_triplanar_blend_sharpness">
- <return type="void">
- </return>
- <argument index="0" name="sharpness" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv2_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv2_scale">
- <return type="void">
- </return>
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_uv2_triplanar_blend_sharpness">
- <return type="void">
- </return>
- <argument index="0" name="sharpness" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" brief="">
- </member>
- <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" brief="">
- </member>
- <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat" brief="">
- </member>
- <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss" brief="">
- </member>
- <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled" brief="">
- </member>
- <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers" brief="">
- </member>
- <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers" brief="">
- </member>
- <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale" brief="">
- </member>
- <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" brief="" enum="SpatialMaterial.BlendMode">
- </member>
- <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" brief="" enum="SpatialMaterial.DetailUV">
- </member>
- <member name="emission" type="Color" setter="set_emission" getter="get_emission" brief="">
- </member>
- <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" brief="">
- </member>
- <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="metallic" type="float" setter="set_metallic" getter="get_metallic" brief="">
- </member>
- <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" brief="">
- </member>
- <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale" brief="">
- </member>
- <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" brief="">
- </member>
- <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" brief="" enum="SpatialMaterial.BillboardMode">
- </member>
- <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="" enum="SpatialMaterial.BlendMode">
- </member>
- <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="" enum="SpatialMaterial.CullMode">
- </member>
- <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" brief="" enum="SpatialMaterial.DepthDrawMode">
- </member>
- <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" brief="" enum="SpatialMaterial.DiffuseMode">
- </member>
- <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" brief="">
- </member>
- <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow" brief="">
- </member>
- <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" brief="">
- </member>
- <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" brief="">
- </member>
- <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" brief="" enum="SpatialMaterial.SpecularMode">
- </member>
- <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames" brief="">
- </member>
- <member name="particles_anim_loop" type="int" setter="set_particles_anim_loop" getter="get_particles_anim_loop" brief="">
- </member>
- <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames" brief="">
- </member>
- <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction" brief="">
- </member>
- <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="rim" type="float" setter="set_rim" getter="get_rim" brief="">
- </member>
- <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint" brief="">
- </member>
- <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" brief="">
- </member>
- <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
- </member>
- <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" brief="">
- </member>
- <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission" brief="">
- </member>
- <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
- </member>
- <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" brief="">
- </member>
- <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" brief="">
- </member>
- <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" brief="">
- </member>
- <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" brief="">
- </member>
- <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" brief="">
- </member>
- <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" brief="">
- </member>
- <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
- </members>
- <constants>
- <constant name="TEXTURE_ALBEDO" value="0">
- </constant>
- <constant name="TEXTURE_METALLIC" value="1">
- </constant>
- <constant name="TEXTURE_ROUGHNESS" value="2">
- </constant>
- <constant name="TEXTURE_EMISSION" value="3">
- </constant>
- <constant name="TEXTURE_NORMAL" value="4">
- </constant>
- <constant name="TEXTURE_RIM" value="5">
- </constant>
- <constant name="TEXTURE_CLEARCOAT" value="6">
- </constant>
- <constant name="TEXTURE_FLOWMAP" value="7">
- </constant>
- <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8">
- </constant>
- <constant name="TEXTURE_DEPTH" value="9">
- </constant>
- <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10">
- </constant>
- <constant name="TEXTURE_TRANSMISSION" value="11">
- </constant>
- <constant name="TEXTURE_REFRACTION" value="12">
- </constant>
- <constant name="TEXTURE_DETAIL_MASK" value="13">
- </constant>
- <constant name="TEXTURE_DETAIL_ALBEDO" value="14">
- </constant>
- <constant name="TEXTURE_DETAIL_NORMAL" value="15">
- </constant>
- <constant name="TEXTURE_MAX" value="16">
- </constant>
- <constant name="DETAIL_UV_1" value="0">
- </constant>
- <constant name="DETAIL_UV_2" value="1">
- </constant>
- <constant name="FEATURE_TRANSPARENT" value="0">
- </constant>
- <constant name="FEATURE_EMISSION" value="1">
- </constant>
- <constant name="FEATURE_NORMAL_MAPPING" value="2">
- </constant>
- <constant name="FEATURE_RIM" value="3">
- </constant>
- <constant name="FEATURE_CLEARCOAT" value="4">
- </constant>
- <constant name="FEATURE_ANISOTROPY" value="5">
- </constant>
- <constant name="FEATURE_AMBIENT_OCCLUSION" value="6">
- </constant>
- <constant name="FEATURE_DEPTH_MAPPING" value="7">
- </constant>
- <constant name="FEATURE_SUBSURACE_SCATTERING" value="8">
- </constant>
- <constant name="FEATURE_TRANSMISSION" value="9">
- </constant>
- <constant name="FEATURE_REFRACTION" value="10">
- </constant>
- <constant name="FEATURE_DETAIL" value="11">
- </constant>
- <constant name="FEATURE_MAX" value="12">
- </constant>
- <constant name="BLEND_MODE_MIX" value="0">
- </constant>
- <constant name="BLEND_MODE_ADD" value="1">
- </constant>
- <constant name="BLEND_MODE_SUB" value="2">
- </constant>
- <constant name="BLEND_MODE_MUL" value="3">
- </constant>
- <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0">
- </constant>
- <constant name="DEPTH_DRAW_ALWAYS" value="1">
- </constant>
- <constant name="DEPTH_DRAW_DISABLED" value="2">
- </constant>
- <constant name="DEPTH_DRAW_ALPHA_OPAQUE_PREPASS" value="3">
- </constant>
- <constant name="CULL_BACK" value="0">
- </constant>
- <constant name="CULL_FRONT" value="1">
- </constant>
- <constant name="CULL_DISABLED" value="2">
- </constant>
- <constant name="FLAG_UNSHADED" value="0">
- </constant>
- <constant name="FLAG_USE_VERTEX_LIGHTING" value="1">
- </constant>
- <constant name="FLAG_DISABLE_DEPTH_TEST" value="2">
- </constant>
- <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3">
- </constant>
- <constant name="FLAG_SRGB_VERTEX_COLOR" value="4">
- </constant>
- <constant name="FLAG_USE_POINT_SIZE" value="5">
- </constant>
- <constant name="FLAG_FIXED_SIZE" value="6">
- </constant>
- <constant name="FLAG_UV1_USE_TRIPLANAR" value="7">
- </constant>
- <constant name="FLAG_UV2_USE_TRIPLANAR" value="8">
- </constant>
- <constant name="FLAG_AO_ON_UV2" value="10">
- </constant>
- <constant name="FLAG_USE_ALPHA_SCISSOR" value="11">
- </constant>
- <constant name="FLAG_TRIPLANAR_USE_WORLD" value="9">
- </constant>
- <constant name="FLAG_MAX" value="12">
- </constant>
- <constant name="DIFFUSE_LAMBERT" value="0">
- </constant>
- <constant name="DIFFUSE_LAMBERT_WRAP" value="1">
- </constant>
- <constant name="DIFFUSE_OREN_NAYAR" value="2">
- </constant>
- <constant name="DIFFUSE_BURLEY" value="3">
- </constant>
- <constant name="DIFFUSE_TOON" value="4">
- </constant>
- <constant name="SPECULAR_SCHLICK_GGX" value="0">
- </constant>
- <constant name="SPECULAR_BLINN" value="1">
- </constant>
- <constant name="SPECULAR_PHONG" value="2">
- </constant>
- <constant name="SPECULAR_TOON" value="3">
- </constant>
- <constant name="SPECULAR_DISABLED" value="4">
- </constant>
- <constant name="BILLBOARD_DISABLED" value="0">
- </constant>
- <constant name="BILLBOARD_ENABLED" value="1">
- </constant>
- <constant name="BILLBOARD_FIXED_Y" value="2">
- </constant>
- <constant name="BILLBOARD_PARTICLES" value="3">
- </constant>
- <constant name="TEXTURE_CHANNEL_RED" value="0">
- </constant>
- <constant name="TEXTURE_CHANNEL_GREEN" value="1">
- </constant>
- <constant name="TEXTURE_CHANNEL_BLUE" value="2">
- </constant>
- <constant name="TEXTURE_CHANNEL_ALPHA" value="3">
- </constant>
- <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4">
- </constant>
- </constants>
-</class>
-<class name="SpatialVelocityTracker" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_tracked_linear_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="is_tracking_fixed_step" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="reset">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_track_fixed_step">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="update_position">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SphereMesh" inherits="PrimitiveMesh" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_height" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_is_hemisphere" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radial_segments" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rings" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_height">
- <return type="void">
- </return>
- <argument index="0" name="height" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_is_hemisphere">
- <return type="void">
- </return>
- <argument index="0" name="is_hemisphere" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radial_segments">
- <return type="void">
- </return>
- <argument index="0" name="radial_segments" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rings">
- <return type="void">
- </return>
- <argument index="0" name="rings" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="height" type="float" setter="set_height" getter="get_height" brief="">
- </member>
- <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" brief="">
- </member>
- <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
- </member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- <member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="SphereShape" inherits="Shape" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="SpinBox" inherits="Range" category="Core">
- <brief_description>
- Numerical input text field.
- </brief_description>
- <description>
- SpinBox is a numerical input text field. It allows entering integers and floats.
- </description>
- <methods>
- <method name="get_line_edit">
- <return type="LineEdit">
- </return>
- <description>
- </description>
- </method>
- <method name="get_prefix" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_suffix" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the specific suffix.
- </description>
- </method>
- <method name="is_editable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if the spinbox is editable.
- </description>
- </method>
- <method name="set_editable">
- <return type="void">
- </return>
- <argument index="0" name="editable" type="bool">
- </argument>
- <description>
- Set whether the spinbox is editable.
- </description>
- </method>
- <method name="set_prefix">
- <return type="void">
- </return>
- <argument index="0" name="prefix" type="String">
- </argument>
- <description>
- Set a prefix.
- </description>
- </method>
- <method name="set_suffix">
- <return type="void">
- </return>
- <argument index="0" name="suffix" type="String">
- </argument>
- <description>
- Set a specific suffix.
- </description>
- </method>
- </methods>
- <members>
- <member name="editable" type="bool" setter="set_editable" getter="is_editable" brief="">
- </member>
- <member name="prefix" type="String" setter="set_prefix" getter="get_prefix" brief="">
- </member>
- <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" brief="">
- </member>
- </members>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="updown" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="SplitContainer" inherits="Container" category="Core">
- <brief_description>
- Container for splitting and adjusting.
- </brief_description>
- <description>
- Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
- </description>
- <methods>
- <method name="get_dragger_visibility" qualifiers="const">
- <return type="int" enum="SplitContainer.DraggerVisibility">
- </return>
- <description>
- Return visibility of the split dragger (one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
- </description>
- </method>
- <method name="get_split_offset" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the split offset.
- </description>
- </method>
- <method name="is_collapsed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the split is collapsed.
- </description>
- </method>
- <method name="set_collapsed">
- <return type="void">
- </return>
- <argument index="0" name="collapsed" type="bool">
- </argument>
- <description>
- Set if the split must be collapsed.
- </description>
- </method>
- <method name="set_dragger_visibility">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="SplitContainer.DraggerVisibility">
- </argument>
- <description>
- Set visibility of the split dragger ([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
- </description>
- </method>
- <method name="set_split_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="int">
- </argument>
- <description>
- Set the split offset.
- </description>
- </method>
- </methods>
- <members>
- <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" brief="">
- </member>
- <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" brief="" enum="SplitContainer.DraggerVisibility">
- </member>
- <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" brief="">
- </member>
- </members>
- <signals>
- <signal name="dragged">
- <argument index="0" name="offset" type="int">
- </argument>
- <description>
- Emitted when the dragger is dragged by user.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="DRAGGER_VISIBLE" value="0">
- The split dragger is visible.
- </constant>
- <constant name="DRAGGER_HIDDEN" value="1">
- The split dragger is invisible.
- </constant>
- <constant name="DRAGGER_HIDDEN_COLLAPSED" value="2">
- The split dragger is invisible and collapsed.
- </constant>
- </constants>
-</class>
-<class name="SpotLight" inherits="Light" category="Core">
- <brief_description>
- Spotlight [Light], such as a reflector spotlight or a lantern.
- </brief_description>
- <description>
- A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
- </description>
- <methods>
- </methods>
- <members>
- <member name="spot_angle" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="spot_attenuation" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- <member name="spot_range" type="float" setter="set_param" getter="get_param" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Sprite" inherits="Node2D" category="Core">
- <brief_description>
- General purpose Sprite node.
- </brief_description>
- <description>
- General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas.
- </description>
- <methods>
- <method name="get_frame" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
- </description>
- </method>
- <method name="get_hframes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of horizontal frames. See [method set_hframes].
- </description>
- </method>
- <method name="get_normal_map" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return sprite draw offset.
- </description>
- </method>
- <method name="get_region_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return the region rect to read from.
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- Return the base texture for the sprite.
- </description>
- </method>
- <method name="get_vframes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of vertical frames. See [method set_vframes].
- </description>
- </method>
- <method name="is_centered" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if the sprite is centered at the local origin.
- </description>
- </method>
- <method name="is_flipped_h" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the sprite is flipped horizontally.
- </description>
- </method>
- <method name="is_flipped_v" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the sprite is flipped vertically.
- </description>
- </method>
- <method name="is_region" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if the sprite reads from a region.
- </description>
- </method>
- <method name="is_region_filter_clip_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_centered">
- <return type="void">
- </return>
- <argument index="0" name="centered" type="bool">
- </argument>
- <description>
- Set whether the sprite should be centered on the origin.
- </description>
- </method>
- <method name="set_flip_h">
- <return type="void">
- </return>
- <argument index="0" name="flip_h" type="bool">
- </argument>
- <description>
- Set true to flip the sprite horizontally.
- </description>
- </method>
- <method name="set_flip_v">
- <return type="void">
- </return>
- <argument index="0" name="flip_v" type="bool">
- </argument>
- <description>
- Set true to flip the sprite vertically.
- </description>
- </method>
- <method name="set_frame">
- <return type="void">
- </return>
- <argument index="0" name="frame" type="int">
- </argument>
- <description>
- Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
- </description>
- </method>
- <method name="set_hframes">
- <return type="void">
- </return>
- <argument index="0" name="hframes" type="int">
- </argument>
- <description>
- Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation.
- </description>
- </method>
- <method name="set_normal_map">
- <return type="void">
- </return>
- <argument index="0" name="normal_map" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- Set the sprite draw offset, useful for setting rotation pivots.
- </description>
- </method>
- <method name="set_region">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases.
- </description>
- </method>
- <method name="set_region_filter_clip">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- Set the region rect to read from.
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- Set the base texture for the sprite.
- </description>
- </method>
- <method name="set_vframes">
- <return type="void">
- </return>
- <argument index="0" name="vframes" type="int">
- </argument>
- <description>
- Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation.
- </description>
- </method>
- </methods>
- <members>
- <member name="centered" type="bool" setter="set_centered" getter="is_centered" brief="">
- </member>
- <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" brief="">
- </member>
- <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" brief="">
- </member>
- <member name="frame" type="int" setter="set_frame" getter="get_frame" brief="">
- </member>
- <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" brief="">
- </member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="region_enabled" type="bool" setter="set_region" getter="is_region" brief="">
- </member>
- <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled" brief="">
- </member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" brief="">
- </member>
- </members>
- <signals>
- <signal name="frame_changed">
- <description>
- </description>
- </signal>
- <signal name="texture_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Sprite3D" inherits="SpriteBase3D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_frame" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_hframes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_region_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vframes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_region" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_frame">
- <return type="void">
- </return>
- <argument index="0" name="frame" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hframes">
- <return type="void">
- </return>
- <argument index="0" name="hframes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_vframes">
- <return type="void">
- </return>
- <argument index="0" name="vframes" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="frame" type="int" setter="set_frame" getter="get_frame" brief="">
- </member>
- <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" brief="">
- </member>
- <member name="region_enabled" type="bool" setter="set_region" getter="is_region" brief="">
- </member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" brief="">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" brief="">
- </member>
- </members>
- <signals>
- <signal name="frame_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="SpriteBase3D" inherits="GeometryInstance" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_alpha_cut_mode" qualifiers="const">
- <return type="int" enum="SpriteBase3D.AlphaCutMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_axis" qualifiers="const">
- <return type="int" enum="Vector3.Axis">
- </return>
- <description>
- </description>
- </method>
- <method name="get_draw_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_modulate" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_opacity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pixel_size" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_centered" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_flipped_h" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_flipped_v" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_alpha_cut_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="SpriteBase3D.AlphaCutMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_axis">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="Vector3.Axis">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_centered">
- <return type="void">
- </return>
- <argument index="0" name="centered" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flip_h">
- <return type="void">
- </return>
- <argument index="0" name="flip_h" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flip_v">
- <return type="void">
- </return>
- <argument index="0" name="flip_v" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="modulate" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_opacity">
- <return type="void">
- </return>
- <argument index="0" name="opacity" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pixel_size">
- <return type="void">
- </return>
- <argument index="0" name="pixel_size" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" brief="" enum="SpriteBase3D.AlphaCutMode">
- </member>
- <member name="axis" type="int" setter="set_axis" getter="get_axis" brief="" enum="Vector3.Axis">
- </member>
- <member name="centered" type="bool" setter="set_centered" getter="is_centered" brief="">
- </member>
- <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" brief="">
- </member>
- <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" brief="">
- </member>
- <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" brief="">
- </member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" brief="">
- </member>
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" brief="">
- </member>
- <member name="opacity" type="float" setter="set_opacity" getter="get_opacity" brief="">
- </member>
- <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" brief="">
- </member>
- <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" brief="">
- </member>
- <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag" brief="">
- </member>
- </members>
- <constants>
- <constant name="FLAG_TRANSPARENT" value="0">
- </constant>
- <constant name="FLAG_SHADED" value="1">
- </constant>
- <constant name="FLAG_DOUBLE_SIDED" value="2">
- </constant>
- <constant name="FLAG_MAX" value="3">
- </constant>
- <constant name="ALPHA_CUT_DISABLED" value="0">
- </constant>
- <constant name="ALPHA_CUT_DISCARD" value="1">
- </constant>
- <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2">
- </constant>
- </constants>
-</class>
-<class name="SpriteFrames" inherits="Resource" category="Core">
- <brief_description>
- Sprite frame library for AnimatedSprite.
- </brief_description>
- <description>
- Sprite frame library for [AnimatedSprite].
- </description>
- <methods>
- <method name="add_animation">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_frame">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="frame" type="Texture">
- </argument>
- <argument index="2" name="atpos" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_all">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_animation_loop" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_animation_speed" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_frame" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_frame_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_animation" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_animation">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_frame">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="rename_animation">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="newname" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_animation_loop">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="loop" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_animation_speed">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="speed" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_frame">
- <return type="void">
- </return>
- <argument index="0" name="anim" type="String">
- </argument>
- <argument index="1" name="idx" type="int">
- </argument>
- <argument index="2" name="txt" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="animations" type="Array" setter="_set_animations" getter="_get_animations" brief="">
- </member>
- <member name="frames" type="Array" setter="_set_frames" getter="_get_frames" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="StaticBody" inherits="PhysicsBody" category="Core">
- <brief_description>
- Static body for 3D Physics.
- </brief_description>
- <description>
- Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- </description>
- <methods>
- <method name="get_bounce" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body bounciness.
- </description>
- </method>
- <method name="get_constant_angular_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the constant angular velocity for the body.
- </description>
- </method>
- <method name="get_constant_linear_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Return the constant linear velocity for the body.
- </description>
- </method>
- <method name="get_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body friction.
- </description>
- </method>
- <method name="set_bounce">
- <return type="void">
- </return>
- <argument index="0" name="bounce" type="float">
- </argument>
- <description>
- Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
- </description>
- </method>
- <method name="set_constant_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="vel" type="Vector3">
- </argument>
- <description>
- Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
- </description>
- </method>
- <method name="set_constant_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="vel" type="Vector3">
- </argument>
- <description>
- Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
- </description>
- </method>
- <method name="set_friction">
- <return type="void">
- </return>
- <argument index="0" name="friction" type="float">
- </argument>
- <description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
- </description>
- </method>
- </methods>
- <members>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
- </member>
- <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" brief="">
- </member>
- <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" brief="">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core">
- <brief_description>
- Static body for 2D Physics.
- </brief_description>
- <description>
- Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- </description>
- <methods>
- <method name="get_bounce" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body bounciness.
- </description>
- </method>
- <method name="get_constant_angular_velocity" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the constant angular velocity for the body.
- </description>
- </method>
- <method name="get_constant_linear_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the constant linear velocity for the body.
- </description>
- </method>
- <method name="get_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the body friction.
- </description>
- </method>
- <method name="set_bounce">
- <return type="void">
- </return>
- <argument index="0" name="bounce" type="float">
- </argument>
- <description>
- Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
- </description>
- </method>
- <method name="set_constant_angular_velocity">
- <return type="void">
- </return>
- <argument index="0" name="vel" type="float">
- </argument>
- <description>
- Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
- </description>
- </method>
- <method name="set_constant_linear_velocity">
- <return type="void">
- </return>
- <argument index="0" name="vel" type="Vector2">
- </argument>
- <description>
- Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
- </description>
- </method>
- <method name="set_friction">
- <return type="void">
- </return>
- <argument index="0" name="friction" type="float">
- </argument>
- <description>
- Set the body friction, from 0 (frictionless) to 1 (full friction).
- </description>
- </method>
- </methods>
- <members>
- <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
- </member>
- <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" brief="">
- </member>
- <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" brief="">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="StreamPeer" inherits="Reference" category="Core">
- <brief_description>
- Abstraction and base class for stream-based protocols.
- </brief_description>
- <description>
- StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings.
- </description>
- <methods>
- <method name="get_16">
- <return type="int">
- </return>
- <description>
- Get a signed 16 bit value from the stream.
- </description>
- </method>
- <method name="get_32">
- <return type="int">
- </return>
- <description>
- Get a signed 32 bit value from the stream.
- </description>
- </method>
- <method name="get_64">
- <return type="int">
- </return>
- <description>
- Get a signed 64 bit value from the stream.
- </description>
- </method>
- <method name="get_8">
- <return type="int">
- </return>
- <description>
- Get a signed byte from the stream.
- </description>
- </method>
- <method name="get_available_bytes" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of bytes this [StreamPeer] has available.
- </description>
- </method>
- <method name="get_data">
- <return type="Array">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array.
- </description>
- </method>
- <method name="get_double">
- <return type="float">
- </return>
- <description>
- Get a double-precision float from the stream.
- </description>
- </method>
- <method name="get_float">
- <return type="float">
- </return>
- <description>
- Get a single-precision float from the stream.
- </description>
- </method>
- <method name="get_partial_data">
- <return type="Array">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array.
- </description>
- </method>
- <method name="get_string">
- <return type="String">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Get a string with byte-length "bytes" from the stream.
- </description>
- </method>
- <method name="get_u16">
- <return type="int">
- </return>
- <description>
- Get an unsigned 16 bit value from the stream.
- </description>
- </method>
- <method name="get_u32">
- <return type="int">
- </return>
- <description>
- Get an unsigned 32 bit value from the stream.
- </description>
- </method>
- <method name="get_u64">
- <return type="int">
- </return>
- <description>
- Get an unsigned 16 bit value from the stream.
- </description>
- </method>
- <method name="get_u8">
- <return type="int">
- </return>
- <description>
- Get an unsigned byte from the stream.
- </description>
- </method>
- <method name="get_utf8_string">
- <return type="String">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
- </description>
- </method>
- <method name="get_var">
- <return type="Variant">
- </return>
- <description>
- Get a Variant from the stream.
- </description>
- </method>
- <method name="is_big_endian_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether this [StreamPeer] is using big-endian format.
- </description>
- </method>
- <method name="put_16">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put a signed 16 bit value into the stream.
- </description>
- </method>
- <method name="put_32">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put a signed 32 bit value into the stream.
- </description>
- </method>
- <method name="put_64">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put a signed 64 bit value into the stream.
- </description>
- </method>
- <method name="put_8">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put a signed byte into the stream.
- </description>
- </method>
- <method name="put_data">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code.
- </description>
- </method>
- <method name="put_double">
- <return type="void">
- </return>
- <argument index="0" name="val" type="float">
- </argument>
- <description>
- Put a double-precision float into the stream.
- </description>
- </method>
- <method name="put_float">
- <return type="void">
- </return>
- <argument index="0" name="val" type="float">
- </argument>
- <description>
- Put a single-precision float into the stream.
- </description>
- </method>
- <method name="put_partial_data">
- <return type="Array">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent.
- </description>
- </method>
- <method name="put_u16">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put an unsigned 16 bit value into the stream.
- </description>
- </method>
- <method name="put_u32">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put an unsigned 32 bit value into the stream.
- </description>
- </method>
- <method name="put_u64">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put an unsigned 64 bit value into the stream.
- </description>
- </method>
- <method name="put_u8">
- <return type="void">
- </return>
- <argument index="0" name="val" type="int">
- </argument>
- <description>
- Put an unsigned byte into the stream.
- </description>
- </method>
- <method name="put_utf8_string">
- <return type="void">
- </return>
- <argument index="0" name="val" type="String">
- </argument>
- <description>
- Put a zero-terminated utf8 string into the stream.
- </description>
- </method>
- <method name="put_var">
- <return type="void">
- </return>
- <argument index="0" name="val" type="Variant">
- </argument>
- <description>
- Put a Variant into the stream.
- </description>
- </method>
- <method name="set_big_endian">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set this [StreamPeer] to use big-endian format. Default is false.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="duplicate" qualifiers="const">
- <return type="StreamPeerBuffer">
- </return>
- <description>
- </description>
- </method>
- <method name="get_data_array" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="resize">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="seek">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_data_array">
- <return type="void">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StreamPeerSSL" inherits="StreamPeer" category="Core">
- <brief_description>
- SSL Stream peer.
- </brief_description>
- <description>
- SSL Stream peer. This object can be used to connect to SSL servers.
- </description>
- <methods>
- <method name="accept_stream">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="stream" type="StreamPeer">
- </argument>
- <description>
- </description>
- </method>
- <method name="connect_to_stream">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="stream" type="StreamPeer">
- </argument>
- <argument index="1" name="validate_certs" type="bool" default="false">
- </argument>
- <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
- </description>
- </method>
- <method name="disconnect_from_stream">
- <return type="void">
- </return>
- <description>
- Disconnect from host.
- </description>
- </method>
- <method name="get_status" qualifiers="const">
- <return type="int" enum="StreamPeerSSL.Status">
- </return>
- <description>
- Return the status of the connection, one of STATUS_* enum.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="STATUS_DISCONNECTED" value="0">
- A status representing a [StreamPeerSSL] that is disconnected.
- </constant>
- <constant name="STATUS_CONNECTED" value="1">
- A status representing a [StreamPeerSSL] that is connected to a host.
- </constant>
- <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
- An errot status that shows the peer did not present a SSL certificate and validation was requested.
- </constant>
- <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3">
- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
- </constant>
- </constants>
-</class>
-<class name="StreamPeerTCP" inherits="StreamPeer" category="Core">
- <brief_description>
- TCP Stream peer.
- </brief_description>
- <description>
- TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server.
- </description>
- <methods>
- <method name="connect_to_host">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="port" type="int">
- </argument>
- <description>
- Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [OK] on success or [FAILED] on failure.
- </description>
- </method>
- <method name="disconnect_from_host">
- <return type="void">
- </return>
- <description>
- Disconnect from host.
- </description>
- </method>
- <method name="get_connected_host" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the IP of this peer.
- </description>
- </method>
- <method name="get_connected_port" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the port of this peer.
- </description>
- </method>
- <method name="get_status" qualifiers="const">
- <return type="int" enum="StreamPeerTCP.Status">
- </return>
- <description>
- Return the status of the connection, one of STATUS_* enum.
- </description>
- </method>
- <method name="is_connected_to_host" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="STATUS_NONE" value="0">
- The initial status of the [StreamPeerTCP], also the status after a disconnect.
- </constant>
- <constant name="STATUS_CONNECTING" value="1">
- A status representing a [StreamPeerTCP] that is connecting to a host.
- </constant>
- <constant name="STATUS_CONNECTED" value="2">
- A status representing a [StreamPeerTCP] that is connected to a host.
- </constant>
- <constant name="STATUS_ERROR" value="3">
- A staus representing a [StreamPeerTCP] in error state.
- </constant>
- </constants>
-</class>
-<class name="StreamTexture" inherits="Texture" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_load_path" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="load">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="load_path" type="String" setter="load" getter="get_load_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="String" category="Built-In Types">
- <brief_description>
- Built-in string class.
- </brief_description>
- <description>
- This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
- </description>
- <methods>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Quat">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Basis">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolIntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolRealArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolStringArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="String">
- <return type="String">
- </return>
- <argument index="0" name="from" type="PoolColorArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="begins_with">
- <return type="bool">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Return true if the strings 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.
- </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.
- </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.
- </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].
- </description>
- </method>
- <method name="casecmp_to">
- <return type="int">
- </return>
- <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.
- </description>
- </method>
- <method name="empty">
- <return type="bool">
- </return>
- <description>
- Return true if the string is empty.
- </description>
- </method>
- <method name="ends_with">
- <return type="bool">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Return true if the strings ends with the given string.
- </description>
- </method>
- <method name="erase">
- <argument index="0" name="pos" type="int">
- </argument>
- <argument index="1" name="chars" type="int">
- </argument>
- <description>
- Erase [code]chars[/code] characters from the string starting from [code]pos[/code].
- </description>
- </method>
- <method name="find">
- <return type="int">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <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.
- </description>
- </method>
- <method name="find_last">
- <return type="int">
- </return>
- <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.
- </description>
- </method>
- <method name="findn">
- <return type="int">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <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.
- </description>
- </method>
- <method name="format">
- <return type="String">
- </return>
- <argument index="0" name="values" type="var">
- </argument>
- <argument index="1" name="placeholder" type="String" default="{_}">
- </argument>
- <description>
- </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.
- </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.
- </description>
- </method>
- <method name="get_extension">
- <return type="String">
- </return>
- <description>
- If the string is a path to a file, return 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.
- </description>
- </method>
- <method name="hash">
- <return type="int">
- </return>
- <description>
- Hash the string and return a 32 bits integer.
- </description>
- </method>
- <method name="hex_to_int">
- <return type="int">
- </return>
- <description>
- Convert a string containing a hexadecimal number into an int.
- </description>
- </method>
- <method name="insert">
- <return type="String">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <argument index="1" name="what" type="String">
- </argument>
- <description>
- Insert 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.
- </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.
- </description>
- </method>
- <method name="is_subsequence_of">
- <return type="bool">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Check whether this string is a subsequence of the given string.
- </description>
- </method>
- <method name="is_subsequence_ofi">
- <return type="bool">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Check whether 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.
- </description>
- </method>
- <method name="is_valid_html_color">
- <return type="bool">
- </return>
- <description>
- Check whether the 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.
- </description>
- </method>
- <method name="is_valid_integer">
- <return type="bool">
- </return>
- <description>
- Check whether the 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.
- </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.
- </description>
- </method>
- <method name="left">
- <return type="String">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Return an amount 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.
- </description>
- </method>
- <method name="match">
- <return type="bool">
- </return>
- <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 '.'.
- </description>
- </method>
- <method name="matchn">
- <return type="bool">
- </return>
- <argument index="0" name="expr" type="String">
- </argument>
- <description>
- Do 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.
- </description>
- </method>
- <method name="md5_text">
- <return type="String">
- </return>
- <description>
- Return the MD5 hash of the string as a string.
- </description>
- </method>
- <method name="nocasecmp_to">
- <return type="int">
- </return>
- <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.
- </description>
- </method>
- <method name="ord_at">
- <return type="int">
- </return>
- <argument index="0" name="at" type="int">
- </argument>
- <description>
- Return the character code at position [code]at[/code].
- </description>
- </method>
- <method name="pad_decimals">
- <return type="String">
- </return>
- <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.
- </description>
- </method>
- <method name="pad_zeros">
- <return type="String">
- </return>
- <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.
- </description>
- </method>
- <method name="percent_decode">
- <return type="String">
- </return>
- <description>
- Decode a percent-encoded string. See [method percent_encode].
- </description>
- </method>
- <method name="percent_encode">
- <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.
- </description>
- </method>
- <method name="plus_file">
- <return type="String">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
- </description>
- </method>
- <method name="replace">
- <return type="String">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <argument index="1" name="forwhat" type="String">
- </argument>
- <description>
- Replace occurrences of a substring for different ones inside the string.
- </description>
- </method>
- <method name="replacen">
- <return type="String">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <argument index="1" name="forwhat" type="String">
- </argument>
- <description>
- Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
- </description>
- </method>
- <method name="rfind">
- <return type="int">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <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.
- </description>
- </method>
- <method name="rfindn">
- <return type="int">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <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.
- </description>
- </method>
- <method name="right">
- <return type="String">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Return the right side of the string from a given position.
- </description>
- </method>
- <method name="sha256_buffer">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="sha256_text">
- <return type="String">
- </return>
- <description>
- Return the SHA-256 hash of the string as a string.
- </description>
- </method>
- <method name="similarity">
- <return type="float">
- </return>
- <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.
- </description>
- </method>
- <method name="split">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="divisor" type="String">
- </argument>
- <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 ",".
- </description>
- </method>
- <method name="split_floats">
- <return type="PoolRealArray">
- </return>
- <argument index="0" name="divisor" type="String">
- </argument>
- <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 ",".
- </description>
- </method>
- <method name="strip_edges">
- <return type="String">
- </return>
- <argument index="0" name="left" type="bool" default="True">
- </argument>
- <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.
- </description>
- </method>
- <method name="substr">
- <return type="String">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <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].
- </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.
- </description>
- </method>
- <method name="to_float">
- <return type="float">
- </return>
- <description>
- Convert 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].
- </description>
- </method>
- <method name="to_lower">
- <return type="String">
- </return>
- <description>
- Return the string converted to lowercase.
- </description>
- </method>
- <method name="to_upper">
- <return type="String">
- </return>
- <description>
- Return 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().
- </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.
- </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.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBox" inherits="Resource" category="Core">
- <brief_description>
- Base class for drawing stylized boxes for the UI.
- </brief_description>
- <description>
- StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below.
- </description>
- <methods>
- <method name="draw" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_center_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
- </description>
- </method>
- <method name="get_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return the offset of margin "margin" (see MARGIN_* enum).
- </description>
- </method>
- <method name="get_minimum_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the minimum size that this stylebox can be shrunk to.
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code].
- </description>
- </method>
- <method name="set_default_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="offset" type="float">
- </argument>
- <description>
- Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
- </description>
- </method>
- <method name="test_mask" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- Test a position in a rectangle, return whether it passes the mask test.
- </description>
- </method>
- </methods>
- <members>
- <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin" brief="">
- </member>
- <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin" brief="">
- </member>
- <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin" brief="">
- </member>
- <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxEmpty" inherits="StyleBox" category="Core">
- <brief_description>
- Empty stylebox (does not display anything).
- </brief_description>
- <description>
- Empty stylebox (really does not display anything).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxFlat" inherits="StyleBox" category="Core">
- <brief_description>
- Customizable Stylebox with a given set of parameters. (no texture required)
- </brief_description>
- <description>
- This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
- - Color
- - Border width (individual width for each border)
- - Rounded corners (individual radius for each corner)
- - Shadow
- About corner radius:
- Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
- [codeblock]
- height = 30
- corner_radius_top_left = 50
- corner_raidus_bottom_left = 100
- [/codeblock]
- The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result:
- [codeblock]
- corner_radius_top_left: 10
- corner_raidus_bottom_left: 20
- [/codeblock]
- </description>
- <methods>
- <method name="get_aa_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bg_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_border_blend" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_border_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_border_width" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_border_width_min" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_corner_detail" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_corner_radius" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="corner" type="int" enum="Corner">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_expand_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shadow_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shadow_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_anti_aliased" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_draw_center_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_aa_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_anti_aliased">
- <return type="void">
- </return>
- <argument index="0" name="anti_aliased" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bg_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_border_blend">
- <return type="void">
- </return>
- <argument index="0" name="blend" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_border_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_border_width">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="width" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_border_width_all">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_corner_detail">
- <return type="void">
- </return>
- <argument index="0" name="detail" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_corner_radius">
- <return type="void">
- </return>
- <argument index="0" name="corner" type="int" enum="Corner">
- </argument>
- <argument index="1" name="radius" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_corner_radius_all">
- <return type="void">
- </return>
- <argument index="0" name="radius" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_corner_radius_individual">
- <return type="void">
- </return>
- <argument index="0" name="radius_top_left" type="int">
- </argument>
- <argument index="1" name="radius_top_right" type="int">
- </argument>
- <argument index="2" name="radius_botton_right" type="int">
- </argument>
- <argument index="3" name="radius_bottom_left" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_center">
- <return type="void">
- </return>
- <argument index="0" name="draw_center" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_all">
- <return type="void">
- </return>
- <argument index="0" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_individual">
- <return type="void">
- </return>
- <argument index="0" name="size_left" type="float">
- </argument>
- <argument index="1" name="size_top" type="float">
- </argument>
- <argument index="2" name="size_right" type="float">
- </argument>
- <argument index="3" name="size_bottom" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" brief="">
- Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticable when using rounded corners.
- </member>
- <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" brief="">
- This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
- </member>
- <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" brief="">
- The background color of the stylebox.
- </member>
- <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" brief="">
- When set to true, the border will fade into the background color.
- </member>
- <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" brief="">
- Sets the color of the border.
- </member>
- <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" brief="">
- Border width for the bottom border.
- </member>
- <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width" brief="">
- Border width for the left border.
- </member>
- <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width" brief="">
- Border width for the right border.
- </member>
- <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width" brief="">
- Border width for the top border.
- </member>
- <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" brief="">
- This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account.
- For corner radius smaller than 10: 4-5 should be enough
- For corner radius smaller than 30: 8-12 should be enough ...
- </member>
- <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
- The corner radius of the bottom left corner. When set to 0 the corner is not rounded.
- </member>
- <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
- The corner radius of the bottom right corner. When set to 0 the corner is not rounded.
- </member>
- <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
- The corner radius of the top left corner. When set to 0 the corner is not rounded.
- </member>
- <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
- The corner radius of the top right corner. When set to 0 the corner is not rounded.
- </member>
- <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
- Toggels drawing of the inner part of the stylebox.
- </member>
- <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
- Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect.
- </member>
- <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
- Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect.
- </member>
- <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
- Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect.
- </member>
- <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
- Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect.
- </member>
- <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" brief="">
- The color of the shadow. (This has no effect when shadow_size &lt; 1)
- </member>
- <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" brief="">
- The shadow size in pixels.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxTexture" inherits="StyleBox" category="Core">
- <brief_description>
- Texture Based 3x3 scale style.
- </brief_description>
- <description>
- Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
- </description>
- <methods>
- <method name="get_expand_margin_size" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_h_axis_stretch_mode" qualifiers="const">
- <return type="int" enum="StyleBoxTexture.AxisStretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_margin_size" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_modulate" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal_map" qualifiers="const">
- <return type="Resource">
- </return>
- <description>
- </description>
- </method>
- <method name="get_region_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Resource">
- </return>
- <description>
- </description>
- </method>
- <method name="get_v_axis_stretch_mode" qualifiers="const">
- <return type="int" enum="StyleBoxTexture.AxisStretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_draw_center_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_draw_center">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_all">
- <return type="void">
- </return>
- <argument index="0" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_individual">
- <return type="void">
- </return>
- <argument index="0" name="size_left" type="float">
- </argument>
- <argument index="1" name="size_top" type="float">
- </argument>
- <argument index="2" name="size_right" type="float">
- </argument>
- <argument index="3" name="size_bottom" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_size">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_h_axis_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_margin_size">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="size" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_modulate">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_normal_map">
- <return type="void">
- </return>
- <argument index="0" name="normal_map" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_region_rect">
- <return type="void">
- </return>
- <argument index="0" name="region" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_v_axis_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" brief="" enum="StyleBoxTexture.AxisStretchMode">
- </member>
- <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" brief="" enum="StyleBoxTexture.AxisStretchMode">
- </member>
- <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
- </member>
- <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" brief="">
- </member>
- <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" brief="">
- </member>
- <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" brief="">
- </member>
- <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" brief="">
- </member>
- <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size" brief="">
- </member>
- <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size" brief="">
- </member>
- <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size" brief="">
- </member>
- <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size" brief="">
- </member>
- <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" brief="">
- </member>
- <member name="normal_map" type="Resource" setter="set_normal_map" getter="get_normal_map" brief="">
- </member>
- <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" brief="">
- </member>
- <member name="texture" type="Resource" setter="set_texture" getter="get_texture" brief="">
- </member>
- </members>
- <signals>
- <signal name="texture_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
- </constant>
- <constant name="AXIS_STRETCH_MODE_TILE" value="1">
- </constant>
- <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
- </constant>
- </constants>
-</class>
-<class name="SurfaceTool" inherits="Reference" category="Core">
- <brief_description>
- Helper tool to create geometry.
- </brief_description>
- <description>
- The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
- [codeblock]
- var st = SurfaceTool.new()
- st.begin(Mesh.PRIMITIVE_TRIANGLES)
- st.add_color(Color(1, 0, 0))
- st.add_uv(Vector2(0, 0))
- st.add_vertex(Vector3(0, 0, 0))
- [/codeblock]
- The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
- It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh.
- </description>
- <methods>
- <method name="add_bones">
- <return type="void">
- </return>
- <argument index="0" name="bones" type="PoolIntArray">
- </argument>
- <description>
- Add an array of bones for the next Vertex to use.
- </description>
- </method>
- <method name="add_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Specify a [Color] for the next Vertex to use.
- </description>
- </method>
- <method name="add_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex.
- </description>
- </method>
- <method name="add_normal">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Specify a normal for the next Vertex to use.
- </description>
- </method>
- <method name="add_smooth_group">
- <return type="void">
- </return>
- <argument index="0" name="smooth" type="bool">
- </argument>
- <description>
- Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation.
- </description>
- </method>
- <method name="add_tangent">
- <return type="void">
- </return>
- <argument index="0" name="tangent" type="Plane">
- </argument>
- <description>
- Specify a Tangent for the next Vertex to use.
- </description>
- </method>
- <method name="add_to_format">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_triangle_fan">
- <return type="void">
- </return>
- <argument index="0" name="vertexes" type="PoolVector3Array">
- </argument>
- <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )">
- </argument>
- <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )">
- </argument>
- <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )">
- </argument>
- <argument index="5" name="tangents" type="Array" default="[ ]">
- </argument>
- <description>
- Insert a triangle fan made of array data into [Mesh] being constructed.
- </description>
- </method>
- <method name="add_uv">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- Specify UV Coordinate for next Vertex to use.
- </description>
- </method>
- <method name="add_uv2">
- <return type="void">
- </return>
- <argument index="0" name="uv2" type="Vector2">
- </argument>
- <description>
- Specify an optional second set of UV coordinates for next Vertex to use.
- </description>
- </method>
- <method name="add_vertex">
- <return type="void">
- </return>
- <argument index="0" name="vertex" type="Vector3">
- </argument>
- <description>
- Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
- </description>
- </method>
- <method name="add_weights">
- <return type="void">
- </return>
- <argument index="0" name="weights" type="PoolRealArray">
- </argument>
- <description>
- Specify weight value for next Vertex to use.
- </description>
- </method>
- <method name="append_from">
- <return type="void">
- </return>
- <argument index="0" name="existing" type="Mesh">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="begin">
- <return type="void">
- </return>
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
- </argument>
- <description>
- Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES).
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all information passed into the surface tool so far.
- </description>
- </method>
- <method name="commit">
- <return type="ArrayMesh">
- </return>
- <argument index="0" name="existing" type="ArrayMesh" default="null">
- </argument>
- <description>
- Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
- </description>
- </method>
- <method name="create_from">
- <return type="void">
- </return>
- <argument index="0" name="existing" type="Mesh">
- </argument>
- <argument index="1" name="surface" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="deindex">
- <return type="void">
- </return>
- <description>
- Removes index array by expanding Vertex array.
- </description>
- </method>
- <method name="generate_normals">
- <return type="void">
- </return>
- <description>
- Generates normals from Vertices so you do not have to do it manually.
- </description>
- </method>
- <method name="generate_tangents">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="index">
- <return type="void">
- </return>
- <description>
- Shrinks Vertex array by creating an index array. Avoids reusing Vertices.
- </description>
- </method>
- <method name="set_material">
- <return type="void">
- </return>
- <argument index="0" name="material" type="Material">
- </argument>
- <description>
- Sets [Material] to be used by the [Mesh] you are constructing.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TCP_Server" inherits="Reference" category="Core">
- <brief_description>
- TCP Server.
- </brief_description>
- <description>
- TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection.
- </description>
- <methods>
- <method name="is_connection_available" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if a connection is available for taking.
- </description>
- </method>
- <method name="listen">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="port" type="int">
- </argument>
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
- </argument>
- <description>
- Listen on the "port" binding to "bind_address".
- If "bind_address" is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6).
- If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type.
- If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- Stop listening.
- </description>
- </method>
- <method name="take_connection">
- <return type="StreamPeerTCP">
- </return>
- <description>
- If a connection is available, return a StreamPeerTCP with the connection/
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TabContainer" inherits="Control" category="Core">
- <brief_description>
- Tabbed Container.
- </brief_description>
- <description>
- Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
- Children controls of this one automatically.
- </description>
- <methods>
- <method name="are_tabs_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the tabs should be visible or hidden.
- </description>
- </method>
- <method name="get_current_tab" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the current tab index that is being shown.
- </description>
- </method>
- <method name="get_current_tab_control" qualifiers="const">
- <return type="Control">
- </return>
- <description>
- </description>
- </method>
- <method name="get_popup" qualifiers="const">
- <return type="Popup">
- </return>
- <description>
- </description>
- </method>
- <method name="get_previous_tab" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the previous tab index that was being shown.
- </description>
- </method>
- <method name="get_tab_align" qualifiers="const">
- <return type="int" enum="TabContainer.TabAlign">
- </return>
- <description>
- Return tab alignment, from the ALIGN_* enum.
- </description>
- </method>
- <method name="get_tab_control" qualifiers="const">
- <return type="Control">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the current tab control that is being shown.
- </description>
- </method>
- <method name="get_tab_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of tabs.
- </description>
- </method>
- <method name="get_tab_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_title" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
- </description>
- </method>
- <method name="set_current_tab">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- Bring a tab (and the Control it represents) to the front, and hide the rest.
- </description>
- </method>
- <method name="set_popup">
- <return type="void">
- </return>
- <argument index="0" name="popup" type="Node">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="TabContainer.TabAlign">
- </argument>
- <description>
- Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
- </description>
- </method>
- <method name="set_tab_disabled">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_icon">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Texture">
- </argument>
- <description>
- Set an icon for a tab.
- </description>
- </method>
- <method name="set_tab_title">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
- </description>
- </method>
- <method name="set_tabs_visible">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- Set whether the tabs should be visible or hidden.
- </description>
- </method>
- </methods>
- <members>
- <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" brief="">
- </member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" brief="" enum="TabContainer.TabAlign">
- </member>
- <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" brief="">
- </member>
- </members>
- <signals>
- <signal name="pre_popup_pressed">
- <description>
- </description>
- </signal>
- <signal name="tab_changed">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- Emitted only when the current tab changes.
- </description>
- </signal>
- <signal name="tab_selected">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- Emitted when a tab is being selected, even if it is the same tab.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="decrement" type="Texture">
- </theme_item>
- <theme_item name="decrement_highlight" type="Texture">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color_bg" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_fg" type="Color">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="increment" type="Texture">
- </theme_item>
- <theme_item name="increment_highlight" type="Texture">
- </theme_item>
- <theme_item name="label_valign_bg" type="int">
- </theme_item>
- <theme_item name="label_valign_fg" type="int">
- </theme_item>
- <theme_item name="menu" type="Texture">
- </theme_item>
- <theme_item name="menu_highlight" type="Texture">
- </theme_item>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="side_margin" type="int">
- </theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- </theme_item>
- <theme_item name="tab_fg" type="StyleBox">
- </theme_item>
- <theme_item name="top_margin" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="Tabs" inherits="Control" category="Core">
- <brief_description>
- Tabs Control.
- </brief_description>
- <description>
- Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children.
- </description>
- <methods>
- <method name="add_tab">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String" default="&quot;&quot;">
- </argument>
- <argument index="1" name="icon" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="ensure_tab_visible">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_current_tab" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tab_align" qualifiers="const">
- <return type="int" enum="Tabs.TabAlign">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tab_close_display_policy" qualifiers="const">
- <return type="int" enum="Tabs.CloseButtonDisplayPolicy">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tab_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_tab_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- Returns tab [Rect2] with local position and size.
- </description>
- </method>
- <method name="get_tab_title" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="move_tab">
- <return type="void">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <argument index="1" name="to" type="int">
- </argument>
- <description>
- Rearrange tab.
- </description>
- </method>
- <method name="remove_tab">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_tab">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="Tabs.TabAlign">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_close_display_policy">
- <return type="void">
- </return>
- <argument index="0" name="policy" type="int" enum="Tabs.CloseButtonDisplayPolicy">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_disabled">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_icon">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_title">
- <return type="void">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" brief="">
- </member>
- <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" brief="" enum="Tabs.CloseButtonDisplayPolicy">
- </member>
- </members>
- <signals>
- <signal name="reposition_active_tab_request">
- <argument index="0" name="idx_to" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="right_button_pressed">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tab_changed">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tab_clicked">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tab_close">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tab_hover">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ALIGN_LEFT" value="0">
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- </constant>
- <constant name="ALIGN_MAX" value="3">
- </constant>
- <constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1">
- </constant>
- <constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2">
- </constant>
- <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0">
- </constant>
- <constant name="CLOSE_BUTTON_MAX" value="3">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="button" type="StyleBox">
- </theme_item>
- <theme_item name="button_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="close" type="Texture">
- </theme_item>
- <theme_item name="decrement" type="Texture">
- </theme_item>
- <theme_item name="decrement_highlight" type="Texture">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color_bg" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_fg" type="Color">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="increment" type="Texture">
- </theme_item>
- <theme_item name="increment_highlight" type="Texture">
- </theme_item>
- <theme_item name="label_valign_bg" type="int">
- </theme_item>
- <theme_item name="label_valign_fg" type="int">
- </theme_item>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- </theme_item>
- <theme_item name="tab_fg" type="StyleBox">
- </theme_item>
- <theme_item name="top_margin" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="TextEdit" inherits="Control" category="Core">
- <brief_description>
- Multiline text editing control.
- </brief_description>
- <description>
- TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
- </description>
- <methods>
- <method name="add_color_region">
- <return type="void">
- </return>
- <argument index="0" name="begin_key" type="String">
- </argument>
- <argument index="1" name="end_key" type="String">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <argument index="3" name="line_only" type="bool" default="false">
- </argument>
- <description>
- Add color region (given the delimiters) and its colors.
- </description>
- </method>
- <method name="add_keyword_color">
- <return type="void">
- </return>
- <argument index="0" name="keyword" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Add a keyword and its color.
- </description>
- </method>
- <method name="clear_colors">
- <return type="void">
- </return>
- <description>
- Clear all the syntax coloring information.
- </description>
- </method>
- <method name="clear_undo_history">
- <return type="void">
- </return>
- <description>
- Clear the undo history.
- </description>
- </method>
- <method name="copy">
- <return type="void">
- </return>
- <description>
- Copy the current selection.
- </description>
- </method>
- <method name="cursor_get_blink_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Gets whether the text editor caret is blinking.
- </description>
- </method>
- <method name="cursor_get_blink_speed" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Gets the text editor caret blink speed.
- </description>
- </method>
- <method name="cursor_get_column" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the column the editing cursor is at.
- </description>
- </method>
- <method name="cursor_get_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the line the editing cursor is at.
- </description>
- </method>
- <method name="cursor_is_block_mode" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Gets whether the text editor caret is in block mode.
- </description>
- </method>
- <method name="cursor_set_blink_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the text editor caret to blink.
- </description>
- </method>
- <method name="cursor_set_blink_speed">
- <return type="void">
- </return>
- <argument index="0" name="blink_speed" type="float">
- </argument>
- <description>
- Set the text editor caret blink speed. Cannot be less then or equal to 0.
- </description>
- </method>
- <method name="cursor_set_block_mode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the text editor caret to block mode.
- </description>
- </method>
- <method name="cursor_set_column">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="adjust_viewport" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_line">
- <return type="void">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <argument index="1" name="adjust_viewport" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="cut">
- <return type="void">
- </return>
- <description>
- Cut the current selection.
- </description>
- </method>
- <method name="get_line" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- Return the text of a specific line.
- </description>
- </method>
- <method name="get_line_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the amount of total lines in the text.
- </description>
- </method>
- <method name="get_menu" qualifiers="const">
- <return type="PopupMenu">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_from_column" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the selection begin column.
- </description>
- </method>
- <method name="get_selection_from_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the selection begin line.
- </description>
- </method>
- <method name="get_selection_text" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the text inside the selection.
- </description>
- </method>
- <method name="get_selection_to_column" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the selection end column.
- </description>
- </method>
- <method name="get_selection_to_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the selection end line.
- </description>
- </method>
- <method name="get_text">
- <return type="String">
- </return>
- <description>
- Return the whole text.
- </description>
- </method>
- <method name="get_v_scroll_speed" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_word_under_cursor" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="insert_text_at_cursor">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Insert a given text at the cursor position.
- </description>
- </method>
- <method name="is_highlight_all_occurrences_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if highlight all occurrences is enabled.
- </description>
- </method>
- <method name="is_selection_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the selection is active.
- </description>
- </method>
- <method name="is_show_line_numbers_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if line numbers are enabled.
- </description>
- </method>
- <method name="is_smooth_scroll_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_syntax_coloring_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if the syntax coloring is enabled.
- </description>
- </method>
- <method name="menu_option">
- <return type="void">
- </return>
- <argument index="0" name="option" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="paste">
- <return type="void">
- </return>
- <description>
- Paste the current selection.
- </description>
- </method>
- <method name="redo">
- <return type="void">
- </return>
- <description>
- Perform redo operation.
- </description>
- </method>
- <method name="search" qualifiers="const">
- <return type="PoolIntArray">
- </return>
- <argument index="0" name="key" type="String">
- </argument>
- <argument index="1" name="flags" type="int">
- </argument>
- <argument index="2" name="from_line" type="int">
- </argument>
- <argument index="3" name="from_column" type="int">
- </argument>
- <description>
- Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
- </description>
- </method>
- <method name="select">
- <return type="void">
- </return>
- <argument index="0" name="from_line" type="int">
- </argument>
- <argument index="1" name="from_column" type="int">
- </argument>
- <argument index="2" name="to_line" type="int">
- </argument>
- <argument index="3" name="to_column" type="int">
- </argument>
- <description>
- Perform selection, from line/column to line/column.
- </description>
- </method>
- <method name="select_all">
- <return type="void">
- </return>
- <description>
- Select all the text.
- </description>
- </method>
- <method name="set_highlight_all_occurrences">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set to enable highlighting all occurrences of the current selection.
- </description>
- </method>
- <method name="set_max_chars">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set the maximum amount of characters editable.
- </description>
- </method>
- <method name="set_readonly">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the text editor as read-only. Text can be displayed but not edited.
- </description>
- </method>
- <method name="set_show_line_numbers">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set to enable showing line numbers.
- </description>
- </method>
- <method name="set_smooth_scroll_enable">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_syntax_coloring">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set to enable the syntax coloring.
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the entire text.
- </description>
- </method>
- <method name="set_v_scroll_speed">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_wrap">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable text wrapping when it goes beyond he edge of what is visible.
- </description>
- </method>
- <method name="undo">
- <return type="void">
- </return>
- <description>
- Perform undo operation.
- </description>
- </method>
- </methods>
- <members>
- <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" brief="">
- </member>
- <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" brief="">
- </member>
- <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode" brief="">
- </member>
- <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" brief="">
- </member>
- <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled" brief="">
- </member>
- <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" brief="">
- </member>
- <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" brief="">
- </member>
- <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" brief="">
- </member>
- </members>
- <signals>
- <signal name="breakpoint_toggled">
- <argument index="0" name="row" type="int">
- </argument>
- <description>
- Emitted when a breakpoint is placed via the breakpoint gutter.
- </description>
- </signal>
- <signal name="cursor_changed">
- <description>
- Emitted when the cursor changes.
- </description>
- </signal>
- <signal name="request_completion">
- <description>
- </description>
- </signal>
- <signal name="symbol_lookup">
- <argument index="0" name="symbol" type="String">
- </argument>
- <argument index="1" name="row" type="int">
- </argument>
- <argument index="2" name="column" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="text_changed">
- <description>
- Emitted when the text changes.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="SEARCH_MATCH_CASE" value="1">
- Match case when searching.
- </constant>
- <constant name="SEARCH_WHOLE_WORDS" value="2">
- Match whole words when searching.
- </constant>
- <constant name="SEARCH_BACKWARDS" value="4">
- Search from end to beginning.
- </constant>
- <constant name="MENU_CUT" value="0">
- </constant>
- <constant name="MENU_COPY" value="1">
- </constant>
- <constant name="MENU_PASTE" value="2">
- </constant>
- <constant name="MENU_CLEAR" value="3">
- </constant>
- <constant name="MENU_SELECT_ALL" value="4">
- </constant>
- <constant name="MENU_UNDO" value="5">
- </constant>
- <constant name="MENU_MAX" value="6">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="background_color" type="Color">
- </theme_item>
- <theme_item name="brace_mismatch_color" type="Color">
- </theme_item>
- <theme_item name="breakpoint_color" type="Color">
- </theme_item>
- <theme_item name="caret_background_color" type="Color">
- </theme_item>
- <theme_item name="caret_color" type="Color">
- </theme_item>
- <theme_item name="completion" type="StyleBox">
- </theme_item>
- <theme_item name="completion_background_color" type="Color">
- </theme_item>
- <theme_item name="completion_existing_color" type="Color">
- </theme_item>
- <theme_item name="completion_font_color" type="Color">
- </theme_item>
- <theme_item name="completion_lines" type="int">
- </theme_item>
- <theme_item name="completion_max_width" type="int">
- </theme_item>
- <theme_item name="completion_scroll_color" type="Color">
- </theme_item>
- <theme_item name="completion_scroll_width" type="int">
- </theme_item>
- <theme_item name="completion_selected_color" type="Color">
- </theme_item>
- <theme_item name="current_line_color" type="Color">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_selected" type="Color">
- </theme_item>
- <theme_item name="function_color" type="Color">
- </theme_item>
- <theme_item name="line_number_color" type="Color">
- </theme_item>
- <theme_item name="line_spacing" type="int">
- </theme_item>
- <theme_item name="mark_color" type="Color">
- </theme_item>
- <theme_item name="member_variable_color" type="Color">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="number_color" type="Color">
- </theme_item>
- <theme_item name="selection_color" type="Color">
- </theme_item>
- <theme_item name="symbol_color" type="Color">
- </theme_item>
- <theme_item name="tab" type="Texture">
- </theme_item>
- <theme_item name="word_highlighted_color" type="Color">
- </theme_item>
- </theme_items>
-</class>
-<class name="Texture" inherits="Resource" category="Core">
- <brief_description>
- Texture for 2D and 3D.
- </brief_description>
- <description>
- A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
- </description>
- <methods>
- <method name="draw" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="3" name="transpose" type="bool" default="false">
- </argument>
- <argument index="4" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_rect" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="tile" type="bool">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <description>
- </description>
- </method>
- <method name="draw_rect_region" qualifiers="const">
- <return type="void">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <argument index="2" name="src_rect" type="Rect2">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <argument index="5" name="normal_map" type="Texture" default="null">
- </argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_data" qualifiers="const">
- <return type="Image">
- </return>
- <description>
- </description>
- </method>
- <method name="get_flags" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the current texture flags.
- </description>
- </method>
- <method name="get_height" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the texture height.
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the texture size.
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the texture width.
- </description>
- </method>
- <method name="has_alpha" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_flags">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- Change the texture flags.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="FLAG_MIPMAPS" value="1">
- Generate mipmaps, to enable smooth zooming out of the texture.
- </constant>
- <constant name="FLAG_REPEAT" value="2">
- Repeat (instead of clamp to edge).
- </constant>
- <constant name="FLAG_FILTER" value="4">
- Turn on magnifying filter, to enable smooth zooming in of the texture.
- </constant>
- <constant name="FLAG_VIDEO_SURFACE" value="4096">
- Texture is a video surface.
- </constant>
- <constant name="FLAGS_DEFAULT" value="7">
- Default flags. Generate mipmaps, repeat, and filter are enabled.
- </constant>
- <constant name="FLAG_ANISOTROPIC_FILTER" value="8">
- </constant>
- <constant name="FLAG_CONVERT_TO_LINEAR" value="16">
- </constant>
- <constant name="FLAG_MIRRORED_REPEAT" value="32">
- </constant>
- </constants>
-</class>
-<class name="TextureButton" inherits="BaseButton" category="Core">
- <brief_description>
- Button that can be themed with textures.
- </brief_description>
- <description>
- Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.
- Only the normal texture is required, the others are optional.
- </description>
- <methods>
- <method name="get_click_mask" qualifiers="const">
- <return type="BitMap">
- </return>
- <description>
- </description>
- </method>
- <method name="get_disabled_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_expand" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_focused_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_hover_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_normal_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pressed_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stretch_mode" qualifiers="const">
- <return type="int" enum="TextureButton.StretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_click_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="BitMap">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disabled_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand">
- <return type="void">
- </return>
- <argument index="0" name="p_expand" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_focused_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hover_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_normal_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="p_mode" type="int" enum="TextureButton.StretchMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="expand" type="bool" setter="set_expand" getter="get_expand" brief="">
- </member>
- <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureButton.StretchMode">
- </member>
- <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask" brief="">
- </member>
- <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture" brief="">
- </member>
- <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture" brief="">
- </member>
- <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture" brief="">
- </member>
- <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture" brief="">
- </member>
- <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture" brief="">
- </member>
- </members>
- <constants>
- <constant name="STRETCH_SCALE" value="0">
- </constant>
- <constant name="STRETCH_TILE" value="1">
- </constant>
- <constant name="STRETCH_KEEP" value="2">
- </constant>
- <constant name="STRETCH_KEEP_CENTERED" value="3">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT" value="4">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="5">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT_COVERED" value="6">
- </constant>
- </constants>
-</class>
-<class name="TextureProgress" inherits="Range" category="Core">
- <brief_description>
- Textured progress bar implementation.
- </brief_description>
- <description>
- [ProgressBar] implementation that is easier to theme (by just passing a few textures).
- </description>
- <methods>
- <method name="get_fill_degrees">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fill_mode">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_nine_patch_stretch" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if textures are stretched as nine-patches or false otherwise.
- </description>
- </method>
- <method name="get_over_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_progress_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radial_center_offset">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radial_initial_angle">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stretch_margin" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <description>
- Return nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
- </description>
- </method>
- <method name="get_under_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="set_fill_degrees">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fill_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_nine_patch_stretch">
- <return type="void">
- </return>
- <argument index="0" name="stretch" type="bool">
- </argument>
- <description>
- Set if textures should be stretched as nine-patches.
- </description>
- </method>
- <method name="set_over_texture">
- <return type="void">
- </return>
- <argument index="0" name="tex" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_progress_texture">
- <return type="void">
- </return>
- <argument index="0" name="tex" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radial_center_offset">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radial_initial_angle">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stretch_margin">
- <return type="void">
- </return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </argument>
- <argument index="1" name="value" type="int">
- </argument>
- <description>
- Set nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
- </description>
- </method>
- <method name="set_under_texture">
- <return type="void">
- </return>
- <argument index="0" name="tex" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" brief="">
- </member>
- <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" brief="">
- </member>
- <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" brief="">
- </member>
- <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees" brief="">
- </member>
- <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" brief="">
- </member>
- <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
- </member>
- <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
- </member>
- <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
- </member>
- <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
- </member>
- <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture" brief="">
- </member>
- <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture" brief="">
- </member>
- <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture" brief="">
- </member>
- </members>
- <constants>
- <constant name="FILL_LEFT_TO_RIGHT" value="0">
- </constant>
- <constant name="FILL_RIGHT_TO_LEFT" value="1">
- </constant>
- <constant name="FILL_TOP_TO_BOTTOM" value="2">
- </constant>
- <constant name="FILL_BOTTOM_TO_TOP" value="3">
- </constant>
- <constant name="FILL_CLOCKWISE" value="4">
- </constant>
- <constant name="FILL_COUNTER_CLOCKWISE" value="5">
- </constant>
- </constants>
-</class>
-<class name="TextureRect" inherits="Control" category="Core">
- <brief_description>
- Control Frame that draws a texture.
- </brief_description>
- <description>
- Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI.
- </description>
- <methods>
- <method name="get_stretch_mode" qualifiers="const">
- <return type="int" enum="TextureRect.StretchMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="has_expand" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_expand">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stretch_mode">
- <return type="void">
- </return>
- <argument index="0" name="stretch_mode" type="int" enum="TextureRect.StretchMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" brief="">
- </member>
- <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureRect.StretchMode">
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- </members>
- <constants>
- <constant name="STRETCH_SCALE_ON_EXPAND" value="0">
- </constant>
- <constant name="STRETCH_SCALE" value="1">
- </constant>
- <constant name="STRETCH_TILE" value="2">
- </constant>
- <constant name="STRETCH_KEEP" value="3">
- </constant>
- <constant name="STRETCH_KEEP_CENTERED" value="4">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT" value="5">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6">
- </constant>
- <constant name="STRETCH_KEEP_ASPECT_COVERED" value="7">
- </constant>
- </constants>
-</class>
-<class name="Theme" inherits="Resource" category="Core">
- <brief_description>
- Theme for controls.
- </brief_description>
- <description>
- Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it.
- Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info.
- </description>
- <methods>
- <method name="clear_color">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_font">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_icon">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_stylebox">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="copy_default_theme">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_constant" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_constant_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_default_font" qualifiers="const">
- <return type="Font">
- </return>
- <description>
- </description>
- </method>
- <method name="get_font" qualifiers="const">
- <return type="Font">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_font_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stylebox" qualifiers="const">
- <return type="StyleBox">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stylebox_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stylebox_types" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_type_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_color" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_constant" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_font" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_icon" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_stylebox" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_color">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="constant" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_font">
- <return type="void">
- </return>
- <argument index="0" name="font" type="Font">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_font">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="font" type="Font">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stylebox">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="texture" type="StyleBox">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Thread" inherits="Reference" category="Core">
- <brief_description>
- A unit of execution in a process.
- </brief_description>
- <description>
- A unit of execution in a process. Can run methods on [Object]\ s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
- </description>
- <methods>
- <method name="get_id" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the id of the thread, uniquely identifying it among all threads.
- </description>
- </method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Whether this thread is currently active, an active Thread cannot start work on a new method but can be joined with [method wait_to_finish].
- </description>
- </method>
- <method name="start">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="instance" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <argument index="2" name="userdata" type="Variant" default="null">
- </argument>
- <argument index="3" name="priority" type="int" default="1">
- </argument>
- <description>
- Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum.
- Returns OK on success, or ERR_CANT_CREATE on failure.
- </description>
- </method>
- <method name="wait_to_finish">
- <return type="Variant">
- </return>
- <description>
- Joins the [Thread] and waits for it to finish. Returns what the method called returned.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PRIORITY_LOW" value="0">
- </constant>
- <constant name="PRIORITY_NORMAL" value="1">
- </constant>
- <constant name="PRIORITY_HIGH" value="2">
- </constant>
- </constants>
-</class>
-<class name="TileMap" inherits="Node2D" category="Core">
- <brief_description>
- Node for 2D tile-based games.
- </brief_description>
- <description>
- Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps.
- To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time.
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all cells.
- </description>
- </method>
- <method name="get_cell" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Return the tile index of the referenced cell.
- </description>
- </method>
- <method name="get_cell_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the cell size.
- </description>
- </method>
- <method name="get_cellv" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Return the tile index of the cell referenced by a Vector2.
- </description>
- </method>
- <method name="get_center_x" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner).
- </description>
- </method>
- <method name="get_center_y" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner).
- </description>
- </method>
- <method name="get_collision_bounce" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the collision bounce parameter.
- </description>
- </method>
- <method name="get_collision_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the collision friction parameter.
- </description>
- </method>
- <method name="get_collision_layer" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the collision layer.
- </description>
- </method>
- <method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the collision mask.
- </description>
- </method>
- <method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_collision_use_kinematic" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the tilemap handles collisions as a kinematic body.
- </description>
- </method>
- <method name="get_custom_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Return the custom transform matrix.
- </description>
- </method>
- <method name="get_half_offset" qualifiers="const">
- <return type="int" enum="TileMap.HalfOffset">
- </return>
- <description>
- Return the current half offset configuration.
- </description>
- </method>
- <method name="get_mode" qualifiers="const">
- <return type="int" enum="TileMap.Mode">
- </return>
- <description>
- Return the orientation mode.
- </description>
- </method>
- <method name="get_occluder_light_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_quadrant_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the quadrant size.
- </description>
- </method>
- <method name="get_tile_origin" qualifiers="const">
- <return type="int" enum="TileMap.TileOrigin">
- </return>
- <description>
- Return the tile origin configuration.
- </description>
- </method>
- <method name="get_tileset" qualifiers="const">
- <return type="TileSet">
- </return>
- <description>
- Return the current tileset.
- </description>
- </method>
- <method name="get_used_cells" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
- </description>
- </method>
- <method name="get_used_cells_by_id" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_used_rect">
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="is_cell_transposed" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
- </description>
- </method>
- <method name="is_cell_x_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Return whether the referenced cell is flipped over the X axis.
- </description>
- </method>
- <method name="is_cell_y_flipped" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <description>
- Return whether the referenced cell is flipped over the Y axis.
- </description>
- </method>
- <method name="is_y_sort_mode_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return the Y sort mode.
- </description>
- </method>
- <method name="map_to_world" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="mappos" type="Vector2">
- </argument>
- <argument index="1" name="ignore_half_ofs" type="bool" default="false">
- </argument>
- <description>
- Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
- Optionally, the tilemap's potential half offset can be ignored.
- </description>
- </method>
- <method name="set_cell">
- <return type="void">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="tile" type="int">
- </argument>
- <argument index="3" name="flip_x" type="bool" default="false">
- </argument>
- <argument index="4" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="5" name="transpose" type="bool" default="false">
- </argument>
- <description>
- Set the tile index for the cell referenced by its grid-based X and Y coordinates.
- A tile index of -1 clears the cell.
- Optionally, the tile can also be flipped over the X and Y coordinates or transposed.
- </description>
- </method>
- <method name="set_cell_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Set the cell size.
- </description>
- </method>
- <method name="set_cellv">
- <return type="void">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <argument index="1" name="tile" type="int">
- </argument>
- <argument index="2" name="flip_x" type="bool" default="false">
- </argument>
- <argument index="3" name="flip_y" type="bool" default="false">
- </argument>
- <argument index="4" name="transpose" type="bool" default="false">
- </argument>
- <description>
- Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
- A tile index of -1 clears the cell.
- Optionally, the tile can also be flipped over the X and Y axes or transposed.
- </description>
- </method>
- <method name="set_center_x">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner).
- </description>
- </method>
- <method name="set_center_y">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner).
- </description>
- </method>
- <method name="set_collision_bounce">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Set the collision bounce parameter. Allowable values range from 0 to 1.
- </description>
- </method>
- <method name="set_collision_friction">
- <return type="void">
- </return>
- <argument index="0" name="value" type="float">
- </argument>
- <description>
- Set the collision friction parameter. Allowable values range from 0 to 1.
- </description>
- </method>
- <method name="set_collision_layer">
- <return type="void">
- </return>
- <argument index="0" name="layer" type="int">
- </argument>
- <description>
- Set the collision layer.
- Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1.
- </description>
- </method>
- <method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- Set the collision masks.
- Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1.
- </description>
- </method>
- <method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collision_use_kinematic">
- <return type="void">
- </return>
- <argument index="0" name="use_kinematic" type="bool">
- </argument>
- <description>
- Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled).
- </description>
- </method>
- <method name="set_custom_transform">
- <return type="void">
- </return>
- <argument index="0" name="custom_transform" type="Transform2D">
- </argument>
- <description>
- Set custom transform matrix, to use in combination with the custom orientation mode.
- </description>
- </method>
- <method name="set_half_offset">
- <return type="void">
- </return>
- <argument index="0" name="half_offset" type="int" enum="TileMap.HalfOffset">
- </argument>
- <description>
- Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
- Half offset sets every other tile off by a half tile size in the specified direction.
- </description>
- </method>
- <method name="set_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="TileMap.Mode">
- </argument>
- <description>
- Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
- </description>
- </method>
- <method name="set_occluder_light_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_quadrant_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time.
- Allowed values are integers ranging from 1 to 128.
- </description>
- </method>
- <method name="set_tile_origin">
- <return type="void">
- </return>
- <argument index="0" name="origin" type="int" enum="TileMap.TileOrigin">
- </argument>
- <description>
- Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
- </description>
- </method>
- <method name="set_tileset">
- <return type="void">
- </return>
- <argument index="0" name="tileset" type="TileSet">
- </argument>
- <description>
- Set the current tileset.
- </description>
- </method>
- <method name="set_y_sort_mode">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate.
- A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size.
- </description>
- </method>
- <method name="world_to_map" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="worldpos" type="Vector2">
- </argument>
- <description>
- Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
- </description>
- </method>
- </methods>
- <members>
- <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" brief="">
- </member>
- <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="" enum="TileMap.HalfOffset">
- </member>
- <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" brief="">
- </member>
- <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" brief="">
- </member>
- <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="" enum="TileMap.TileOrigin">
- </member>
- <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" brief="">
- </member>
- <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" brief="">
- </member>
- <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" brief="">
- </member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
- </member>
- <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" brief="">
- </member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="TileMap.Mode">
- </member>
- <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief="">
- </member>
- <member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data" brief="">
- </member>
- <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" brief="">
- </member>
- </members>
- <signals>
- <signal name="settings_changed">
- <description>
- Signal indicating that a tilemap setting has changed.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="INVALID_CELL" value="-1" enum="">
- Returned when a cell doesn't exist.
- </constant>
- <constant name="MODE_SQUARE" value="0">
- Orthogonal orientation mode.
- </constant>
- <constant name="MODE_ISOMETRIC" value="1">
- Isometric orientation mode.
- </constant>
- <constant name="MODE_CUSTOM" value="2">
- Custom orientation mode.
- </constant>
- <constant name="HALF_OFFSET_X" value="0">
- Half offset on the X coordinate.
- </constant>
- <constant name="HALF_OFFSET_Y" value="1">
- Half offset on the Y coordinate.
- </constant>
- <constant name="HALF_OFFSET_DISABLED" value="2">
- Half offset disabled.
- </constant>
- <constant name="TILE_ORIGIN_TOP_LEFT" value="0">
- Tile origin at its top-left corner.
- </constant>
- <constant name="TILE_ORIGIN_CENTER" value="1">
- Tile origin at its center.
- </constant>
- <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2">
- </constant>
- </constants>
-</class>
-<class name="TileSet" inherits="Resource" category="Core">
- <brief_description>
- Tile library for tilemaps.
- </brief_description>
- <description>
- A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
- Tiles are referenced by a unique integer ID.
- </description>
- <methods>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear all tiles.
- </description>
- </method>
- <method name="create_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Create a new tile which will be referenced by the given ID.
- </description>
- </method>
- <method name="find_tile_by_name" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Find the first tile matching the given name.
- </description>
- </method>
- <method name="get_last_unused_tile_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Return the ID following the last currently used ID, useful when creating a new tile.
- </description>
- </method>
- <method name="get_tiles_ids" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Return an array of all currently used tile IDs.
- </description>
- </method>
- <method name="remove_tile">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Remove the tile referenced by the given ID.
- </description>
- </method>
- <method name="tile_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape2D">
- </argument>
- <argument index="2" name="shape_transform" type="Transform2D">
- </argument>
- <argument index="3" name="one_way" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_light_occluder" qualifiers="const">
- <return type="OccluderPolygon2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the light occluder of the tile.
- </description>
- </method>
- <method name="tile_get_material" qualifiers="const">
- <return type="ShaderMaterial">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the material of the tile.
- </description>
- </method>
- <method name="tile_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the name of the tile.
- </description>
- </method>
- <method name="tile_get_navigation_polygon" qualifiers="const">
- <return type="NavigationPolygon">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the navigation polygon of the tile.
- </description>
- </method>
- <method name="tile_get_navigation_polygon_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the offset of the tile's navigation polygon.
- </description>
- </method>
- <method name="tile_get_normal_map" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_occluder_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the offset of the tile's light occluder.
- </description>
- </method>
- <method name="tile_get_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the tile sub-region in the texture.
- </description>
- </method>
- <method name="tile_get_shape" qualifiers="const">
- <return type="Shape2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shape_one_way" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shape_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_get_shapes" qualifiers="const">
- <return type="Array">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the array of shapes of the tile.
- </description>
- </method>
- <method name="tile_get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the texture of the tile.
- </description>
- </method>
- <method name="tile_get_texture_offset" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the texture offset of the tile.
- </description>
- </method>
- <method name="tile_set_light_occluder">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="light_occluder" type="OccluderPolygon2D">
- </argument>
- <description>
- Set a light occluder for the tile.
- </description>
- </method>
- <method name="tile_set_material">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="material" type="ShaderMaterial">
- </argument>
- <description>
- Set the material of the tile.
- </description>
- </method>
- <method name="tile_set_name">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Set the name of the tile, for descriptive purposes.
- </description>
- </method>
- <method name="tile_set_navigation_polygon">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon" type="NavigationPolygon">
- </argument>
- <description>
- Set a navigation polygon for the tile.
- </description>
- </method>
- <method name="tile_set_navigation_polygon_offset">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="navigation_polygon_offset" type="Vector2">
- </argument>
- <description>
- Set an offset for the tile's navigation polygon.
- </description>
- </method>
- <method name="tile_set_normal_map">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="normal_map" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_set_occluder_offset">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="occluder_offset" type="Vector2">
- </argument>
- <description>
- Set an offset for the tile's light occluder.
- </description>
- </method>
- <method name="tile_set_region">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="region" type="Rect2">
- </argument>
- <description>
- Set the tile sub-region in the texture. This is common in texture atlases.
- </description>
- </method>
- <method name="tile_set_shape">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <argument index="2" name="shape" type="Shape2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_set_shape_one_way">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <argument index="2" name="one_way" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_set_shape_transform">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
- <argument index="2" name="shape_transform" type="Transform2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="tile_set_shapes">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shapes" type="Array">
- </argument>
- <description>
- Set an array of shapes for the tile, enabling physics to collide with it.
- </description>
- </method>
- <method name="tile_set_texture">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- Set the texture of the tile.
- </description>
- </method>
- <method name="tile_set_texture_offset">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="texture_offset" type="Vector2">
- </argument>
- <description>
- Set the texture offset of the tile.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Timer" inherits="Node" category="Core">
- <brief_description>
- A simple Timer node.
- </brief_description>
- <description>
- Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop.
- </description>
- <methods>
- <method name="get_time_left" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the time left for timeout in seconds if the timer is active, 0 otherwise.
- </description>
- </method>
- <method name="get_timer_process_mode" qualifiers="const">
- <return type="int" enum="Timer.TimerProcessMode">
- </return>
- <description>
- Return the timer's processing mode.
- </description>
- </method>
- <method name="get_wait_time" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the wait time in seconds.
- </description>
- </method>
- <method name="has_autostart" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if set to automatically start when entering the scene.
- </description>
- </method>
- <method name="is_one_shot" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if configured as one-shot.
- </description>
- </method>
- <method name="is_paused" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return if the timer is paused or not.
- </description>
- </method>
- <method name="is_stopped" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_autostart">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set to automatically start when entering the scene.
- </description>
- </method>
- <method name="set_one_shot">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart.
- </description>
- </method>
- <method name="set_paused">
- <return type="void">
- </return>
- <argument index="0" name="paused" type="bool">
- </argument>
- <description>
- Set whether the timer is paused or not. A paused timer will be inactive until it is unpaused again.
- </description>
- </method>
- <method name="set_timer_process_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Timer.TimerProcessMode">
- </argument>
- <description>
- Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument).
- </description>
- </method>
- <method name="set_wait_time">
- <return type="void">
- </return>
- <argument index="0" name="time_sec" type="float">
- </argument>
- <description>
- Set wait time in seconds. When the time is over, it will emit the timeout signal.
- </description>
- </method>
- <method name="start">
- <return type="void">
- </return>
- <description>
- Start the timer.
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- Stop (cancel) the timer.
- </description>
- </method>
- </methods>
- <members>
- <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" brief="">
- </member>
- <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" brief="">
- </member>
- <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="" enum="Timer.TimerProcessMode">
- </member>
- <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief="">
- </member>
- </members>
- <signals>
- <signal name="timeout">
- <description>
- Emitted when the time runs out.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="TIMER_PROCESS_FIXED" value="0">
- Update the timer at fixed intervals (framerate processing).
- </constant>
- <constant name="TIMER_PROCESS_IDLE" value="1">
- Update the timer during the idle time at each frame.
- </constant>
- </constants>
-</class>
-<class name="ToolButton" inherits="Button" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="disabled" type="StyleBox">
- </theme_item>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_disabled" type="Color">
- </theme_item>
- <theme_item name="font_color_hover" type="Color">
- </theme_item>
- <theme_item name="font_color_pressed" type="Color">
- </theme_item>
- <theme_item name="hover" type="StyleBox">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="normal" type="StyleBox">
- </theme_item>
- <theme_item name="pressed" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="TouchScreenButton" inherits="Node2D" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_action" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bitmask" qualifiers="const">
- <return type="BitMap">
- </return>
- <description>
- </description>
- </method>
- <method name="get_shape" qualifiers="const">
- <return type="Shape2D">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture_pressed" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visibility_mode" qualifiers="const">
- <return type="int" enum="TouchScreenButton.VisibilityMode">
- </return>
- <description>
- </description>
- </method>
- <method name="is_passby_press_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_pressed" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_shape_centered" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_shape_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_action">
- <return type="void">
- </return>
- <argument index="0" name="action" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bitmask">
- <return type="void">
- </return>
- <argument index="0" name="bitmask" type="BitMap">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_passby_press">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape">
- <return type="void">
- </return>
- <argument index="0" name="shape" type="Shape2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape_centered">
- <return type="void">
- </return>
- <argument index="0" name="bool" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape_visible">
- <return type="void">
- </return>
- <argument index="0" name="bool" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture_pressed">
- <return type="void">
- </return>
- <argument index="0" name="texture_pressed" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visibility_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="TouchScreenButton.VisibilityMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="action" type="String" setter="set_action" getter="get_action" brief="">
- </member>
- <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask" brief="">
- </member>
- <member name="normal" type="Texture" setter="set_texture" getter="get_texture" brief="">
- </member>
- <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" brief="">
- </member>
- <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed" brief="">
- </member>
- <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief="">
- </member>
- <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered" brief="">
- </member>
- <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" brief="">
- </member>
- <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" brief="" enum="TouchScreenButton.VisibilityMode">
- </member>
- </members>
- <signals>
- <signal name="pressed">
- <description>
- </description>
- </signal>
- <signal name="released">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Transform" category="Built-In Types">
- <brief_description>
- 3D Transformation.
- </brief_description>
- <description>
- Transform is used to store translation, rotation and scaling transformations. It consists of a Basis "basis" and Vector3 "origin". Transform is used to represent transformations of objects in space, and as such, determine their position, orientation and scale. It is similar to a 3x4 matrix.
- </description>
- <methods>
- <method name="Transform">
- <return type="Transform">
- </return>
- <argument index="0" name="x_axis" type="Vector3">
- </argument>
- <argument index="1" name="y_axis" type="Vector3">
- </argument>
- <argument index="2" name="z_axis" type="Vector3">
- </argument>
- <argument index="3" name="origin" type="Vector3">
- </argument>
- <description>
- Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled).
- </description>
- </method>
- <method name="Transform">
- <return type="Transform">
- </return>
- <argument index="0" name="basis" type="Basis">
- </argument>
- <argument index="1" name="origin" type="Vector3">
- </argument>
- <description>
- Construct the Transform from a Basis and Vector3.
- </description>
- </method>
- <method name="Transform">
- <return type="Transform">
- </return>
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <description>
- Construct the Transform from a Transform2D.
- </description>
- </method>
- <method name="Transform">
- <return type="Transform">
- </return>
- <argument index="0" name="from" type="Quat">
- </argument>
- <description>
- Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0).
- </description>
- </method>
- <method name="Transform">
- <return type="Transform">
- </return>
- <argument index="0" name="from" type="Basis">
- </argument>
- <description>
- Construct the Transform from a Basis. The origin will be Vector3(0, 0, 0).
- </description>
- </method>
- <method name="affine_inverse">
- <return type="Transform">
- </return>
- <description>
- Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation.
- </description>
- </method>
- <method name="interpolate_with">
- <return type="Transform">
- </return>
- <argument index="0" name="transform" type="Transform">
- </argument>
- <argument index="1" name="weight" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="inverse">
- <return type="Transform">
- </return>
- <description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling).
- </description>
- </method>
- <method name="looking_at">
- <return type="Transform">
- </return>
- <argument index="0" name="target" type="Vector3">
- </argument>
- <argument index="1" name="up" type="Vector3">
- </argument>
- <description>
- Rotate the transform around the up vector to face the target.
- </description>
- </method>
- <method name="orthonormalized">
- <return type="Transform">
- </return>
- <description>
- Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
- </description>
- </method>
- <method name="rotated">
- <return type="Transform">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="phi" type="float">
- </argument>
- <description>
- Rotate the transform around given axis by phi. The axis must be a normalized vector.
- </description>
- </method>
- <method name="scaled">
- <return type="Transform">
- </return>
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- Scale the transform by the specified 3D scaling factors.
- </description>
- </method>
- <method name="translated">
- <return type="Transform">
- </return>
- <argument index="0" name="ofs" type="Vector3">
- </argument>
- <description>
- Translate the transform by the specified displacement.
- </description>
- </method>
- <method name="xform">
- <return type="var">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- Transforms the given vector "v" by this transform.
- </description>
- </method>
- <method name="xform_inv">
- <return type="var">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- Inverse-transforms vector "v" by this transform.
- </description>
- </method>
- </methods>
- <members>
- <member name="basis" type="Basis" setter="" getter="" brief="">
- The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system travelling with the object.
- </member>
- <member name="origin" type="Vector3" setter="" getter="" brief="">
- The origin of the transform. Which is the translation offset.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Transform2D" category="Built-In Types">
- <brief_description>
- 3x2 Matrix for 2D transforms.
- </brief_description>
- <description>
- 3x2 Matrix for 2D transforms.
- </description>
- <methods>
- <method name="Transform2D">
- <return type="Transform2D">
- </return>
- <argument index="0" name="from" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="Transform2D">
- <return type="Transform2D">
- </return>
- <argument index="0" name="x_axis" type="Vector2">
- </argument>
- <argument index="1" name="y_axis" type="Vector2">
- </argument>
- <argument index="2" name="origin" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="Transform2D">
- <return type="Transform2D">
- </return>
- <argument index="0" name="rot" type="float">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="affine_inverse">
- <return type="Transform2D">
- </return>
- <description>
- Return the inverse of the matrix.
- </description>
- </method>
- <method name="basis_xform">
- <return type="Transform2D">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="basis_xform_inv">
- <return type="Transform2D">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_origin">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rotation">
- <return type="float">
- </return>
- <description>
- Return the rotation (in radians).
- </description>
- </method>
- <method name="get_scale">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="interpolate_with">
- <return type="Transform2D">
- </return>
- <argument index="0" name="transform" type="Transform2D">
- </argument>
- <argument index="1" name="weight" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="inverse">
- <return type="Transform2D">
- </return>
- <description>
- </description>
- </method>
- <method name="orthonormalized">
- <return type="Transform2D">
- </return>
- <description>
- </description>
- </method>
- <method name="rotated">
- <return type="Transform2D">
- </return>
- <argument index="0" name="phi" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="scaled">
- <return type="Transform2D">
- </return>
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="translated">
- <return type="Transform2D">
- </return>
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="xform">
- <return type="Transform2D">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="xform_inv">
- <return type="Transform2D">
- </return>
- <argument index="0" name="v" type="var">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="origin" type="Vector2" setter="" getter="" brief="">
- </member>
- <member name="x" type="Vector2" setter="" getter="" brief="">
- </member>
- <member name="y" type="Vector2" setter="" getter="" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Translation" inherits="Resource" category="Core">
- <brief_description>
- Language Translation.
- </brief_description>
- <description>
- Translations are resources that can be loaded/unloaded on demand. They map a string to another string.
- </description>
- <methods>
- <method name="add_message">
- <return type="void">
- </return>
- <argument index="0" name="src_message" type="String">
- </argument>
- <argument index="1" name="xlated_message" type="String">
- </argument>
- <description>
- Add a message for translation.
- </description>
- </method>
- <method name="erase_message">
- <return type="void">
- </return>
- <argument index="0" name="src_message" type="String">
- </argument>
- <description>
- Erase a message.
- </description>
- </method>
- <method name="get_locale" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the locale of the translation.
- </description>
- </method>
- <method name="get_message" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="src_message" type="String">
- </argument>
- <description>
- Return a message for translation.
- </description>
- </method>
- <method name="get_message_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_message_list" qualifiers="const">
- <return type="PoolStringArray">
- </return>
- <description>
- Return all the messages (keys).
- </description>
- </method>
- <method name="set_locale">
- <return type="void">
- </return>
- <argument index="0" name="locale" type="String">
- </argument>
- <description>
- Set the locale of the translation.
- </description>
- </method>
- </methods>
- <members>
- <member name="locale" type="String" setter="set_locale" getter="get_locale" brief="">
- </member>
- <member name="messages" type="PoolStringArray" setter="_set_messages" getter="_get_messages" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="TranslationServer" inherits="Object" category="Core">
- <brief_description>
- Server that manages all translations. Translations can be set to it and removed from it.
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_translation">
- <return type="void">
- </return>
- <argument index="0" name="translation" type="Translation">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="get_locale" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_translation">
- <return type="void">
- </return>
- <argument index="0" name="translation" type="Translation">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_locale">
- <return type="void">
- </return>
- <argument index="0" name="locale" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="translate" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="message" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Tree" inherits="Control" category="Core">
- <brief_description>
- Control to show a tree of items.
- </brief_description>
- <description>
- This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structural displaying and interactions.
- Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple root can be simulated if a dummy hidden root is added.
- [codeblock]
- func _ready():
- var tree = Tree.new()
- var root = tree.create_item()
- tree.set_hide_root(true)
- var child1 = tree.create_item(root)
- var child2 = tree.create_item(root)
- var subchild1 = tree.create_item(child1)
- subchild1.set_text(0, "Subchild1")
- [/codeblock]
- </description>
- <methods>
- <method name="are_column_titles_visible" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether the column titles are being shown.
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clear the tree. This erases all of the items.
- </description>
- </method>
- <method name="create_item">
- <return type="Object">
- </return>
- <argument index="0" name="parent" type="Object" default="null">
- </argument>
- <description>
- Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty.
- </description>
- </method>
- <method name="ensure_cursor_is_visible">
- <return type="void">
- </return>
- <description>
- Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight.
- </description>
- </method>
- <method name="get_allow_reselect" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_allow_rmb_select" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether a right click can select items.
- </description>
- </method>
- <method name="get_column_at_pos" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Get the column index under the given point.
- </description>
- </method>
- <method name="get_column_title" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- Get the title of the given column.
- </description>
- </method>
- <method name="get_column_width" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- Get the width of the given column in pixels.
- </description>
- </method>
- <method name="get_columns" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the amount of columns.
- </description>
- </method>
- <method name="get_custom_popup_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode].
- </description>
- </method>
- <method name="get_drop_mode_flags" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the flags of the current drop mode.
- </description>
- </method>
- <method name="get_edited" qualifiers="const">
- <return type="TreeItem">
- </return>
- <description>
- Get the current edited item. This is only available for custom cell mode.
- </description>
- </method>
- <method name="get_edited_column" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the column of the cell for the current edited icon. This is only available for custom cell mode.
- </description>
- </method>
- <method name="get_item_area_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="item" type="Object">
- </argument>
- <argument index="1" name="column" type="int" default="-1">
- </argument>
- <description>
- Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
- </description>
- </method>
- <method name="get_item_at_pos" qualifiers="const">
- <return type="TreeItem">
- </return>
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Get the tree item at the specified position (relative to the tree origin position).
- </description>
- </method>
- <method name="get_next_selected">
- <return type="TreeItem">
- </return>
- <argument index="0" name="from" type="Object">
- </argument>
- <description>
- Get the next selected item after the given one.
- </description>
- </method>
- <method name="get_pressed_button" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the index of the last pressed button.
- </description>
- </method>
- <method name="get_root">
- <return type="TreeItem">
- </return>
- <description>
- Get the root item of the tree.
- </description>
- </method>
- <method name="get_scroll" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Get the current scrolling position.
- </description>
- </method>
- <method name="get_selected" qualifiers="const">
- <return type="TreeItem">
- </return>
- <description>
- Get the currently selected item.
- </description>
- </method>
- <method name="get_selected_column" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the column number of the current selection.
- </description>
- </method>
- <method name="is_folding_hidden" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether the folding arrow is hidden.
- </description>
- </method>
- <method name="set_allow_reselect">
- <return type="void">
- </return>
- <argument index="0" name="allow" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_allow_rmb_select">
- <return type="void">
- </return>
- <argument index="0" name="allow" type="bool">
- </argument>
- <description>
- Set whether or not a right mouse button click can select items.
- </description>
- </method>
- <method name="set_column_expand">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="expand" type="bool">
- </argument>
- <description>
- Set whether a column will have the "Expand" flag of [Control].
- </description>
- </method>
- <method name="set_column_min_width">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="min_width" type="int">
- </argument>
- <description>
- Set the minimum width of a column.
- </description>
- </method>
- <method name="set_column_title">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- Set the title of a column.
- </description>
- </method>
- <method name="set_column_titles_visible">
- <return type="void">
- </return>
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- Set whether the column titles visibility.
- </description>
- </method>
- <method name="set_columns">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set the amount of columns.
- </description>
- </method>
- <method name="set_drop_mode_flags">
- <return type="void">
- </return>
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- Set the drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants.
- </description>
- </method>
- <method name="set_hide_folding">
- <return type="void">
- </return>
- <argument index="0" name="hide" type="bool">
- </argument>
- <description>
- Set whether the folding arrow should be hidden.
- </description>
- </method>
- <method name="set_hide_root">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether the root of the tree should be hidden.
- </description>
- </method>
- <method name="set_select_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Tree.SelectMode">
- </argument>
- <description>
- Set the selection mode. Use one of the [code]SELECT_*[/code] constants.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="button_pressed">
- <argument index="0" name="item" type="Object">
- </argument>
- <argument index="1" name="column" type="int">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
- <description>
- Emitted when a button on the tree was pressed (see [method TreeItem.add_button]).
- </description>
- </signal>
- <signal name="cell_selected">
- <description>
- Emitted when a cell is selected.
- </description>
- </signal>
- <signal name="column_title_pressed">
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="custom_popup_edited">
- <argument index="0" name="arrow_clicked" type="bool">
- </argument>
- <description>
- Emitted when a cell with the [code]CELL_MODE_CUSTOM[/code] is clicked to be edited.
- </description>
- </signal>
- <signal name="empty_tree_rmb_selected">
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty.
- </description>
- </signal>
- <signal name="item_activated">
- <description>
- Emitted when an item is activated (double-clicked).
- </description>
- </signal>
- <signal name="item_collapsed">
- <argument index="0" name="item" type="Object">
- </argument>
- <description>
- Emitted when an item is collapsed by a click on the folding arrow.
- </description>
- </signal>
- <signal name="item_custom_button_pressed">
- <description>
- </description>
- </signal>
- <signal name="item_double_clicked">
- <description>
- </description>
- </signal>
- <signal name="item_edited">
- <description>
- Emitted when an item is editted.
- </description>
- </signal>
- <signal name="item_rmb_edited">
- <description>
- </description>
- </signal>
- <signal name="item_rmb_selected">
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Emitted when an item is selected with right mouse button.
- </description>
- </signal>
- <signal name="item_selected">
- <description>
- Emitted when an item is selected with right mouse button.
- </description>
- </signal>
- <signal name="multi_selected">
- <argument index="0" name="item" type="Object">
- </argument>
- <argument index="1" name="column" type="int">
- </argument>
- <argument index="2" name="selected" type="bool">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="SELECT_SINGLE" value="0">
- </constant>
- <constant name="SELECT_ROW" value="1">
- </constant>
- <constant name="SELECT_MULTI" value="2">
- </constant>
- <constant name="DROP_MODE_DISABLED" value="0">
- </constant>
- <constant name="DROP_MODE_ON_ITEM" value="1">
- </constant>
- <constant name="DROP_MODE_INBETWEEN" value="2">
- </constant>
- </constants>
- <theme_items>
- <theme_item name="arrow" type="Texture">
- </theme_item>
- <theme_item name="arrow_collapsed" type="Texture">
- </theme_item>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="bg_focus" type="StyleBox">
- </theme_item>
- <theme_item name="button_margin" type="int">
- </theme_item>
- <theme_item name="button_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="checked" type="Texture">
- </theme_item>
- <theme_item name="cursor" type="StyleBox">
- </theme_item>
- <theme_item name="cursor_color" type="Color">
- </theme_item>
- <theme_item name="cursor_unfocused" type="StyleBox">
- </theme_item>
- <theme_item name="custom_button" type="StyleBox">
- </theme_item>
- <theme_item name="custom_button_font_highlight" type="Color">
- </theme_item>
- <theme_item name="custom_button_hover" type="StyleBox">
- </theme_item>
- <theme_item name="custom_button_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="draw_relationship_lines" type="int">
- </theme_item>
- <theme_item name="drop_position_color" type="Color">
- </theme_item>
- <theme_item name="font" type="Font">
- </theme_item>
- <theme_item name="font_color" type="Color">
- </theme_item>
- <theme_item name="font_color_selected" type="Color">
- </theme_item>
- <theme_item name="guide_color" type="Color">
- </theme_item>
- <theme_item name="guide_width" type="int">
- </theme_item>
- <theme_item name="hseparation" type="int">
- </theme_item>
- <theme_item name="item_margin" type="int">
- </theme_item>
- <theme_item name="relationship_line_color" type="Color">
- </theme_item>
- <theme_item name="scroll_border" type="int">
- </theme_item>
- <theme_item name="scroll_speed" type="int">
- </theme_item>
- <theme_item name="select_arrow" type="Texture">
- </theme_item>
- <theme_item name="selected" type="StyleBox">
- </theme_item>
- <theme_item name="selected_focus" type="StyleBox">
- </theme_item>
- <theme_item name="selection_color" type="Color">
- </theme_item>
- <theme_item name="title_button_color" type="Color">
- </theme_item>
- <theme_item name="title_button_font" type="Font">
- </theme_item>
- <theme_item name="title_button_hover" type="StyleBox">
- </theme_item>
- <theme_item name="title_button_normal" type="StyleBox">
- </theme_item>
- <theme_item name="title_button_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="unchecked" type="Texture">
- </theme_item>
- <theme_item name="updown" type="Texture">
- </theme_item>
- <theme_item name="vseparation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="TreeItem" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_button">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button" type="Texture">
- </argument>
- <argument index="2" name="button_idx" type="int" default="-1">
- </argument>
- <argument index="3" name="disabled" type="bool" default="false">
- </argument>
- <argument index="4" name="tooltip" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_custom_bg_color">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_custom_color">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="deselect">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="erase_button">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_button" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_button_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_cell_mode" qualifiers="const">
- <return type="int" enum="TreeItem.TreeCellMode">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_children">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_custom_bg_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_expand_right" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon" qualifiers="const">
- <return type="Texture">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon_max_width" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon_region" qualifiers="const">
- <return type="Rect2">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_metadata" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_next">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_next_visible">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_parent">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_prev">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_prev_visible">
- <return type="TreeItem">
- </return>
- <description>
- </description>
- </method>
- <method name="get_range" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_range_config">
- <return type="Dictionary">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_text" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_text_align" qualifiers="const">
- <return type="int" enum="TreeItem.TextAlign">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tooltip" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_button_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_checked" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_collapsed">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_custom_set_as_button" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_editable">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_folding_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_selectable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_selected">
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="move_to_bottom">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="move_to_top">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_child">
- <return type="void">
- </return>
- <argument index="0" name="child" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="select">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_button">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <argument index="2" name="button" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_cell_mode">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_checked">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="checked" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collapsed">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_as_button">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_bg_color">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="just_outline" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_color">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_draw">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="object" type="Object">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disable_folding">
- <return type="void">
- </return>
- <argument index="0" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_editable">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_right">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon_max_width">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="width" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon_region">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="region" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_metadata">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="meta" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="value" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range_config">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="min" type="float">
- </argument>
- <argument index="2" name="max" type="float">
- </argument>
- <argument index="3" name="step" type="float">
- </argument>
- <argument index="4" name="expr" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_selectable">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="selectable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_text">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_text_align">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tooltip">
- <return type="void">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="tooltip" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="CELL_MODE_STRING" value="0">
- </constant>
- <constant name="CELL_MODE_CHECK" value="1">
- </constant>
- <constant name="CELL_MODE_RANGE" value="2">
- </constant>
- <constant name="CELL_MODE_RANGE_EXPRESSION" value="3">
- </constant>
- <constant name="CELL_MODE_ICON" value="4">
- </constant>
- <constant name="CELL_MODE_CUSTOM" value="5">
- </constant>
- </constants>
-</class>
-<class name="TriangleMesh" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Tween" inherits="Node" category="Core">
- <brief_description>
- Node useful for animations with unknown start and end points.
- </brief_description>
- <description>
- Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior.
- Because it is easy to get it wrong, here is a quick usage example:
- [codeblock]
- var tween = get_node("Tween")
- tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
- tween.start()
- [/codeblock]
- Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor.
- Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best.
- </description>
- <methods>
- <method name="follow_method">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="target" type="Object">
- </argument>
- <argument index="4" name="target_method" type="String">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="follow_property">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="target" type="Object">
- </argument>
- <argument index="4" name="target_property" type="String">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="get_runtime" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
- </description>
- </method>
- <method name="get_speed_scale" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the speed that has been set from editor GUI or [method set_repeat].
- </description>
- </method>
- <method name="get_tween_process_mode" qualifiers="const">
- <return type="int" enum="Tween.TweenProcessMode">
- </return>
- <description>
- Returns the process mode that has been set from editor GUI or [method set_tween_process_mode]
- </description>
- </method>
- <method name="interpolate_callback">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <argument index="3" name="arg1" type="Variant" default="null">
- </argument>
- <argument index="4" name="arg2" type="Variant" default="null">
- </argument>
- <argument index="5" name="arg3" type="Variant" default="null">
- </argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
- </argument>
- <description>
- Call [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
- </description>
- </method>
- <method name="interpolate_deferred_callback">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="duration" type="float">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <argument index="3" name="arg1" type="Variant" default="null">
- </argument>
- <argument index="4" name="arg2" type="Variant" default="null">
- </argument>
- <argument index="5" name="arg3" type="Variant" default="null">
- </argument>
- <argument index="6" name="arg4" type="Variant" default="null">
- </argument>
- <argument index="7" name="arg5" type="Variant" default="null">
- </argument>
- <description>
- Call [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
- </description>
- </method>
- <method name="interpolate_method">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
- <description>
- Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="interpolate_property">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="initial_val" type="Variant">
- </argument>
- <argument index="3" name="final_val" type="Variant">
- </argument>
- <argument index="4" name="duration" type="float">
- </argument>
- <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="7" name="delay" type="float" default="0">
- </argument>
- <description>
- Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="is_active" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended.
- </description>
- </method>
- <method name="is_repeat" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if repeat has been set from editor GUI or [method set_repeat].
- </description>
- </method>
- <method name="remove">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object.
- </description>
- </method>
- <method name="remove_all">
- <return type="bool">
- </return>
- <description>
- Stop animating and completely remove all tweens.
- </description>
- </method>
- <method name="reset">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object.
- </description>
- </method>
- <method name="reset_all">
- <return type="bool">
- </return>
- <description>
- Resets all tweens to their initial values (the ones given, not those before the tween).
- </description>
- </method>
- <method name="resume">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object.
- </description>
- </method>
- <method name="resume_all">
- <return type="bool">
- </return>
- <description>
- Continue animating all stopped tweens.
- </description>
- </method>
- <method name="seek">
- <return type="bool">
- </return>
- <argument index="0" name="time" type="float">
- </argument>
- <description>
- Seek the animation to the given [code]time[/code] in seconds.
- </description>
- </method>
- <method name="set_active">
- <return type="void">
- </return>
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this.
- </description>
- </method>
- <method name="set_repeat">
- <return type="void">
- </return>
- <argument index="0" name="repeat" type="bool">
- </argument>
- <description>
- Make the tween repeat after all tweens have finished.
- </description>
- </method>
- <method name="set_speed_scale">
- <return type="void">
- </return>
- <argument index="0" name="speed" type="float">
- </argument>
- <description>
- Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this.
- </description>
- </method>
- <method name="set_tween_process_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode">
- </argument>
- <description>
- Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively).
- </description>
- </method>
- <method name="start">
- <return type="bool">
- </return>
- <description>
- Start the tween node. You can define tweens both before and after this.
- </description>
- </method>
- <method name="stop">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object.
- </description>
- </method>
- <method name="stop_all">
- <return type="bool">
- </return>
- <description>
- Stop animating all tweens.
- </description>
- </method>
- <method name="targeting_method">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_method" type="String">
- </argument>
- <argument index="4" name="final_val" type="Variant">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="targeting_property">
- <return type="bool">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="initial" type="Object">
- </argument>
- <argument index="3" name="initial_val" type="String">
- </argument>
- <argument index="4" name="final_val" type="Variant">
- </argument>
- <argument index="5" name="duration" type="float">
- </argument>
- <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
- </argument>
- <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
- </argument>
- <argument index="8" name="delay" type="float" default="0">
- </argument>
- <description>
- Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
- [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
- </description>
- </method>
- <method name="tell" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the current time of the tween.
- </description>
- </method>
- </methods>
- <members>
- <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" brief="" enum="Tween.TweenProcessMode">
- </member>
- </members>
- <signals>
- <signal name="tween_completed">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <description>
- This signal is emitted when a tween ends.
- </description>
- </signal>
- <signal name="tween_started">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <description>
- This signal is emitted when a tween starts.
- </description>
- </signal>
- <signal name="tween_step">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="key" type="String">
- </argument>
- <argument index="2" name="elapsed" type="float">
- </argument>
- <argument index="3" name="value" type="Object">
- </argument>
- <description>
- This signal is emitted each step of the tweening.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="TWEEN_PROCESS_FIXED" value="0">
- The [Tween] should use [code]_fixed_process[/code] for timekeeping when this is enabled.
- </constant>
- <constant name="TWEEN_PROCESS_IDLE" value="1">
- The [Tween] should use [code]_process[/code] for timekeeping when this is enabled (default).
- </constant>
- <constant name="TRANS_LINEAR" value="0">
- Means that the animation is interpolated linearly.
- </constant>
- <constant name="TRANS_SINE" value="1">
- Means that the animation is interpolated using a sine wave.
- </constant>
- <constant name="TRANS_QUINT" value="2">
- Means that the animation is interpolated with a quinary (to the power of 5) function.
- </constant>
- <constant name="TRANS_QUART" value="3">
- Means that the animation is interpolated with a quartic (to the power of 4) function.
- </constant>
- <constant name="TRANS_QUAD" value="4">
- Means that the animation is interpolated with a quadratic (to the power of 2) function.
- </constant>
- <constant name="TRANS_EXPO" value="5">
- Means that the animation is interpolated with an exponential (some number to the power of x) function.
- </constant>
- <constant name="TRANS_ELASTIC" value="6">
- Means that the animation is interpolated with elasticity, wiggling around the edges.
- </constant>
- <constant name="TRANS_CUBIC" value="7">
- Means that the animation is interpolated with a cubic (to the power of 3) function.
- </constant>
- <constant name="TRANS_CIRC" value="8">
- Means that the animation is interpolated with a function using square roots.
- </constant>
- <constant name="TRANS_BOUNCE" value="9">
- Means that the animation is interpolated by bouncing at, but never surpassing, the end.
- </constant>
- <constant name="TRANS_BACK" value="10">
- Means that the animation is interpolated backing out at edges.
- </constant>
- <constant name="EASE_IN" value="0">
- Signifies that the interpolation should be focused in the beginning.
- </constant>
- <constant name="EASE_OUT" value="1">
- Signifies that the interpolation should be focused in the end.
- </constant>
- <constant name="EASE_IN_OUT" value="2">
- Signifies that the interpolation should be focused in both ends.
- </constant>
- <constant name="EASE_OUT_IN" value="3">
- Signifies that the interpolation should be focused in both ends, but they should be switched (a bit hard to explain, try it for yourself to be sure).
- </constant>
- </constants>
-</class>
-<class name="UndoRedo" inherits="Object" category="Core">
- <brief_description>
- Helper to manage UndoRedo in the editor or custom tools.
- </brief_description>
- <description>
- Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists.
- Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
- </description>
- <methods>
- <method name="add_do_method" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_do_property">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Set a property with a custom value.
- </description>
- </method>
- <method name="add_do_reference">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <description>
- Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
- </description>
- </method>
- <method name="add_undo_method" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_undo_property">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="property" type="String">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Undo setting of a property with a custom value.
- </description>
- </method>
- <method name="add_undo_reference">
- <return type="void">
- </return>
- <argument index="0" name="object" type="Object">
- </argument>
- <description>
- Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!).
- </description>
- </method>
- <method name="clear_history">
- <return type="void">
- </return>
- <description>
- Clear the undo/redo history and associated references.
- </description>
- </method>
- <method name="commit_action">
- <return type="void">
- </return>
- <description>
- Commit the action. All 'do' methods/properties are called/set when this function is called.
- </description>
- </method>
- <method name="create_action">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0">
- </argument>
- <description>
- Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property].
- </description>
- </method>
- <method name="get_current_action_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the name of the current action.
- </description>
- </method>
- <method name="get_version" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically.
- This is useful mostly to check if something changed from a saved version.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="MERGE_DISABLE" value="0">
- </constant>
- <constant name="MERGE_ENDS" value="1">
- </constant>
- <constant name="MERGE_ALL" value="2">
- </constant>
- </constants>
-</class>
-<class name="VBoxContainer" inherits="BoxContainer" category="Core">
- <brief_description>
- Vertical box container.
- </brief_description>
- <description>
- Vertical box container. See [BoxContainer].
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="separation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="VScrollBar" inherits="ScrollBar" category="Core">
- <brief_description>
- Vertical version of [ScrollBar], which goes from left (min) to right (max).
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="decrement" type="Texture">
- </theme_item>
- <theme_item name="decrement_highlight" type="Texture">
- </theme_item>
- <theme_item name="grabber" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_pressed" type="StyleBox">
- </theme_item>
- <theme_item name="increment" type="Texture">
- </theme_item>
- <theme_item name="increment_highlight" type="Texture">
- </theme_item>
- <theme_item name="scroll" type="StyleBox">
- </theme_item>
- <theme_item name="scroll_focus" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="VSeparator" inherits="Separator" category="Core">
- <brief_description>
- Vertical version of [Separator].
- </brief_description>
- <description>
- Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="separation" type="int">
- </theme_item>
- <theme_item name="separator" type="StyleBox">
- </theme_item>
- </theme_items>
-</class>
-<class name="VSlider" inherits="Slider" category="Core">
- <brief_description>
- Vertical slider.
- </brief_description>
- <description>
- Vertical slider. See [Slider]. This one goes from left (min) to right (max).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="focus" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="Texture">
- </theme_item>
- <theme_item name="grabber_disabled" type="StyleBox">
- </theme_item>
- <theme_item name="grabber_highlight" type="Texture">
- </theme_item>
- <theme_item name="grabber_highlight" type="StyleBox">
- </theme_item>
- <theme_item name="slider" type="StyleBox">
- </theme_item>
- <theme_item name="tick" type="Texture">
- </theme_item>
- </theme_items>
-</class>
-<class name="VSplitContainer" inherits="SplitContainer" category="Core">
- <brief_description>
- Vertical split container.
- </brief_description>
- <description>
- Vertical split container. See [SplitContainer]. This goes from left to right.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="autohide" type="int">
- </theme_item>
- <theme_item name="bg" type="StyleBox">
- </theme_item>
- <theme_item name="grabber" type="Texture">
- </theme_item>
- <theme_item name="separation" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="Variant" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Vector2" category="Built-In Types">
- <brief_description>
- Vector used for 2D Math.
- </brief_description>
- <description>
- 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
- </description>
- <methods>
- <method name="Vector2">
- <return type="Vector2">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <description>
- Constructs a new Vector2 from the given x and y.
- </description>
- </method>
- <method name="abs">
- <return type="Vector2">
- </return>
- <description>
- Returns a new vector with all components in absolute values (i.e. positive).
- </description>
- </method>
- <method name="angle">
- <return type="float">
- </return>
- <description>
- Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
- Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
- </description>
- </method>
- <method name="angle_to">
- <return type="float">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Returns the angle in radians between the two vectors.
- </description>
- </method>
- <method name="angle_to_point">
- <return type="float">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Returns the angle in radians between the line connecting the two points and the x coordinate.
- </description>
- </method>
- <method name="aspect">
- <return type="float">
- </return>
- <description>
- Returns the ratio of X to Y.
- </description>
- </method>
- <method name="bounce">
- <return type="Vector2">
- </return>
- <argument index="0" name="n" type="Vector2">
- </argument>
- <description>
- Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="clamped">
- <return type="Vector2">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- Returns the vector with a maximum length.
- </description>
- </method>
- <method name="cubic_interpolate">
- <return type="Vector2">
- </return>
- <argument index="0" name="b" type="Vector2">
- </argument>
- <argument index="1" name="pre_a" type="Vector2">
- </argument>
- <argument index="2" name="post_b" type="Vector2">
- </argument>
- <argument index="3" name="t" type="float">
- </argument>
- <description>
- Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t".
- </description>
- </method>
- <method name="distance_squared_to">
- <return type="float">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Returns the squared distance to vector "b". 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">
- <return type="float">
- </return>
- <argument index="0" name="to" type="Vector2">
- </argument>
- <description>
- Returns the distance to vector "b".
- </description>
- </method>
- <method name="dot">
- <return type="float">
- </return>
- <argument index="0" name="with" type="Vector2">
- </argument>
- <description>
- Returns the dot product with vector "b".
- </description>
- </method>
- <method name="floor">
- <return type="Vector2">
- </return>
- <description>
- Remove the fractional part of x and y.
- </description>
- </method>
- <method name="is_normalized">
- <return type="bool">
- </return>
- <description>
- Returns whether the vector is normalized or not.
- </description>
- </method>
- <method name="length">
- <return type="float">
- </return>
- <description>
- Returns the length of the vector.
- </description>
- </method>
- <method name="length_squared">
- <return type="float">
- </return>
- <description>
- Returns the squared length of the vector. 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">
- <return type="Vector2">
- </return>
- <argument index="0" name="b" type="Vector2">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Returns the result of the linear interpolation between this vector and "b", by amount "t".
- </description>
- </method>
- <method name="normalized">
- <return type="Vector2">
- </return>
- <description>
- Returns a normalized vector to unit length.
- </description>
- </method>
- <method name="reflect">
- <return type="Vector2">
- </return>
- <argument index="0" name="n" type="Vector2">
- </argument>
- <description>
- Reflects the vector along the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="rotated">
- <return type="Vector2">
- </return>
- <argument index="0" name="phi" type="float">
- </argument>
- <description>
- Rotates the vector by "phi" radians.
- </description>
- </method>
- <method name="slide">
- <return type="Vector2">
- </return>
- <argument index="0" name="n" type="Vector2">
- </argument>
- <description>
- Slide returns the component of the vector along the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="snapped">
- <return type="Vector2">
- </return>
- <argument index="0" name="by" type="Vector2">
- </argument>
- <description>
- Snaps the vector to a grid with the given size.
- </description>
- </method>
- <method name="tangent">
- <return type="Vector2">
- </return>
- <description>
- Returns a perpendicular vector.
- </description>
- </method>
- </methods>
- <members>
- <member name="x" type="float" setter="" getter="" brief="">
- X component of the vector.
- </member>
- <member name="y" type="float" setter="" getter="" brief="">
- Y component of the vector.
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="Vector3" category="Built-In Types">
- <brief_description>
- Vector class, which performs basic 3D vector math operations.
- </brief_description>
- <description>
- Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
- </description>
- <methods>
- <method name="Vector3">
- <return type="Vector3">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <argument index="2" name="z" type="float">
- </argument>
- <description>
- Returns a Vector3 with the given components.
- </description>
- </method>
- <method name="abs">
- <return type="Vector3">
- </return>
- <description>
- Returns a new vector with all components in absolute values (i.e. positive).
- </description>
- </method>
- <method name="angle_to">
- <return type="float">
- </return>
- <argument index="0" name="to" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="bounce">
- <return type="Vector3">
- </return>
- <argument index="0" name="n" type="Vector3">
- </argument>
- <description>
- Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="ceil">
- <return type="Vector3">
- </return>
- <description>
- Returns a new vector with all components rounded up.
- </description>
- </method>
- <method name="cross">
- <return type="Vector3">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <description>
- Return the cross product with b.
- </description>
- </method>
- <method name="cubic_interpolate">
- <return type="Vector3">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <argument index="1" name="pre_a" type="Vector3">
- </argument>
- <argument index="2" name="post_b" type="Vector3">
- </argument>
- <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).
- </description>
- </method>
- <method name="distance_squared_to">
- <return type="float">
- </return>
- <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.
- </description>
- </method>
- <method name="distance_to">
- <return type="float">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <description>
- Return the distance to b.
- </description>
- </method>
- <method name="dot">
- <return type="float">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <description>
- Return the dot product with b.
- </description>
- </method>
- <method name="floor">
- <return type="Vector3">
- </return>
- <description>
- Returns a new vector with all components rounded down.
- </description>
- </method>
- <method name="inverse">
- <return type="Vector3">
- </return>
- <description>
- Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
- </description>
- </method>
- <method name="is_normalized">
- <return type="bool">
- </return>
- <description>
- Returns whether the vector is normalized or not.
- </description>
- </method>
- <method name="length">
- <return type="float">
- </return>
- <description>
- Return 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.
- </description>
- </method>
- <method name="linear_interpolate">
- <return type="Vector3">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <argument index="1" name="t" type="float">
- </argument>
- <description>
- Linearly interpolates the vector to a given one (b), by the given amount (t).
- </description>
- </method>
- <method name="max_axis">
- <return type="int">
- </return>
- <description>
- Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest.
- </description>
- </method>
- <method name="min_axis">
- <return type="int">
- </return>
- <description>
- Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest.
- </description>
- </method>
- <method name="normalized">
- <return type="Vector3">
- </return>
- <description>
- Return a copy of the normalized vector to unit length. This is the same as v / v.length().
- </description>
- </method>
- <method name="outer">
- <return type="Basis">
- </return>
- <argument index="0" name="b" type="Vector3">
- </argument>
- <description>
- Return the outer product with b.
- </description>
- </method>
- <method name="reflect">
- <return type="Vector3">
- </return>
- <argument index="0" name="n" type="Vector3">
- </argument>
- <description>
- Reflects the vector along the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="rotated">
- <return type="Vector3">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="phi" type="float">
- </argument>
- <description>
- Rotates the vector around some axis by phi radians. The axis must be a normalized vector.
- </description>
- </method>
- <method name="slide">
- <return type="Vector3">
- </return>
- <argument index="0" name="n" type="Vector3">
- </argument>
- <description>
- Slide returns the component of the vector along the given plane, specified by its normal vector.
- </description>
- </method>
- <method name="snapped">
- <return type="Vector3">
- </return>
- <argument index="0" name="by" type="float">
- </argument>
- <description>
- Return 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.
- </description>
- </method>
- </methods>
- <members>
- <member name="x" type="float" setter="" getter="" brief="">
- X component of the vector.
- </member>
- <member name="y" type="float" setter="" getter="" brief="">
- Y component of the vector.
- </member>
- <member name="z" type="float" setter="" getter="" brief="">
- Z component of the vector.
- </member>
- </members>
- <constants>
- <constant name="AXIS_X" value="0" enum="">
- Enumerated value for the X axis. Returned by functions like max_axis or min_axis.
- </constant>
- <constant name="AXIS_Y" value="1" enum="">
- Enumerated value for the Y axis.
- </constant>
- <constant name="AXIS_Z" value="2" enum="">
- Enumerated value for the Z axis.
- </constant>
- </constants>
-</class>
-<class name="VehicleBody" inherits="PhysicsBody" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_brake" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_engine_force" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_friction" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
- [codeblock]
- # vehicle is an instance of VehicleBody
- var speed = vehicle.get_linear_velocity().length()
- [/codeblock]
- </description>
- </method>
- <method name="get_mass" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_steering" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the steering angle (in radians).
- </description>
- </method>
- <method name="set_brake">
- <return type="void">
- </return>
- <argument index="0" name="brake" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_engine_force">
- <return type="void">
- </return>
- <argument index="0" name="engine_force" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_friction">
- <return type="void">
- </return>
- <argument index="0" name="friction" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mass">
- <return type="void">
- </return>
- <argument index="0" name="mass" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_steering">
- <return type="void">
- </return>
- <argument index="0" name="steering" type="float">
- </argument>
- <description>
- Set the steering angle (in radians).
- </description>
- </method>
- </methods>
- <members>
- <member name="brake" type="float" setter="set_brake" getter="get_brake" brief="">
- </member>
- <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" brief="">
- </member>
- <member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
- </member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
- </member>
- <member name="steering" type="float" setter="set_steering" getter="get_steering" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VehicleWheel" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_damping_compression" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_damping_relaxation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_friction_slip" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_roll_influence" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_suspension_max_force" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_suspension_rest_length" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_suspension_stiffness" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_suspension_travel" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="is_in_contact" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_used_as_steering" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_used_as_traction" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_damping_compression">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_damping_relaxation">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_friction_slip">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_radius">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_roll_influence">
- <return type="void">
- </return>
- <argument index="0" name="roll_influence" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_suspension_max_force">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_suspension_rest_length">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_suspension_stiffness">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_suspension_travel">
- <return type="void">
- </return>
- <argument index="0" name="length" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_as_steering">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_as_traction">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" brief="">
- </member>
- <member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation" brief="">
- </member>
- <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" brief="">
- </member>
- <member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" brief="">
- </member>
- <member name="suspension_travel" type="float" setter="set_suspension_travel" getter="get_suspension_travel" brief="">
- </member>
- <member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering" brief="">
- </member>
- <member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction" brief="">
- </member>
- <member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip" brief="">
- </member>
- <member name="wheel_radius" type="float" setter="set_radius" getter="get_radius" brief="">
- </member>
- <member name="wheel_rest_length" type="float" setter="set_suspension_rest_length" getter="get_suspension_rest_length" brief="">
- </member>
- <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VideoPlayer" inherits="Control" category="Core">
- <brief_description>
- Control to play video files.
- </brief_description>
- <description>
- This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project.
- </description>
- <methods>
- <method name="get_audio_track" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the selected audio track (for multitrack videos).
- </description>
- </method>
- <method name="get_buffering_msec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the amount of miliseconds to store in buffer while playing.
- </description>
- </method>
- <method name="get_stream" qualifiers="const">
- <return type="VideoStream">
- </return>
- <description>
- Get the video stream.
- </description>
- </method>
- <method name="get_stream_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the name of the video stream.
- </description>
- </method>
- <method name="get_stream_pos" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the current position of the stream, in seconds.
- </description>
- </method>
- <method name="get_video_texture">
- <return type="Texture">
- </return>
- <description>
- Get the current frame of the video as a [Texture].
- </description>
- </method>
- <method name="get_volume" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the volume of the audio track as a linear value.
- </description>
- </method>
- <method name="get_volume_db" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Get the volume of the audio track in decibels.
- </description>
- </method>
- <method name="has_autoplay" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether or not the video is set as autoplay.
- </description>
- </method>
- <method name="has_expand" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether or not the expand property is set.
- </description>
- </method>
- <method name="is_paused" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether or not the video is paused.
- </description>
- </method>
- <method name="is_playing" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether or not the video is playing.
- </description>
- </method>
- <method name="play">
- <return type="void">
- </return>
- <description>
- Start the video playback.
- </description>
- </method>
- <method name="set_audio_track">
- <return type="void">
- </return>
- <argument index="0" name="track" type="int">
- </argument>
- <description>
- Set the audio track (for multitrack videos).
- </description>
- </method>
- <method name="set_autoplay">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether this node should start playing automatically.
- </description>
- </method>
- <method name="set_buffering_msec">
- <return type="void">
- </return>
- <argument index="0" name="msec" type="int">
- </argument>
- <description>
- Set the amount of miliseconds to buffer during playback.
- </description>
- </method>
- <method name="set_expand">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution.
- </description>
- </method>
- <method name="set_paused">
- <return type="void">
- </return>
- <argument index="0" name="paused" type="bool">
- </argument>
- <description>
- Set whether the video should pause the playback.
- </description>
- </method>
- <method name="set_stream">
- <return type="void">
- </return>
- <argument index="0" name="stream" type="VideoStream">
- </argument>
- <description>
- Set the video stream for this player.
- </description>
- </method>
- <method name="set_volume">
- <return type="void">
- </return>
- <argument index="0" name="volume" type="float">
- </argument>
- <description>
- Set the audio volume as a linear value.
- </description>
- </method>
- <method name="set_volume_db">
- <return type="void">
- </return>
- <argument index="0" name="db" type="float">
- </argument>
- <description>
- Set the audio volume in decibels.
- </description>
- </method>
- <method name="stop">
- <return type="void">
- </return>
- <description>
- Stop the video playback.
- </description>
- </method>
- </methods>
- <members>
- <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track" brief="">
- </member>
- <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay" brief="">
- </member>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" brief="">
- </member>
- <member name="paused" type="bool" setter="set_paused" getter="is_paused" brief="">
- </member>
- <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream" brief="">
- </member>
- <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VideoStream" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Viewport" inherits="Node" category="Core">
- <brief_description>
- Creates a sub-view into the screen.
- </brief_description>
- <description>
- A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
- Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
- If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually.
- Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
- Also, viewports can be assigned to different screens in case the devices have multiple screens.
- Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
- </description>
- <methods>
- <method name="find_world" qualifiers="const">
- <return type="World">
- </return>
- <description>
- Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
- </description>
- </method>
- <method name="find_world_2d" qualifiers="const">
- <return type="World2D">
- </return>
- <description>
- Return the 2D world of the viewport.
- </description>
- </method>
- <method name="get_camera" qualifiers="const">
- <return type="Camera">
- </return>
- <description>
- Return the active 3D camera.
- </description>
- </method>
- <method name="get_canvas_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the canvas transform of the viewport.
- </description>
- </method>
- <method name="get_clear_mode" qualifiers="const">
- <return type="int" enum="Viewport.ClearMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_debug_draw" qualifiers="const">
- <return type="int" enum="Viewport.DebugDraw">
- </return>
- <description>
- </description>
- </method>
- <method name="get_final_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the total transform of the viewport.
- </description>
- </method>
- <method name="get_global_canvas_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <description>
- Get the global canvas transform of the viewport.
- </description>
- </method>
- <method name="get_hdr" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get whether the rendered texture has filters enabled.
- </description>
- </method>
- <method name="get_mouse_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Get the mouse position, relative to the viewport.
- </description>
- </method>
- <method name="get_msaa" qualifiers="const">
- <return type="int" enum="Viewport.MSAA">
- </return>
- <description>
- </description>
- </method>
- <method name="get_physics_object_picking">
- <return type="bool">
- </return>
- <description>
- Get whether picking for all physics objects inside the viewport is enabled.
- </description>
- </method>
- <method name="get_render_info">
- <return type="int">
- </return>
- <argument index="0" name="info" type="int" enum="Viewport.RenderInfo">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const">
- <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </return>
- <argument index="0" name="quadrant" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shadow_atlas_size" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space.
- </description>
- </method>
- <method name="get_size_override" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Get the size override set with [method set_size_override].
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="ViewportTexture">
- </return>
- <description>
- Get the viewport's texture, for use with various objects that you want to texture with the viewport.
- </description>
- </method>
- <method name="get_update_mode" qualifiers="const">
- <return type="int" enum="Viewport.UpdateMode">
- </return>
- <description>
- Get when the viewport would be updated, will be one of the [code]UPDATE_*[/code] constants.
- </description>
- </method>
- <method name="get_usage" qualifiers="const">
- <return type="int" enum="Viewport.Usage">
- </return>
- <description>
- </description>
- </method>
- <method name="get_vflip" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Set whether the render target is flipped on the Y axis.
- </description>
- </method>
- <method name="get_viewport_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- Get the viewport RID from the [VisualServer].
- </description>
- </method>
- <method name="get_visible_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return the final, visible rect in global screen coordinates.
- </description>
- </method>
- <method name="get_world" qualifiers="const">
- <return type="World">
- </return>
- <description>
- Return the 3D world of the viewport.
- </description>
- </method>
- <method name="get_world_2d" qualifiers="const">
- <return type="World2D">
- </return>
- <description>
- Return the 2D world of the viewport.
- </description>
- </method>
- <method name="gui_get_drag_data" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
- </description>
- </method>
- <method name="gui_has_modal_stack" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returs whether there are shown modals on-screen.
- </description>
- </method>
- <method name="has_transparent_background" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the viewport lets whatever is behind it to show.
- </description>
- </method>
- <method name="input">
- <return type="void">
- </return>
- <argument index="0" name="local_event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_3d_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_audio_listener" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the viewport sends sounds to the speakers.
- </description>
- </method>
- <method name="is_audio_listener_2d" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
- </description>
- </method>
- <method name="is_input_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether input to the viewport is disabled.
- </description>
- </method>
- <method name="is_size_override_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get the enabled status of the size override set with [method set_size_override].
- </description>
- </method>
- <method name="is_size_override_stretch_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Get the enabled status of the size strech override set with [method set_size_override_stretch].
- </description>
- </method>
- <method name="is_using_own_world" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the viewport is using a world separate from the parent viewport's world.
- </description>
- </method>
- <method name="set_as_audio_listener">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Makes the viewport send sounds to the speakers.
- </description>
- </method>
- <method name="set_as_audio_listener_2d">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Makes the viewport send sounds from 2D emitters to the speakers.
- </description>
- </method>
- <method name="set_attach_to_screen_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_canvas_transform">
- <return type="void">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <description>
- Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport.
- </description>
- </method>
- <method name="set_clear_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Viewport.ClearMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_debug_draw">
- <return type="void">
- </return>
- <argument index="0" name="debug_draw" type="int" enum="Viewport.DebugDraw">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disable_3d">
- <return type="void">
- </return>
- <argument index="0" name="disable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disable_input">
- <return type="void">
- </return>
- <argument index="0" name="disable" type="bool">
- </argument>
- <description>
- Set whether input to the viewport is disabled.
- </description>
- </method>
- <method name="set_global_canvas_transform">
- <return type="void">
- </return>
- <argument index="0" name="xform" type="Transform2D">
- </argument>
- <description>
- Set the global canvas transform of the viewport. The canvas transform is relative to this.
- </description>
- </method>
- <method name="set_hdr">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_msaa">
- <return type="void">
- </return>
- <argument index="0" name="msaa" type="int" enum="Viewport.MSAA">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_physics_object_picking">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable/disable picking for all physics objects inside the viewport.
- </description>
- </method>
- <method name="set_shadow_atlas_quadrant_subdiv">
- <return type="void">
- </return>
- <argument index="0" name="quadrant" type="int">
- </argument>
- <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shadow_atlas_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Set the size of the viewport.
- </description>
- </method>
- <method name="set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
- </argument>
- <argument index="2" name="margin" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
- </description>
- </method>
- <method name="set_size_override_stretch">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether the size override affects stretch as well.
- </description>
- </method>
- <method name="set_transparent_background">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- If this viewport is a child of another viewport, keep the previously drawn background visible.
- </description>
- </method>
- <method name="set_update_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Viewport.UpdateMode">
- </argument>
- <description>
- Set when the render target would be updated, using the [code]UPDATE_*[/code] constants
- </description>
- </method>
- <method name="set_usage">
- <return type="void">
- </return>
- <argument index="0" name="usage" type="int" enum="Viewport.Usage">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_arvr">
- <return type="void">
- </return>
- <argument index="0" name="use" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_own_world">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Make the viewport use a world separate from the parent viewport's world.
- </description>
- </method>
- <method name="set_vflip">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether the viewport is flipped on the Y axis.
- </description>
- </method>
- <method name="set_world">
- <return type="void">
- </return>
- <argument index="0" name="world" type="World">
- </argument>
- <description>
- Change the 3D world of the viewport.
- </description>
- </method>
- <method name="set_world_2d">
- <return type="void">
- </return>
- <argument index="0" name="world_2d" type="World2D">
- </argument>
- <description>
- </description>
- </method>
- <method name="unhandled_input">
- <return type="void">
- </return>
- <argument index="0" name="local_event" type="InputEvent">
- </argument>
- <description>
- </description>
- </method>
- <method name="update_worlds">
- <return type="void">
- </return>
- <description>
- Force update of the 2D and 3D worlds.
- </description>
- </method>
- <method name="use_arvr">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="warp_mouse">
- <return type="void">
- </return>
- <argument index="0" name="to_pos" type="Vector2">
- </argument>
- <description>
- Warp the mouse to a position, relative to the viewport.
- </description>
- </method>
- </methods>
- <members>
- <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" brief="">
- </member>
- <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" brief="">
- </member>
- <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" brief="">
- </member>
- <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" brief="" enum="Viewport.DebugDraw">
- </member>
- <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" brief="">
- </member>
- <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" brief="">
- </member>
- <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" brief="">
- </member>
- <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" brief="" enum="Viewport.MSAA">
- </member>
- <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" brief="">
- </member>
- <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" brief="">
- </member>
- <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" brief="" enum="Viewport.ClearMode">
- </member>
- <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="" enum="Viewport.UpdateMode">
- </member>
- <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" brief="">
- </member>
- <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </member>
- <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </member>
- <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </member>
- <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
- </member>
- <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" brief="">
- </member>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" brief="">
- </member>
- <member name="usage" type="int" setter="set_usage" getter="get_usage" brief="" enum="Viewport.Usage">
- </member>
- <member name="world" type="World" setter="set_world" getter="get_world" brief="">
- </member>
- </members>
- <signals>
- <signal name="size_changed">
- <description>
- Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="UPDATE_DISABLED" value="0">
- Do not update the render target.
- </constant>
- <constant name="UPDATE_ONCE" value="1">
- Update the render target once, then switch to [code]UPDATE_DISABLED[/code]
- </constant>
- <constant name="UPDATE_WHEN_VISIBLE" value="2">
- Update the render target only when it is visible. This is the default value.
- </constant>
- <constant name="UPDATE_ALWAYS" value="3">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6">
- </constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7">
- </constant>
- <constant name="RENDER_INFO_OBJECTS_IN_FRAME" value="0">
- </constant>
- <constant name="RENDER_INFO_VERTICES_IN_FRAME" value="1">
- </constant>
- <constant name="RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2">
- </constant>
- <constant name="RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3">
- </constant>
- <constant name="RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4">
- </constant>
- <constant name="RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5">
- </constant>
- <constant name="RENDER_INFO_MAX" value="6">
- </constant>
- <constant name="DEBUG_DRAW_DISABLED" value="0">
- </constant>
- <constant name="DEBUG_DRAW_UNSHADED" value="1">
- </constant>
- <constant name="DEBUG_DRAW_OVERDRAW" value="2">
- </constant>
- <constant name="DEBUG_DRAW_WIREFRAME" value="3">
- </constant>
- <constant name="MSAA_DISABLED" value="0">
- </constant>
- <constant name="MSAA_2X" value="1">
- </constant>
- <constant name="MSAA_4X" value="2">
- </constant>
- <constant name="MSAA_8X" value="3">
- </constant>
- <constant name="MSAA_16X" value="4">
- </constant>
- </constants>
-</class>
-<class name="ViewportContainer" inherits="Container" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="is_stretch_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_stretch">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="ViewportTexture" inherits="Texture" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_viewport_path_in_scene" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="set_viewport_path_in_scene">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core">
- <brief_description>
- Enable certain nodes only when visible.
- </brief_description>
- <description>
- The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
- </description>
- <methods>
- <method name="is_enabler_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
- </argument>
- <description>
- Returns whether the specified enabler was set to true or not.
- </description>
- </method>
- <method name="set_enabler">
- <return type="void">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
- </description>
- </method>
- </methods>
- <members>
- <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- </members>
- <constants>
- <constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody] nodes.
- </constant>
- <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
- This enabler will pause [AnimationPlayer] nodes.
- </constant>
- <constant name="ENABLER_MAX" value="2">
- </constant>
- </constants>
-</class>
-<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core">
- <brief_description>
- Enable certain nodes only when visible.
- </brief_description>
- <description>
- The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
- </description>
- <methods>
- <method name="is_enabler_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
- </argument>
- <description>
- Returns whether the specified enabler was set to true or not.
- </description>
- </method>
- <method name="set_enabler">
- <return type="void">
- </return>
- <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
- </description>
- </method>
- </methods>
- <members>
- <member name="fixed_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" brief="">
- </member>
- </members>
- <constants>
- <constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody2D] nodes.
- </constant>
- <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
- This enabler will pause [AnimationPlayer] nodes.
- </constant>
- <constant name="ENABLER_PAUSE_PARTICLES" value="2">
- This enabler will stop [Particles2D] nodes.
- </constant>
- <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5">
- </constant>
- <constant name="ENABLER_PARENT_PROCESS" value="3">
- This enabler will stop the parent's _process function.
- </constant>
- <constant name="ENABLER_PARENT_FIXED_PROCESS" value="4">
- This enabler will stop the parent's _fixed_process function.
- </constant>
- <constant name="ENABLER_MAX" value="6">
- </constant>
- </constants>
-</class>
-<class name="VisibilityNotifier" inherits="Spatial" category="Core">
- <brief_description>
- Detect when the node is visible on screen.
- </brief_description>
- <description>
- The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen.
- </description>
- <methods>
- <method name="get_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- Return the visibility bounding box of the VisibilityNotifier.
- </description>
- </method>
- <method name="is_on_screen" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if any part of the bounding box is on the screen.
- </description>
- </method>
- <method name="set_aabb">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect3">
- </argument>
- <description>
- Set the visibility bounding box of the VisibilityNotifier.
- </description>
- </method>
- </methods>
- <members>
- <member name="aabb" type="Rect3" setter="set_aabb" getter="get_aabb" brief="">
- </member>
- </members>
- <signals>
- <signal name="camera_entered">
- <argument index="0" name="camera" type="Object">
- </argument>
- <description>
- Emitted when the VisibilityNotifier enters a [Camera]'s view.
- </description>
- </signal>
- <signal name="camera_exited">
- <argument index="0" name="camera" type="Object">
- </argument>
- <description>
- Emitted when the VisibilityNotifier exits a [Camera]'s view.
- </description>
- </signal>
- <signal name="screen_entered">
- <description>
- Emitted when the VisibilityNotifier enters the screen.
- </description>
- </signal>
- <signal name="screen_exited">
- <description>
- Emitted when the VisibilityNotifier exits the screen.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="VisibilityNotifier2D" inherits="Node2D" category="Core">
- <brief_description>
- Detect when the node is visible on screen.
- </brief_description>
- <description>
- The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
- </description>
- <methods>
- <method name="get_rect" qualifiers="const">
- <return type="Rect2">
- </return>
- <description>
- Return the visibility bounding rectangle of the VisibilityNotifier2D.
- </description>
- </method>
- <method name="is_on_screen" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return true if any part of the bounding rectangle is on the screen.
- </description>
- </method>
- <method name="set_rect">
- <return type="void">
- </return>
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- Set the visibility bounding rectangle of the VisibilityNotifier2D.
- </description>
- </method>
- </methods>
- <members>
- <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" brief="">
- </member>
- </members>
- <signals>
- <signal name="screen_entered">
- <description>
- Emitted when the VisibilityNotifier2D enters the screen.
- </description>
- </signal>
- <signal name="screen_exited">
- <description>
- Emitted when the VisibilityNotifier2D exits the screen.
- </description>
- </signal>
- <signal name="viewport_entered">
- <argument index="0" name="viewport" type="Object">
- </argument>
- <description>
- Emitted when the VisibilityNotifier2D enters a [Viewport]'s view.
- </description>
- </signal>
- <signal name="viewport_exited">
- <argument index="0" name="viewport" type="Object">
- </argument>
- <description>
- Emitted when the VisibilityNotifier2D exits a [Viewport]'s view.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="VisualInstance" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_layer_mask" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_transformed_aabb" qualifiers="const">
- <return type="Rect3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base">
- <return type="void">
- </return>
- <argument index="0" name="base" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_layer_mask">
- <return type="void">
- </return>
- <argument index="0" name="mask" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScript" inherits="Script" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_custom_signal">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_function">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_node">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <argument index="2" name="node" type="VisualScriptNode">
- </argument>
- <argument index="3" name="pos" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="default_value" type="Variant" default="null">
- </argument>
- <argument index="2" name="export" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_add_argument">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="int" enum="Variant.Type">
- </argument>
- <argument index="2" name="argname" type="String">
- </argument>
- <argument index="3" name="index" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_get_argument_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_get_argument_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_get_argument_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_remove_argument">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_set_argument_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <argument index="2" name="argname" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_set_argument_type">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <argument index="2" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="custom_signal_swap_argument">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="argidx" type="int">
- </argument>
- <argument index="2" name="withidx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="data_connect">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_port" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <argument index="4" name="to_port" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="data_disconnect">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_port" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <argument index="4" name="to_port" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_function_node_id" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_function_scroll" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node" qualifiers="const">
- <return type="VisualScriptNode">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_pos" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_variable_default_value" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_variable_export" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_variable_info" qualifiers="const">
- <return type="Dictionary">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_custom_signal" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_data_connection" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_port" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <argument index="4" name="to_port" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_function" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_node" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_sequence_connection" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_output" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_variable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_custom_signal">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_function">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_node">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="rename_custom_signal">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="rename_function">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="rename_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="new_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="sequence_connect">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_output" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sequence_disconnect">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="from_node" type="int">
- </argument>
- <argument index="2" name="from_output" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_function_scroll">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="ofs" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_instance_base_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_node_pos">
- <return type="void">
- </return>
- <argument index="0" name="func" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <argument index="2" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_variable_default_value">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_variable_export">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_variable_info">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
- </member>
- </members>
- <signals>
- <signal name="node_ports_changed">
- <argument index="0" name="function" type="String">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type_constant" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="name" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
- </member>
- <member name="constant/constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_func">
- <return type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
- </return>
- <description>
- </description>
- </method>
- <method name="set_func">
- <return type="void">
- </return>
- <argument index="0" name="which" type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="function" type="int" setter="set_func" getter="get_func" brief="" enum="VisualScriptBuiltinFunc.BuiltinFunc">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_base_type">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_class_constant">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_class_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- <member name="constant/constant" type="String" setter="set_class_constant" getter="get_class_constant" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_description" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_title" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_description">
- <return type="void">
- </return>
- <argument index="0" name="description" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="description" type="String" setter="set_description" getter="get_description" brief="">
- </member>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
- </member>
- <member name="title" type="String" setter="set_title" getter="get_title" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_constant_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_constant_value" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="set_constant_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constant_value">
- <return type="void">
- </return>
- <argument index="0" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" brief="" enum="Variant.Type">
- </member>
- <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_constructor" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- </description>
- </method>
- <method name="get_constructor_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_constructor">
- <return type="void">
- </return>
- <argument index="0" name="constructor" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constructor_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor" brief="">
- </member>
- <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="_get_caption" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_category" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_input_value_port_count" qualifiers="virtual">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_input_value_port_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_get_input_value_port_type" qualifiers="virtual">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_get_output_sequence_port_count" qualifiers="virtual">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_output_sequence_port_text" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_get_output_value_port_count" qualifiers="virtual">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_output_value_port_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_get_output_value_port_type" qualifiers="virtual">
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="_get_text" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="_get_working_memory_size" qualifiers="virtual">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="_has_input_sequence_port" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="_step" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="inputs" type="Array">
- </argument>
- <argument index="1" name="outputs" type="Array">
- </argument>
- <argument index="2" name="start_mode" type="int">
- </argument>
- <argument index="3" name="working_mem" type="Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="START_MODE_BEGIN_SEQUENCE" value="0">
- </constant>
- <constant name="START_MODE_CONTINUE_SEQUENCE" value="1">
- </constant>
- <constant name="START_MODE_RESUME_YIELD" value="2">
- </constant>
- <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum="">
- </constant>
- <constant name="STEP_GO_BACK_BIT" value="33554432" enum="">
- </constant>
- <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum="">
- </constant>
- <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum="">
- </constant>
- <constant name="STEP_YIELD_BIT" value="268435456" enum="">
- </constant>
- </constants>
-</class>
-<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_deconstruct_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_deconstruct_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache" brief="">
- </member>
- <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_signal" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_signal">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="signal" type="String" setter="set_signal" getter="get_signal" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_singleton">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_singleton">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="constant/constant" type="String" setter="set_singleton" getter="get_singleton" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptFunctionCall.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_function" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rpc_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptFunctionCall.RPCCallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_singleton" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_default_args" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_validate" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_function">
- <return type="void">
- </return>
- <argument index="0" name="function" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rpc_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.RPCCallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_singleton">
- <return type="void">
- </return>
- <argument index="0" name="singleton" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_default_args">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_validate">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="argument_cache" type="Dictionary" setter="_set_argument_cache" getter="_get_argument_cache" brief="">
- </member>
- <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" brief="">
- </member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
- </member>
- <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptFunctionCall.CallMode">
- </member>
- <member name="function" type="String" setter="set_function" getter="get_function" brief="">
- </member>
- <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
- </member>
- <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" brief="" enum="VisualScriptFunctionCall.RPCCallMode">
- </member>
- <member name="singleton" type="String" setter="set_singleton" getter="get_singleton" brief="">
- </member>
- <member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args" brief="">
- </member>
- <member name="validate" type="bool" setter="set_validate" getter="get_validate" brief="">
- </member>
- </members>
- <constants>
- <constant name="CALL_MODE_SELF" value="0">
- </constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
- </constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
- </constant>
- <constant name="CALL_MODE_BASIC_TYPE" value="3">
- </constant>
- </constants>
-</class>
-<class name="VisualScriptFunctionState" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="connect_to_signal">
- <return type="void">
- </return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <argument index="1" name="signals" type="String">
- </argument>
- <argument index="2" name="args" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="resume">
- <return type="Variant">
- </return>
- <argument index="0" name="args" type="Array" default="null">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_global_constant">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_global_constant">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="constant/constant" type="int" setter="set_global_constant" getter="get_global_constant" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_action_mode" qualifiers="const">
- <return type="int" enum="VisualScriptInputAction.Mode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_action_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_action_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptInputAction.Mode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_action_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="action" type="String" setter="set_action_name" getter="get_action_name" brief="">
- </member>
- <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="" enum="VisualScriptInputAction.Mode">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_var_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_var_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_var_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_var_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="" enum="Variant.Type">
- </member>
- <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_var_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_var_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_var_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_var_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="" enum="Variant.Type">
- </member>
- <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_math_constant">
- <return type="int" enum="VisualScriptMathConstant.MathConstant">
- </return>
- <description>
- </description>
- </method>
- <method name="set_math_constant">
- <return type="void">
- </return>
- <argument index="0" name="which" type="int" enum="VisualScriptMathConstant.MathConstant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="constant/constant" type="int" setter="set_math_constant" getter="get_math_constant" brief="" enum="VisualScriptMathConstant.MathConstant">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptNode" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_default_input_value" qualifiers="const">
- <return type="Variant">
- </return>
- <argument index="0" name="port_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_visual_script" qualifiers="const">
- <return type="VisualScript">
- </return>
- <description>
- </description>
- </method>
- <method name="set_default_input_value">
- <return type="void">
- </return>
- <argument index="0" name="port_idx" type="int">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="_default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" brief="">
- </member>
- </members>
- <signals>
- <signal name="ports_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_operator" qualifiers="const">
- <return type="int" enum="Variant.Operator">
- </return>
- <description>
- </description>
- </method>
- <method name="get_typed" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_operator">
- <return type="void">
- </return>
- <argument index="0" name="op" type="int" enum="Variant.Operator">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_typed">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="operator" type="int" setter="set_operator" getter="get_operator" brief="" enum="Variant.Operator">
- </member>
- <member name="type" type="int" setter="set_typed" getter="get_typed" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_preload" qualifiers="const">
- <return type="Resource">
- </return>
- <description>
- </description>
- </method>
- <method name="set_preload">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="resource" type="Resource" setter="set_preload" getter="get_preload" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptPropertyGet.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_index" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_property" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptPropertyGet.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_property">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" brief="">
- </member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
- </member>
- <member name="index" type="String" setter="set_index" getter="get_index" brief="">
- </member>
- <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
- </member>
- <member name="property" type="String" setter="set_property" getter="get_property" brief="">
- </member>
- <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptPropertyGet.CallMode">
- </member>
- <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- <constant name="CALL_MODE_SELF" value="0">
- </constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
- </constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
- </constant>
- </constants>
-</class>
-<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_assign_op" qualifiers="const">
- <return type="int" enum="VisualScriptPropertySet.AssignOp">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptPropertySet.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_index" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_property" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_assign_op">
- <return type="void">
- </return>
- <argument index="0" name="assign_op" type="int" enum="VisualScriptPropertySet.AssignOp">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptPropertySet.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_property">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" brief="" enum="VisualScriptPropertySet.AssignOp">
- </member>
- <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" brief="">
- </member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
- </member>
- <member name="index" type="String" setter="set_index" getter="get_index" brief="">
- </member>
- <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
- </member>
- <member name="property" type="String" setter="set_property" getter="get_property" brief="">
- </member>
- <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptPropertySet.CallMode">
- </member>
- <member name="type_cache" type="Dictionary" setter="_set_type_cache" getter="_get_type_cache" brief="">
- </member>
- </members>
- <constants>
- <constant name="CALL_MODE_SELF" value="0">
- </constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
- </constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
- </constant>
- </constants>
-</class>
-<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_resource_path">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_resource_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="path" type="String" setter="set_resource_path" getter="get_resource_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_return_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="is_return_value_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_enable_return_value">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_return_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled" brief="">
- </member>
- <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_node_path">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="set_node_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_typed" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_typed">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="type" type="int" setter="set_typed" getter="get_typed" brief="" enum="Variant.Type">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_steps" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_steps">
- <return type="void">
- </return>
- <argument index="0" name="steps" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="steps" type="int" setter="set_steps" getter="get_steps" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="_subcall" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="arguments" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" brief="">
- </member>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_variable" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="var_name" type="String" setter="set_variable" getter="get_variable" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_variable" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="var_name" type="String" setter="set_variable" getter="get_variable" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_wait_time">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_yield_mode">
- <return type="int" enum="VisualScriptYield.YieldMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_wait_time">
- <return type="void">
- </return>
- <argument index="0" name="sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_yield_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptYield.YieldMode">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" brief="" enum="VisualScriptYield.YieldMode">
- </member>
- <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief="">
- </member>
- </members>
- <constants>
- <constant name="YIELD_FRAME" value="1">
- </constant>
- <constant name="YIELD_FIXED_FRAME" value="2">
- </constant>
- <constant name="YIELD_WAIT" value="3">
- </constant>
- </constants>
-</class>
-<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptYieldSignal.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_signal" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptYieldSignal.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_signal">
- <return type="void">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
- </member>
- <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptYieldSignal.CallMode">
- </member>
- <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
- </member>
- <member name="signal" type="String" setter="set_signal" getter="get_signal" brief="">
- </member>
- </members>
- <constants>
- <constant name="CALL_MODE_SELF" value="0">
- </constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
- </constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
- </constant>
- </constants>
-</class>
-<class name="VisualServer" inherits="Object" category="Core">
- <brief_description>
- Server for anything visible.
- </brief_description>
- <description>
- Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
- The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
- </description>
- <methods>
- <method name="force_draw">
- <return type="void">
- </return>
- <description>
- </description>
- </method>
- <method name="texture_create">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="texture_create_from_image">
- <return type="RID">
- </return>
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="flags" type="int" default="7">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_flags" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_height" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_width" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_set_flags">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="RID">
- </argument>
- <argument index="1" name="flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_set_shrink_all_x2_on_set_data">
- <return type="void">
- </return>
- <argument index="0" name="shrink" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="WeakRef" inherits="Reference" category="Core">
- <brief_description>
- Holds an [Object], but does not contribute to the reference count if the object is a reference.
- </brief_description>
- <description>
- A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
- </description>
- <methods>
- <method name="get_ref" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- Returns the [Object] this weakref is referring to.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="WindowDialog" inherits="Popup" category="Core">
- <brief_description>
- Base class for window dialogs.
- </brief_description>
- <description>
- Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
- </description>
- <methods>
- <method name="get_close_button">
- <return type="TextureButton">
- </return>
- <description>
- Return the close [TextureButton].
- </description>
- </method>
- <method name="get_resizable" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_title" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Return the title of the window.
- </description>
- </method>
- <method name="set_resizable">
- <return type="void">
- </return>
- <argument index="0" name="resizable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- Set the title of the window.
- </description>
- </method>
- </methods>
- <members>
- <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" brief="">
- </member>
- <member name="window_title" type="String" setter="set_title" getter="get_title" brief="">
- </member>
- </members>
- <constants>
- </constants>
- <theme_items>
- <theme_item name="close" type="Texture">
- </theme_item>
- <theme_item name="close_h_ofs" type="int">
- </theme_item>
- <theme_item name="close_highlight" type="Texture">
- </theme_item>
- <theme_item name="close_v_ofs" type="int">
- </theme_item>
- <theme_item name="panel" type="StyleBox">
- </theme_item>
- <theme_item name="scaleborder_size" type="int">
- </theme_item>
- <theme_item name="title_color" type="Color">
- </theme_item>
- <theme_item name="title_font" type="Font">
- </theme_item>
- <theme_item name="title_height" type="int">
- </theme_item>
- </theme_items>
-</class>
-<class name="World" inherits="Resource" category="Core">
- <brief_description>
- Class that has everything pertaining to a world.
- </brief_description>
- <description>
- Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
- </description>
- <methods>
- <method name="get_direct_space_state">
- <return type="PhysicsDirectSpaceState">
- </return>
- <description>
- </description>
- </method>
- <method name="get_environment" qualifiers="const">
- <return type="Environment">
- </return>
- <description>
- </description>
- </method>
- <method name="get_fallback_environment" qualifiers="const">
- <return type="Environment">
- </return>
- <description>
- </description>
- </method>
- <method name="get_scenario" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_space" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="set_environment">
- <return type="void">
- </return>
- <argument index="0" name="env" type="Environment">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_fallback_environment">
- <return type="void">
- </return>
- <argument index="0" name="env" type="Environment">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="environment" type="Environment" setter="set_environment" getter="get_environment" brief="">
- </member>
- <member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="World2D" inherits="Resource" category="Core">
- <brief_description>
- Class that has everything pertaining to a 2D world.
- </brief_description>
- <description>
- Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
- </description>
- <methods>
- <method name="get_canvas">
- <return type="RID">
- </return>
- <description>
- Retrieve the [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing.
- </description>
- </method>
- <method name="get_direct_space_state">
- <return type="Physics2DDirectSpaceState">
- </return>
- <description>
- Retrieve the state of this world's physics space. This allows arbitrary querying for collision.
- </description>
- </method>
- <method name="get_space">
- <return type="RID">
- </return>
- <description>
- Retrieve the [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="WorldEnvironment" inherits="Node" category="Core">
- <brief_description>
- Sets environment properties for the entire scene
- </brief_description>
- <description>
- The [WorldEnvironment] node can be added to a scene in order to set default [Environment] variables for the scene. The [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
- </description>
- <methods>
- <method name="get_environment" qualifiers="const">
- <return type="Environment">
- </return>
- <description>
- Return the [Environment] currently bound.
- </description>
- </method>
- <method name="set_environment">
- <return type="void">
- </return>
- <argument index="0" name="env" type="Environment">
- </argument>
- <description>
- Set the currently bound [Environment] to the one specified.
- </description>
- </method>
- </methods>
- <members>
- <member name="environment" type="Environment" setter="set_environment" getter="get_environment" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="XMLParser" inherits="Reference" category="Core">
- <brief_description>
- Low-level class for creating parsers for XML files.
- </brief_description>
- <description>
- This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema.
- </description>
- <methods>
- <method name="get_attribute_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the amount of attributes in the current element.
- </description>
- </method>
- <method name="get_attribute_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the name of the attribute specified by the index in [code]idx[/code] argument.
- </description>
- </method>
- <method name="get_attribute_value" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the value of the attribute specified by the index in [code]idx[/code] argument.
- </description>
- </method>
- <method name="get_current_line" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the current line in the parsed file (currently not implemented).
- </description>
- </method>
- <method name="get_named_attribute_value" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute.
- </description>
- </method>
- <method name="get_named_attribute_value_safe" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Get the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found.
- </description>
- </method>
- <method name="get_node_data" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the contents of a text node. This will raise an error in any other type of node.
- </description>
- </method>
- <method name="get_node_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Get the name of the current element node. This will raise an error if the current node type is not [code]NODE_ELEMENT[/code] nor [code]NODE_ELEMENT_END[/code]
- </description>
- </method>
- <method name="get_node_offset" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Get the byte offset of the current node since the beginning of the file or buffer.
- </description>
- </method>
- <method name="get_node_type">
- <return type="int" enum="XMLParser.NodeType">
- </return>
- <description>
- Get the type of the current node. Compare with [code]NODE_*[/code] constants.
- </description>
- </method>
- <method name="has_attribute" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Check whether or not the current element has a certain attribute.
- </description>
- </method>
- <method name="is_empty" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Check whether the current element is empty (this only works for completely empty tags, e.g. &lt;element \&gt;).
- </description>
- </method>
- <method name="open">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- Open a XML file for parsing. This returns an error code.
- </description>
- </method>
- <method name="open_buffer">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="buffer" type="PoolByteArray">
- </argument>
- <description>
- Open a XML raw buffer for parsing. This returns an error code.
- </description>
- </method>
- <method name="read">
- <return type="int" enum="Error">
- </return>
- <description>
- Read the next node of the file. This returns an error code.
- </description>
- </method>
- <method name="seek">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code.
- </description>
- </method>
- <method name="skip_section">
- <return type="void">
- </return>
- <description>
- Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NODE_NONE" value="0">
- There's no node (no file or buffer opened)
- </constant>
- <constant name="NODE_ELEMENT" value="1">
- Element (tag)
- </constant>
- <constant name="NODE_ELEMENT_END" value="2">
- End of element
- </constant>
- <constant name="NODE_TEXT" value="3">
- Text node
- </constant>
- <constant name="NODE_COMMENT" value="4">
- Comment node
- </constant>
- <constant name="NODE_CDATA" value="5">
- CDATA content
- </constant>
- <constant name="NODE_UNKNOWN" value="6">
- Unknown node
- </constant>
- </constants>
-</class>
-<class name="YSort" inherits="Node2D" category="Core">
- <brief_description>
- Sort all child nodes based on their Y positions.
- </brief_description>
- <description>
- Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
- </description>
- <methods>
- <method name="is_sort_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns true if the children nodes are being sorted.
- </description>
- </method>
- <method name="set_sort_enabled">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set whether the children nodes are sorted or not. (default true)
- </description>
- </method>
- </methods>
- <members>
- <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="bool" category="Built-In Types">
- <brief_description>
- Boolean built-in type
- </brief_description>
- <description>
- Boolean built-in type.
- </description>
- <methods>
- <method name="bool">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
- </description>
- </method>
- <method name="bool">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <description>
- Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
- </description>
- </method>
- <method name="bool">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="float" category="Built-In Types">
- <brief_description>
- Float built-in type
- </brief_description>
- <description>
- Float built-in type.
- </description>
- <methods>
- <method name="float">
- <return type="float">
- </return>
- <argument index="0" name="from" type="bool">
- </argument>
- <description>
- Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0.
- </description>
- </method>
- <method name="float">
- <return type="float">
- </return>
- <argument index="0" name="from" type="int">
- </argument>
- <description>
- Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0.
- </description>
- </method>
- <method name="float">
- <return type="float">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="int" category="Built-In Types">
- <brief_description>
- Integer built-in type.
- </brief_description>
- <description>
- Integer built-in type.
- </description>
- <methods>
- <method name="int">
- <return type="int">
- </return>
- <argument index="0" name="from" type="bool">
- </argument>
- <description>
- Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
- </description>
- </method>
- <method name="int">
- <return type="int">
- </return>
- <argument index="0" name="from" type="float">
- </argument>
- <description>
- Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2.
- </description>
- </method>
- <method name="int">
- <return type="int">
- </return>
- <argument index="0" name="from" type="String">
- </argument>
- <description>
- Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-</doc>
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
new file mode 100644
index 0000000000..7b120afa51
--- /dev/null
+++ b/doc/classes/@GDScript.xml
@@ -0,0 +1,1078 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="@GDScript" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Built-in GDScript functions.
+ </brief_description>
+ <description>
+ This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Color8">
+ <return type="Color">
+ </return>
+ <argument index="0" name="r8" type="int">
+ </argument>
+ <argument index="1" name="g8" type="int">
+ </argument>
+ <argument index="2" name="b8" type="int">
+ </argument>
+ <argument index="3" name="a8" type="int">
+ </argument>
+ <description>
+ Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8bits of information ranging from 0 to 255.
+ 'r8' red channel
+ 'g8' green channel
+ 'b8' blue channel
+ 'a8' alpha channel
+ [codeblock]
+ red = Color8(255, 0, 0)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="ColorN">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="alpha" type="float">
+ </argument>
+ <description>
+ Returns color 'name' with alpha ranging from 0 to 1. Note: 'name' is defined in color_names.inc.
+ [codeblock]
+ red = ColorN('red')
+ [/codeblock]
+ </description>
+ </method>
+ <method name="abs">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the absolute value of parameter 's' (i.e. unsigned value, works for integer and float).
+ [codeblock]
+ # a is 1
+ a = abs(-1)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="acos">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc cosine of 's' in radians. Use to get the angle of cosine 's'.
+ [codeblock]
+ # c is 0.523599 or 30 degrees if converted with rad2deg(s)
+ c = acos(0.866025)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="asin">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc sine of 's' in radians. Use to get the angle of sine 's'.
+ [codeblock]
+ # s is 0.523599 or 30 degrees if converted with rad2deg(s)
+ s = asin(0.5)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="assert">
+ <return type="void">
+ </return>
+ <argument index="0" name="condition" type="bool">
+ </argument>
+ <description>
+ Assert that the condition is true. If the condition is false a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always true.
+ [codeblock]
+ # Speed should always be between 0 and 20
+ speed = -10
+ assert(speed &lt; 20) # Is true and program continues
+ assert(speed &gt;= 0) # Is false and program stops
+ assert(speed &gt;= 0 &amp;&amp; speed &lt; 20) # Or combined
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of 's' in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
+ The method cannot know in which quadrant the angle should fall. See [method atan2] if you always want an exact angle.
+ [codeblock]
+ a = atan(0.5) # a is 0.463648
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan2">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
+ [codeblock]
+ a = atan(0,-1) # a is 3.141593
+ [/codeblock]
+ </description>
+ </method>
+ <method name="bytes2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="bytes" type="PoolByteArray">
+ </argument>
+ <description>
+ Decode a byte array back to a value.
+ </description>
+ </method>
+ <method name="ceil">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Rounds 's' upward, returning the smallest integral value that is not less than 's'.
+ [codeblock]
+ i = ceil(1.45) # i is 2
+ i = ceil(1.001) # i is 2
+ [/codeblock]
+ </description>
+ </method>
+ <method name="char">
+ <return type="String">
+ </return>
+ <argument index="0" name="ascii" type="int">
+ </argument>
+ <description>
+ Returns a character as String of the given ASCII code.
+ [codeblock]
+ # a is 'A'
+ a = char(65)
+ # a is 'a'
+ a = char(65+32)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="clamp">
+ <return type="float">
+ </return>
+ <argument index="0" name="val" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <description>
+ Clamp 'val' and return a value not less than 'min' and not more than 'max'.
+ [codeblock]
+ speed = 1000
+ # a is 20
+ a = clamp(speed, 1, 20)
+
+ speed = -10
+ # a is 1
+ a = clamp(speed, 1, 20)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="convert">
+ <return type="Object">
+ </return>
+ <argument index="0" name="what" type="Variant">
+ </argument>
+ <argument index="1" name="type" type="int">
+ </argument>
+ <description>
+ Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope].
+ [codeblock]
+ a = Vector2(1, 0)
+ # prints 1
+ print(a.length())
+ a = convert(a, TYPE_STRING)
+ # prints 6
+ # (1, 0) is 6 characters
+ print(a.length())
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cos">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the cosine of angle 's' in radians.
+ [codeblock]
+ # prints 1 and -1
+ print(cos(PI*2))
+ print(cos(PI))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cosh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic cosine of 's' in radians.
+ [codeblock]
+ # prints 1.543081
+ print(cosh(1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="db2linear">
+ <return type="float">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ Convert from decibels to linear energy (audio).
+ </description>
+ </method>
+ <method name="decimals">
+ <return type="float">
+ </return>
+ <argument index="0" name="step" type="float">
+ </argument>
+ <description>
+ Returns the number of digit places after the decimal that the first non-zero digit occurs.
+ [codeblock]
+ # n is 2
+ n = decimals(0.035)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="dectime">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="amount" type="float">
+ </argument>
+ <argument index="2" name="step" type="float">
+ </argument>
+ <description>
+ Returns the result of 'value' decreased by 'step' * 'amount'.
+ [codeblock]
+ # a = 59
+ a = dectime(60, 10, 0.1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="deg2rad">
+ <return type="float">
+ </return>
+ <argument index="0" name="deg" type="float">
+ </argument>
+ <description>
+ Returns degrees converted to radians.
+ [codeblock]
+ # r is 3.141593
+ r = deg2rad(180)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="dict2inst">
+ <return type="Object">
+ </return>
+ <argument index="0" name="dict" type="Dictionary">
+ </argument>
+ <description>
+ Convert a previously converted instance to dictionary back into an instance. Useful for deserializing.
+ </description>
+ </method>
+ <method name="ease">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <argument index="1" name="curve" type="float">
+ </argument>
+ <description>
+ Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
+ </description>
+ </method>
+ <method name="exp">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Raises the Euler's constant [b]e[/b] to the power of 's' and returns it. [b] has an approximate value of 2.71828.
+ [codeblock]
+ a = exp(2) # approximately 7.39
+ [/codeblock]
+ </description>
+ </method>
+ <method name="floor">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Rounds 's' to the closest smaller integer and returns it.
+ [codeblock]
+ # a is 2
+ a = floor(2.99)
+ # a is -3
+ a = floor(-2.99)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="fmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point remainder of x/y (rounded towards zero):
+ [codeblock]
+ fmod = x - tquot * y
+ [/codeblock]
+ Where tquot is the truncated (i.e., rounded towards zero) result of: x/y.
+ </description>
+ </method>
+ <method name="fposmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point remainder of x/y that wraps equally in positive and negative.
+ [codeblock]
+ var i = -10;
+ while i &lt; 0:
+ prints(i, fposmod(i, 10))
+ i += 1
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -10 10
+ -9 1
+ -8 2
+ -7 3
+ -6 4
+ -5 5
+ -4 6
+ -3 7
+ -2 8
+ -1 9
+ [/codeblock]
+ </description>
+ </method>
+ <method name="funcref">
+ <return type="Object">
+ </return>
+ <argument index="0" name="instance" type="Object">
+ </argument>
+ <argument index="1" name="funcname" type="String">
+ </argument>
+ <description>
+ Returns a reference to the specified function 'funcname' in the 'instance' node. As functions aren't first-class objects in GDscript, use 'funcref' to store a function in a variable and call it later.
+ [codeblock]
+ func foo():
+ return("bar")
+
+ a = funcref(self, "foo")
+ print(a.call_func()) # prints bar
+ [/codeblock]
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Returns the integer hash of the variable passed.
+ [codeblock]
+ print(hash("a")) # prints 177670
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inst2dict">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="inst" type="Object">
+ </argument>
+ <description>
+ Returns the passed instance converted a dictionary (useful for serializing).
+ [codeblock]
+ var foo = "bar"
+ func _ready():
+ var d = inst2dict(self)
+ print(d.keys())
+ print(d.values())
+ [/codeblock]
+ Prints out:
+ [codeblock]
+ [@subpath, @path, foo]
+ [, res://test.gd, bar]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="instance_from_id">
+ <return type="Object">
+ </return>
+ <argument index="0" name="instance_id" type="int">
+ </argument>
+ <description>
+ Returns the Object that corresponds to 'instance_id'. All Objects have a unique instance ID.
+ [codeblock]
+ var foo = "bar"
+ func _ready():
+ var id = get_instance_id()
+ var inst = instance_from_id(id)
+ print(inst.foo) # prints bar
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inverse_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Returns a normalized value considering the given range.
+ [codeblock]
+ inverse_lerp(3, 5, 4) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_inf">
+ <return type="bool">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns True/False whether 's' is an infinity value (either positive infinity or negative infinity).
+ </description>
+ </method>
+ <method name="is_nan">
+ <return type="bool">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns True/False whether 's' is a NaN (Not-A-Number) value.
+ </description>
+ </method>
+ <method name="len">
+ <return type="int">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Returns length of Variant 'var'. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length.
+ [codeblock]
+ a = [1, 2, 3, 4]
+ len(a) # returns 4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Linear interpolates between two values by a normalized value.
+ [codeblock]
+ lerp(1, 3, 0.5) # returns 2
+ [/codeblock]
+ </description>
+ </method>
+ <method name="linear2db">
+ <return type="float">
+ </return>
+ <argument index="0" name="nrg" type="float">
+ </argument>
+ <description>
+ Convert from linear energy to decibels (audio).
+ </description>
+ </method>
+ <method name="load">
+ <return type="Object">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Load a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path".
+ [codeblock]
+ # load a scene called main located in the root of the project directory
+ var main = load("res://main.tscn")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="log">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log funcation on your calculator which is a base 10 logarithm.
+ [codeblock]
+ log(10) # returns 2.302585
+ [/codeblock]
+ </description>
+ </method>
+ <method name="max">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the maximum of two values.
+ [codeblock]
+ max(1,2) # returns 2
+ max(-3.99, -4) # returns -3.99
+ [/codeblock]
+ </description>
+ </method>
+ <method name="min">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the minimum of two values.
+ [codeblock]
+ min(1,2) # returns 1
+ min(-3.99, -4) # returns -4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="nearest_po2">
+ <return type="int">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Returns the nearest larger power of 2 for integer 'val'.
+ [codeblock]
+ nearest_po2(3) # returns 4
+ nearest_po2(4) # returns 4
+ nearest_po2(5) # returns 8
+ [/codeblock]
+ </description>
+ </method>
+ <method name="parse_json">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
+ Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert every numerical values to [float] types.
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="pow">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the result of 'x' raised to the power of 'y'.
+ [codeblock]
+ pow(2,5) # returns 32
+ [/codeblock]
+ </description>
+ </method>
+ <method name="preload">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path".
+ [codeblock]
+ # load a scene called main located in the root of the project directory
+ var main = preload("res://main.tscn")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="print" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Converts one or more arguments to strings in the best way possible and prints them to the console.
+ [codeblock]
+ a = [1,2,3]
+ print("a","b",a) # prints ab[1, 2, 3]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="print_stack">
+ <return type="void">
+ </return>
+ <description>
+ Print a stack track at code location, only works when running with debugger turned on.
+ Output in the console would look something like this:
+ [codeblock]
+ Frame 0 - res://test.gd:16 in function '_process'
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printerr" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Print one or more arguments to strings in the best way possible to standard error line.
+ [codeblock]
+ printerr("prints to stderr")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printraw" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ [codeblock]
+ printraw("A")
+ printraw("B")
+ # prints AB
+ [/codeblock]
+ </description>
+ </method>
+ <method name="prints" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Print one or more arguments to the console with a space between each argument.
+ [codeblock]
+ prints("A", "B", "C") # prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printt" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ Print one or more arguments to the console with a tab between each argument.
+ [codeblock]
+ printt("A", "B", "C") # prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rad2deg">
+ <return type="float">
+ </return>
+ <argument index="0" name="rad" type="float">
+ </argument>
+ <description>
+ Convert from radians to degrees.
+ [codeblock]
+ rad2deg(0.523599) # returns 30
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rand_range">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <description>
+ Random range, any floating point value between 'from' and 'to'.
+ [codeblock]
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rand_seed">
+ <return type="Array">
+ </return>
+ <argument index="0" name="seed" type="int">
+ </argument>
+ <description>
+ Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ </description>
+ </method>
+ <method name="randf">
+ <return type="float">
+ </return>
+ <description>
+ Return a random floating point value between 0 and 1.
+ [codeblock]
+ randf() # returns 0.375671
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randi">
+ <return type="int">
+ </return>
+ <description>
+ Return a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1).
+ [codeblock]
+ randi() % 20 # returns random number between 0 and 19
+ randi() % 100 # returns random number between 0 and 99
+ randi() % 100 + 1 # returns random number between 1 and 100
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randomize">
+ <return type="void">
+ </return>
+ <description>
+ Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
+ [codeblock]
+ func _ready():
+ randomize()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range" qualifiers="vararg">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
+ [codeblock]
+ for i in range(4):
+ print(i)
+ for i in range(2, 5):
+ print(i)
+ for i in range(0, 6, 2):
+ print(i)
+ [/codeblock]
+ Output:
+ [codeblock]
+ 0
+ 1
+ 2
+ 3
+
+ 2
+ 3
+ 4
+
+ 0
+ 2
+ 4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="istart" type="float">
+ </argument>
+ <argument index="2" name="istop" type="float">
+ </argument>
+ <argument index="3" name="ostart" type="float">
+ </argument>
+ <argument index="4" name="ostop" type="float">
+ </argument>
+ <description>
+ Maps a value from range [istart, istop] to [ostart, ostop].
+ [codeblock]
+ range_lerp(75, 0, 100, -1, 1) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="round">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the integral value that is nearest to s, with halfway cases rounded away from zero.
+ [codeblock]
+ round(2.6) # returns 3
+ [/codeblock]
+ </description>
+ </method>
+ <method name="seed">
+ <return type="void">
+ </return>
+ <argument index="0" name="seed" type="int">
+ </argument>
+ <description>
+ Set seed for the random number generator.
+ [codeblock]
+ my_seed = "Godot Rocks"
+ seed(my_seed.hash())
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sign">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Return sign of 's' -1 or 1.
+ [codeblock]
+ sign(-6) # returns -1
+ sign(6) # returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sin">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Return the sine of angle 's' in radians.
+ [codeblock]
+ sin(0.523599) # returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sinh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Return the hyperbolic sine of 's'.
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ sinh(a) # returns 0.75
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sqrt">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Return the square root of 's'.
+ [codeblock]
+ sqrt(9) # returns 3
+ [/codeblock]
+ </description>
+ </method>
+ <method name="stepify">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <argument index="1" name="step" type="float">
+ </argument>
+ <description>
+ Snap float value to a given step.
+ </description>
+ </method>
+ <method name="str" qualifiers="vararg">
+ <return type="String">
+ </return>
+ <description>
+ Convert one or more arguments to string in the best way possible.
+ [codeblock]
+ var a = [10, 20, 30]
+ var b = str(a);
+ len(a) # returns 3
+ len(b) # returns 12
+ [/codeblock]
+ </description>
+ </method>
+ <method name="str2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Convert a formatted string that was returned by [method var2str] to the original value.
+ [codeblock]
+ a = '{ "a": 1, "b": 2 }'
+ b = str2var(a)
+ print(b['a']) # prints 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tan">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Return the tangent of angle 's' in radians.
+ [codeblock]
+ tan( deg2rad(45) ) # returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tanh">
+ <return type="float">
+ </return>
+ <argument index="0" name="s" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic tangent of 's'.
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ tanh(a) # returns 0.6
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_json">
+ <return type="String">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Convert a Variant 'var' to json text and return the result. Useful for serializing data to store or send over the network
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ b = to_json(a)
+ print(b) # {"a":1, "b":2}
+ [/codeblock]
+ </description>
+ </method>
+ <method name="type_exists">
+ <return type="bool">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Returns whether the given class is exist in [ClassDB].
+ [codeblock]
+ type_exists("Sprite") # returns true
+ type_exists("Variant") # returns false
+ [/codeblock]
+ </description>
+ </method>
+ <method name="typeof">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="Variant">
+ </argument>
+ <description>
+ Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="validate_json">
+ <return type="String">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ Check that 'json' is valid json data. Return empty string if valid. Return error message if not valid.
+ [codeblock]
+ j = to_json([1, 2, 3])
+ v = validate_json(j)
+ if not v:
+ print("valid")
+ else:
+ prints("invalid", v)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="var2bytes">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Encode a variable value to a byte array.
+ </description>
+ </method>
+ <method name="var2str">
+ <return type="String">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Convert a value to a formatted string that can later be parsed using [method str2var].
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ print(var2str(a))
+ [/codeblock]
+ prints
+ [codeblock]
+ {
+ "a": 1,
+ "b": 2
+ }
+ [/codeblock]
+ </description>
+ </method>
+ <method name="weakref">
+ <return type="Object">
+ </return>
+ <argument index="0" name="obj" type="Object">
+ </argument>
+ <description>
+ Return a weak reference to an object.
+ A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
+ </description>
+ </method>
+ <method name="yield">
+ <return type="GDFunctionState">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="signal" type="String">
+ </argument>
+ <description>
+ Stop the function execution and return the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state.
+ Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="PI" value="3.141593" enum="">
+ Constant that represents how many times the diameter of a circumference fits around its perimeter.
+ </constant>
+ <constant name="INF" value="inf" enum="">
+ A positive infinity. (For negative infinity, use -INF).
+ </constant>
+ <constant name="NAN" value="nan" enum="">
+ Macro constant that expands to an expression of type float that represents a NaN.
+ The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
new file mode 100644
index 0000000000..a8fd377ecf
--- /dev/null
+++ b/doc/classes/@Global Scope.xml
@@ -0,0 +1,1235 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="@Global Scope" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Global scope constants and variables.
+ </brief_description>
+ <description>
+ Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much.
+ Singletons are also documented here, since they can be accessed from anywhere.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <members>
+ <member name="ARVRServer" type="ARVRServer" setter="" getter="">
+ [ARVRServer] singleton
+ </member>
+ <member name="AudioServer" type="AudioServer" setter="" getter="">
+ [AudioServer] singleton
+ </member>
+ <member name="ClassDB" type="ClassDB" setter="" getter="">
+ [ClassDB] singleton
+ </member>
+ <member name="Engine" type="Engine" setter="" getter="">
+ [Engine] singleton
+ </member>
+ <member name="Geometry" type="Geometry" setter="" getter="">
+ [Geometry] singleton
+ </member>
+ <member name="IP" type="IP" setter="" getter="">
+ [IP] singleton
+ </member>
+ <member name="Input" type="Input" setter="" getter="">
+ [Input] singleton
+ </member>
+ <member name="InputMap" type="InputMap" setter="" getter="">
+ [InputMap] singleton
+ </member>
+ <member name="JSON" type="JSON" setter="" getter="">
+ </member>
+ <member name="Marshalls" type="Reference" setter="" getter="">
+ [Marshalls] singleton
+ </member>
+ <member name="OS" type="OS" setter="" getter="">
+ [OS] singleton
+ </member>
+ <member name="Performance" type="Performance" setter="" getter="">
+ [Performance] singleton
+ </member>
+ <member name="Physics2DServer" type="Physics2DServer" setter="" getter="">
+ [Physics2DServer] singleton
+ </member>
+ <member name="PhysicsServer" type="PhysicsServer" setter="" getter="">
+ [PhysicsServer] singleton
+ </member>
+ <member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
+ [ProjectSettings] singleton
+ </member>
+ <member name="ResourceLoader" type="ResourceLoader" setter="" getter="">
+ [ResourceLoader] singleton
+ </member>
+ <member name="ResourceSaver" type="ResourceSaver" setter="" getter="">
+ [ResourceSaver] singleton
+ </member>
+ <member name="TranslationServer" type="TranslationServer" setter="" getter="">
+ [TranslationServer] singleton
+ </member>
+ <member name="VisualServer" type="VisualServer" setter="" getter="">
+ [VisualServer] singleton
+ </member>
+ </members>
+ <constants>
+ <constant name="MARGIN_LEFT" value="0">
+ Left margin, used usually for [Control] or [StyleBox] derived classes.
+ </constant>
+ <constant name="MARGIN_TOP" value="1">
+ Top margin, used usually for [Control] or [StyleBox] derived classes.
+ </constant>
+ <constant name="MARGIN_RIGHT" value="2">
+ Right margin, used usually for [Control] or [StyleBox] derived classes.
+ </constant>
+ <constant name="MARGIN_BOTTOM" value="3">
+ Bottom margin, used usually for [Control] or [StyleBox] derived classes.
+ </constant>
+ <constant name="VERTICAL" value="1">
+ General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc.
+ </constant>
+ <constant name="HORIZONTAL" value="0">
+ General horizontal alignment, used usually for [Separator], [ScrollBar], [Slider], etc.
+ </constant>
+ <constant name="HALIGN_LEFT" value="0">
+ Horizontal left alignment, usually for text-derived classes.
+ </constant>
+ <constant name="HALIGN_CENTER" value="1">
+ Horizontal center alignment, usually for text-derived classes.
+ </constant>
+ <constant name="HALIGN_RIGHT" value="2">
+ Horizontal right alignment, usually for text-derived classes.
+ </constant>
+ <constant name="VALIGN_TOP" value="0">
+ Vertical top alignment, usually for text-derived classes.
+ </constant>
+ <constant name="VALIGN_CENTER" value="1">
+ Vertical center alignment, usually for text-derived classes.
+ </constant>
+ <constant name="VALIGN_BOTTOM" value="2">
+ Vertical bottom alignment, usually for text-derived classes.
+ </constant>
+ <constant name="SPKEY" value="16777216" enum="">
+ Scancodes with this bit applied are non printable.
+ </constant>
+ <constant name="KEY_ESCAPE" value="16777217">
+ Escape Key
+ </constant>
+ <constant name="KEY_TAB" value="16777218">
+ Tab Key
+ </constant>
+ <constant name="KEY_BACKTAB" value="16777219">
+ Shift-Tab Key
+ </constant>
+ <constant name="KEY_BACKSPACE" value="16777220">
+ Backspace Key
+ </constant>
+ <constant name="KEY_ENTER" value="16777221">
+ Return Key (On Main Keyboard)
+ </constant>
+ <constant name="KEY_KP_ENTER" value="16777222">
+ Enter Key (On Numpad)
+ </constant>
+ <constant name="KEY_INSERT" value="16777223">
+ Insert Key
+ </constant>
+ <constant name="KEY_DELETE" value="16777224">
+ Delete Key
+ </constant>
+ <constant name="KEY_PAUSE" value="16777225">
+ Pause Key
+ </constant>
+ <constant name="KEY_PRINT" value="16777226">
+ Printscreen Key
+ </constant>
+ <constant name="KEY_SYSREQ" value="16777227">
+ </constant>
+ <constant name="KEY_CLEAR" value="16777228">
+ </constant>
+ <constant name="KEY_HOME" value="16777229">
+ Home Key
+ </constant>
+ <constant name="KEY_END" value="16777230">
+ End Key
+ </constant>
+ <constant name="KEY_LEFT" value="16777231">
+ Left Arrow Key
+ </constant>
+ <constant name="KEY_UP" value="16777232">
+ Up Arrow Key
+ </constant>
+ <constant name="KEY_RIGHT" value="16777233">
+ Right Arrow Key
+ </constant>
+ <constant name="KEY_DOWN" value="16777234">
+ Down Arrow Key
+ </constant>
+ <constant name="KEY_PAGEUP" value="16777235">
+ Pageup Key
+ </constant>
+ <constant name="KEY_PAGEDOWN" value="16777236">
+ Pagedown Key
+ </constant>
+ <constant name="KEY_SHIFT" value="16777237">
+ Shift Key
+ </constant>
+ <constant name="KEY_CONTROL" value="16777238">
+ Control Key
+ </constant>
+ <constant name="KEY_META" value="16777239">
+ </constant>
+ <constant name="KEY_ALT" value="16777240">
+ Alt Key
+ </constant>
+ <constant name="KEY_CAPSLOCK" value="16777241">
+ Capslock Key
+ </constant>
+ <constant name="KEY_NUMLOCK" value="16777242">
+ Numlock Key
+ </constant>
+ <constant name="KEY_SCROLLLOCK" value="16777243">
+ Scrolllock Key
+ </constant>
+ <constant name="KEY_F1" value="16777244">
+ F1 Key
+ </constant>
+ <constant name="KEY_F2" value="16777245">
+ F2 Key
+ </constant>
+ <constant name="KEY_F3" value="16777246">
+ F3 Key
+ </constant>
+ <constant name="KEY_F4" value="16777247">
+ F4 Key
+ </constant>
+ <constant name="KEY_F5" value="16777248">
+ F5 Key
+ </constant>
+ <constant name="KEY_F6" value="16777249">
+ F6 Key
+ </constant>
+ <constant name="KEY_F7" value="16777250">
+ F7 Key
+ </constant>
+ <constant name="KEY_F8" value="16777251">
+ F8 Key
+ </constant>
+ <constant name="KEY_F9" value="16777252">
+ F9 Key
+ </constant>
+ <constant name="KEY_F10" value="16777253">
+ F10 Key
+ </constant>
+ <constant name="KEY_F11" value="16777254">
+ F11 Key
+ </constant>
+ <constant name="KEY_F12" value="16777255">
+ F12 Key
+ </constant>
+ <constant name="KEY_F13" value="16777256">
+ F13 Key
+ </constant>
+ <constant name="KEY_F14" value="16777257">
+ F14 Key
+ </constant>
+ <constant name="KEY_F15" value="16777258">
+ F15 Key
+ </constant>
+ <constant name="KEY_F16" value="16777259">
+ F16 Key
+ </constant>
+ <constant name="KEY_KP_MULTIPLY" value="16777345">
+ Multiply Key on Numpad
+ </constant>
+ <constant name="KEY_KP_DIVIDE" value="16777346">
+ Divide Key on Numpad
+ </constant>
+ <constant name="KEY_KP_SUBTRACT" value="16777347">
+ Subtract Key on Numpad
+ </constant>
+ <constant name="KEY_KP_PERIOD" value="16777348">
+ Period Key on Numpad
+ </constant>
+ <constant name="KEY_KP_ADD" value="16777349">
+ Add Key on Numpad
+ </constant>
+ <constant name="KEY_KP_0" value="16777350">
+ Number 0 on Numpad
+ </constant>
+ <constant name="KEY_KP_1" value="16777351">
+ Number 1 on Numpad
+ </constant>
+ <constant name="KEY_KP_2" value="16777352">
+ Number 2 on Numpad
+ </constant>
+ <constant name="KEY_KP_3" value="16777353">
+ Number 3 on Numpad
+ </constant>
+ <constant name="KEY_KP_4" value="16777354">
+ Number 4 on Numpad
+ </constant>
+ <constant name="KEY_KP_5" value="16777355">
+ Number 5 on Numpad
+ </constant>
+ <constant name="KEY_KP_6" value="16777356">
+ Number 6 on Numpad
+ </constant>
+ <constant name="KEY_KP_7" value="16777357">
+ Number 7 on Numpad
+ </constant>
+ <constant name="KEY_KP_8" value="16777358">
+ Number 8 on Numpad
+ </constant>
+ <constant name="KEY_KP_9" value="16777359">
+ Number 9 on Numpad
+ </constant>
+ <constant name="KEY_SUPER_L" value="16777260">
+ Super Left key (windows key)
+ </constant>
+ <constant name="KEY_SUPER_R" value="16777261">
+ Super Left key (windows key)
+ </constant>
+ <constant name="KEY_MENU" value="16777262">
+ Context menu key
+ </constant>
+ <constant name="KEY_HYPER_L" value="16777263">
+ </constant>
+ <constant name="KEY_HYPER_R" value="16777264">
+ </constant>
+ <constant name="KEY_HELP" value="16777265">
+ Help key
+ </constant>
+ <constant name="KEY_DIRECTION_L" value="16777266">
+ </constant>
+ <constant name="KEY_DIRECTION_R" value="16777267">
+ </constant>
+ <constant name="KEY_BACK" value="16777280">
+ Back key
+ </constant>
+ <constant name="KEY_FORWARD" value="16777281">
+ Forward key
+ </constant>
+ <constant name="KEY_STOP" value="16777282">
+ Stop key
+ </constant>
+ <constant name="KEY_REFRESH" value="16777283">
+ Refresh key
+ </constant>
+ <constant name="KEY_VOLUMEDOWN" value="16777284">
+ Volume down key
+ </constant>
+ <constant name="KEY_VOLUMEMUTE" value="16777285">
+ Mute volume key
+ </constant>
+ <constant name="KEY_VOLUMEUP" value="16777286">
+ Volume up key
+ </constant>
+ <constant name="KEY_BASSBOOST" value="16777287">
+ </constant>
+ <constant name="KEY_BASSUP" value="16777288">
+ </constant>
+ <constant name="KEY_BASSDOWN" value="16777289">
+ </constant>
+ <constant name="KEY_TREBLEUP" value="16777290">
+ </constant>
+ <constant name="KEY_TREBLEDOWN" value="16777291">
+ </constant>
+ <constant name="KEY_MEDIAPLAY" value="16777292">
+ Media play key
+ </constant>
+ <constant name="KEY_MEDIASTOP" value="16777293">
+ Media stop key
+ </constant>
+ <constant name="KEY_MEDIAPREVIOUS" value="16777294">
+ Previous song key
+ </constant>
+ <constant name="KEY_MEDIANEXT" value="16777295">
+ Next song key
+ </constant>
+ <constant name="KEY_MEDIARECORD" value="16777296">
+ Media record key
+ </constant>
+ <constant name="KEY_HOMEPAGE" value="16777297">
+ Home page key
+ </constant>
+ <constant name="KEY_FAVORITES" value="16777298">
+ Favorites key
+ </constant>
+ <constant name="KEY_SEARCH" value="16777299">
+ Search key
+ </constant>
+ <constant name="KEY_STANDBY" value="16777300">
+ </constant>
+ <constant name="KEY_OPENURL" value="16777301">
+ </constant>
+ <constant name="KEY_LAUNCHMAIL" value="16777302">
+ </constant>
+ <constant name="KEY_LAUNCHMEDIA" value="16777303">
+ </constant>
+ <constant name="KEY_LAUNCH0" value="16777304">
+ </constant>
+ <constant name="KEY_LAUNCH1" value="16777305">
+ </constant>
+ <constant name="KEY_LAUNCH2" value="16777306">
+ </constant>
+ <constant name="KEY_LAUNCH3" value="16777307">
+ </constant>
+ <constant name="KEY_LAUNCH4" value="16777308">
+ </constant>
+ <constant name="KEY_LAUNCH5" value="16777309">
+ </constant>
+ <constant name="KEY_LAUNCH6" value="16777310">
+ </constant>
+ <constant name="KEY_LAUNCH7" value="16777311">
+ </constant>
+ <constant name="KEY_LAUNCH8" value="16777312">
+ </constant>
+ <constant name="KEY_LAUNCH9" value="16777313">
+ </constant>
+ <constant name="KEY_LAUNCHA" value="16777314">
+ </constant>
+ <constant name="KEY_LAUNCHB" value="16777315">
+ </constant>
+ <constant name="KEY_LAUNCHC" value="16777316">
+ </constant>
+ <constant name="KEY_LAUNCHD" value="16777317">
+ </constant>
+ <constant name="KEY_LAUNCHE" value="16777318">
+ </constant>
+ <constant name="KEY_LAUNCHF" value="16777319">
+ </constant>
+ <constant name="KEY_UNKNOWN" value="33554431">
+ </constant>
+ <constant name="KEY_SPACE" value="32">
+ Space Key
+ </constant>
+ <constant name="KEY_EXCLAM" value="33">
+ ! key
+ </constant>
+ <constant name="KEY_QUOTEDBL" value="34">
+ " key
+ </constant>
+ <constant name="KEY_NUMBERSIGN" value="35">
+ # key
+ </constant>
+ <constant name="KEY_DOLLAR" value="36">
+ $ key
+ </constant>
+ <constant name="KEY_PERCENT" value="37">
+ % key
+ </constant>
+ <constant name="KEY_AMPERSAND" value="38">
+ &amp; key
+ </constant>
+ <constant name="KEY_APOSTROPHE" value="39">
+ ' key
+ </constant>
+ <constant name="KEY_PARENLEFT" value="40">
+ ( key
+ </constant>
+ <constant name="KEY_PARENRIGHT" value="41">
+ ) key
+ </constant>
+ <constant name="KEY_ASTERISK" value="42">
+ * key
+ </constant>
+ <constant name="KEY_PLUS" value="43">
+ + key
+ </constant>
+ <constant name="KEY_COMMA" value="44">
+ , key
+ </constant>
+ <constant name="KEY_MINUS" value="45">
+ - key
+ </constant>
+ <constant name="KEY_PERIOD" value="46">
+ . key
+ </constant>
+ <constant name="KEY_SLASH" value="47">
+ / key
+ </constant>
+ <constant name="KEY_0" value="48">
+ Number 0
+ </constant>
+ <constant name="KEY_1" value="49">
+ Number 1
+ </constant>
+ <constant name="KEY_2" value="50">
+ Number 2
+ </constant>
+ <constant name="KEY_3" value="51">
+ Number 3
+ </constant>
+ <constant name="KEY_4" value="52">
+ Number 4
+ </constant>
+ <constant name="KEY_5" value="53">
+ Number 5
+ </constant>
+ <constant name="KEY_6" value="54">
+ Number 6
+ </constant>
+ <constant name="KEY_7" value="55">
+ Number 7
+ </constant>
+ <constant name="KEY_8" value="56">
+ Number 8
+ </constant>
+ <constant name="KEY_9" value="57">
+ Number 9
+ </constant>
+ <constant name="KEY_COLON" value="58">
+ : key
+ </constant>
+ <constant name="KEY_SEMICOLON" value="59">
+ ; key
+ </constant>
+ <constant name="KEY_LESS" value="60">
+ Lower than key
+ </constant>
+ <constant name="KEY_EQUAL" value="61">
+ = key
+ </constant>
+ <constant name="KEY_GREATER" value="62">
+ Greater than key
+ </constant>
+ <constant name="KEY_QUESTION" value="63">
+ ? key
+ </constant>
+ <constant name="KEY_AT" value="64">
+ @ key
+ </constant>
+ <constant name="KEY_A" value="65">
+ A Key
+ </constant>
+ <constant name="KEY_B" value="66">
+ B Key
+ </constant>
+ <constant name="KEY_C" value="67">
+ C Key
+ </constant>
+ <constant name="KEY_D" value="68">
+ D Key
+ </constant>
+ <constant name="KEY_E" value="69">
+ E Key
+ </constant>
+ <constant name="KEY_F" value="70">
+ F Key
+ </constant>
+ <constant name="KEY_G" value="71">
+ G Key
+ </constant>
+ <constant name="KEY_H" value="72">
+ H Key
+ </constant>
+ <constant name="KEY_I" value="73">
+ I Key
+ </constant>
+ <constant name="KEY_J" value="74">
+ J Key
+ </constant>
+ <constant name="KEY_K" value="75">
+ K Key
+ </constant>
+ <constant name="KEY_L" value="76">
+ L Key
+ </constant>
+ <constant name="KEY_M" value="77">
+ M Key
+ </constant>
+ <constant name="KEY_N" value="78">
+ N Key
+ </constant>
+ <constant name="KEY_O" value="79">
+ O Key
+ </constant>
+ <constant name="KEY_P" value="80">
+ P Key
+ </constant>
+ <constant name="KEY_Q" value="81">
+ Q Key
+ </constant>
+ <constant name="KEY_R" value="82">
+ R Key
+ </constant>
+ <constant name="KEY_S" value="83">
+ S Key
+ </constant>
+ <constant name="KEY_T" value="84">
+ T Key
+ </constant>
+ <constant name="KEY_U" value="85">
+ U Key
+ </constant>
+ <constant name="KEY_V" value="86">
+ V Key
+ </constant>
+ <constant name="KEY_W" value="87">
+ W Key
+ </constant>
+ <constant name="KEY_X" value="88">
+ X Key
+ </constant>
+ <constant name="KEY_Y" value="89">
+ Y Key
+ </constant>
+ <constant name="KEY_Z" value="90">
+ Z Key
+ </constant>
+ <constant name="KEY_BRACKETLEFT" value="91">
+ [ key
+ </constant>
+ <constant name="KEY_BACKSLASH" value="92">
+ \ key
+ </constant>
+ <constant name="KEY_BRACKETRIGHT" value="93">
+ ] key
+ </constant>
+ <constant name="KEY_ASCIICIRCUM" value="94">
+ ^ key
+ </constant>
+ <constant name="KEY_UNDERSCORE" value="95">
+ _ key
+ </constant>
+ <constant name="KEY_QUOTELEFT" value="96">
+ </constant>
+ <constant name="KEY_BRACELEFT" value="123">
+ { key
+ </constant>
+ <constant name="KEY_BAR" value="124">
+ | key
+ </constant>
+ <constant name="KEY_BRACERIGHT" value="125">
+ } key
+ </constant>
+ <constant name="KEY_ASCIITILDE" value="126">
+ ~ key
+ </constant>
+ <constant name="KEY_NOBREAKSPACE" value="160">
+ </constant>
+ <constant name="KEY_EXCLAMDOWN" value="161">
+ </constant>
+ <constant name="KEY_CENT" value="162">
+ ¢ key
+ </constant>
+ <constant name="KEY_STERLING" value="163">
+ </constant>
+ <constant name="KEY_CURRENCY" value="164">
+ </constant>
+ <constant name="KEY_YEN" value="165">
+ </constant>
+ <constant name="KEY_BROKENBAR" value="166">
+ ¦ key
+ </constant>
+ <constant name="KEY_SECTION" value="167">
+ § key
+ </constant>
+ <constant name="KEY_DIAERESIS" value="168">
+ ¨ key
+ </constant>
+ <constant name="KEY_COPYRIGHT" value="169">
+ © key
+ </constant>
+ <constant name="KEY_ORDFEMININE" value="170">
+ </constant>
+ <constant name="KEY_GUILLEMOTLEFT" value="171">
+ « key
+ </constant>
+ <constant name="KEY_NOTSIGN" value="172">
+ » key
+ </constant>
+ <constant name="KEY_HYPHEN" value="173">
+ ‐ key
+ </constant>
+ <constant name="KEY_REGISTERED" value="174">
+ ® key
+ </constant>
+ <constant name="KEY_MACRON" value="175">
+ </constant>
+ <constant name="KEY_DEGREE" value="176">
+ ° key
+ </constant>
+ <constant name="KEY_PLUSMINUS" value="177">
+ ± key
+ </constant>
+ <constant name="KEY_TWOSUPERIOR" value="178">
+ ² key
+ </constant>
+ <constant name="KEY_THREESUPERIOR" value="179">
+ ³ key
+ </constant>
+ <constant name="KEY_ACUTE" value="180">
+ ´ key
+ </constant>
+ <constant name="KEY_MU" value="181">
+ µ key
+ </constant>
+ <constant name="KEY_PARAGRAPH" value="182">
+ </constant>
+ <constant name="KEY_PERIODCENTERED" value="183">
+ · key
+ </constant>
+ <constant name="KEY_CEDILLA" value="184">
+ ¬ key
+ </constant>
+ <constant name="KEY_ONESUPERIOR" value="185">
+ </constant>
+ <constant name="KEY_MASCULINE" value="186">
+ </constant>
+ <constant name="KEY_GUILLEMOTRIGHT" value="187">
+ </constant>
+ <constant name="KEY_ONEQUARTER" value="188">
+ </constant>
+ <constant name="KEY_ONEHALF" value="189">
+ ½ key
+ </constant>
+ <constant name="KEY_THREEQUARTERS" value="190">
+ </constant>
+ <constant name="KEY_QUESTIONDOWN" value="191">
+ </constant>
+ <constant name="KEY_AGRAVE" value="192">
+ </constant>
+ <constant name="KEY_AACUTE" value="193">
+ </constant>
+ <constant name="KEY_ACIRCUMFLEX" value="194">
+ </constant>
+ <constant name="KEY_ATILDE" value="195">
+ </constant>
+ <constant name="KEY_ADIAERESIS" value="196">
+ </constant>
+ <constant name="KEY_ARING" value="197">
+ </constant>
+ <constant name="KEY_AE" value="198">
+ </constant>
+ <constant name="KEY_CCEDILLA" value="199">
+ </constant>
+ <constant name="KEY_EGRAVE" value="200">
+ </constant>
+ <constant name="KEY_EACUTE" value="201">
+ </constant>
+ <constant name="KEY_ECIRCUMFLEX" value="202">
+ </constant>
+ <constant name="KEY_EDIAERESIS" value="203">
+ </constant>
+ <constant name="KEY_IGRAVE" value="204">
+ </constant>
+ <constant name="KEY_IACUTE" value="205">
+ </constant>
+ <constant name="KEY_ICIRCUMFLEX" value="206">
+ </constant>
+ <constant name="KEY_IDIAERESIS" value="207">
+ </constant>
+ <constant name="KEY_ETH" value="208">
+ </constant>
+ <constant name="KEY_NTILDE" value="209">
+ </constant>
+ <constant name="KEY_OGRAVE" value="210">
+ </constant>
+ <constant name="KEY_OACUTE" value="211">
+ </constant>
+ <constant name="KEY_OCIRCUMFLEX" value="212">
+ </constant>
+ <constant name="KEY_OTILDE" value="213">
+ </constant>
+ <constant name="KEY_ODIAERESIS" value="214">
+ </constant>
+ <constant name="KEY_MULTIPLY" value="215">
+ </constant>
+ <constant name="KEY_OOBLIQUE" value="216">
+ </constant>
+ <constant name="KEY_UGRAVE" value="217">
+ </constant>
+ <constant name="KEY_UACUTE" value="218">
+ </constant>
+ <constant name="KEY_UCIRCUMFLEX" value="219">
+ </constant>
+ <constant name="KEY_UDIAERESIS" value="220">
+ </constant>
+ <constant name="KEY_YACUTE" value="221">
+ </constant>
+ <constant name="KEY_THORN" value="222">
+ </constant>
+ <constant name="KEY_SSHARP" value="223">
+ </constant>
+ <constant name="KEY_DIVISION" value="247">
+ </constant>
+ <constant name="KEY_YDIAERESIS" value="255">
+ </constant>
+ <constant name="KEY_CODE_MASK" value="33554431">
+ </constant>
+ <constant name="KEY_MODIFIER_MASK" value="-16777216">
+ </constant>
+ <constant name="KEY_MASK_SHIFT" value="33554432">
+ </constant>
+ <constant name="KEY_MASK_ALT" value="67108864">
+ </constant>
+ <constant name="KEY_MASK_META" value="134217728">
+ </constant>
+ <constant name="KEY_MASK_CTRL" value="268435456">
+ </constant>
+ <constant name="KEY_MASK_CMD" value="268435456">
+ </constant>
+ <constant name="KEY_MASK_KPAD" value="536870912">
+ </constant>
+ <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824">
+ </constant>
+ <constant name="BUTTON_LEFT" value="1" enum="">
+ Left Mouse Button
+ </constant>
+ <constant name="BUTTON_RIGHT" value="2" enum="">
+ Right Mouse Button
+ </constant>
+ <constant name="BUTTON_MIDDLE" value="3" enum="">
+ Middle Mouse Button
+ </constant>
+ <constant name="BUTTON_WHEEL_UP" value="4" enum="">
+ Mouse wheel up
+ </constant>
+ <constant name="BUTTON_WHEEL_DOWN" value="5" enum="">
+ Mouse wheel down
+ </constant>
+ <constant name="BUTTON_WHEEL_LEFT" value="6" enum="">
+ Mouse wheel left button
+ </constant>
+ <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="">
+ Mouse wheel right button
+ </constant>
+ <constant name="BUTTON_MASK_LEFT" value="1" enum="">
+ </constant>
+ <constant name="BUTTON_MASK_RIGHT" value="2" enum="">
+ </constant>
+ <constant name="BUTTON_MASK_MIDDLE" value="4" enum="">
+ </constant>
+ <constant name="JOY_BUTTON_0" value="0" enum="">
+ Joypad Button 0
+ </constant>
+ <constant name="JOY_BUTTON_1" value="1" enum="">
+ Joypad Button 1
+ </constant>
+ <constant name="JOY_BUTTON_2" value="2" enum="">
+ Joypad Button 2
+ </constant>
+ <constant name="JOY_BUTTON_3" value="3" enum="">
+ Joypad Button 3
+ </constant>
+ <constant name="JOY_BUTTON_4" value="4" enum="">
+ Joypad Button 4
+ </constant>
+ <constant name="JOY_BUTTON_5" value="5" enum="">
+ Joypad Button 5
+ </constant>
+ <constant name="JOY_BUTTON_6" value="6" enum="">
+ Joypad Button 6
+ </constant>
+ <constant name="JOY_BUTTON_7" value="7" enum="">
+ Joypad Button 7
+ </constant>
+ <constant name="JOY_BUTTON_8" value="8" enum="">
+ Joypad Button 8
+ </constant>
+ <constant name="JOY_BUTTON_9" value="9" enum="">
+ Joypad Button 9
+ </constant>
+ <constant name="JOY_BUTTON_10" value="10" enum="">
+ Joypad Button 10
+ </constant>
+ <constant name="JOY_BUTTON_11" value="11" enum="">
+ Joypad Button 11
+ </constant>
+ <constant name="JOY_BUTTON_12" value="12" enum="">
+ Joypad Button 12
+ </constant>
+ <constant name="JOY_BUTTON_13" value="13" enum="">
+ Joypad Button 13
+ </constant>
+ <constant name="JOY_BUTTON_14" value="14" enum="">
+ Joypad Button 14
+ </constant>
+ <constant name="JOY_BUTTON_15" value="15" enum="">
+ Joypad Button 15
+ </constant>
+ <constant name="JOY_BUTTON_MAX" value="16" enum="">
+ Joypad Button 16
+ </constant>
+ <constant name="JOY_SONY_CIRCLE" value="1" enum="">
+ DUALSHOCK circle button
+ </constant>
+ <constant name="JOY_SONY_X" value="0" enum="">
+ DUALSHOCK X button
+ </constant>
+ <constant name="JOY_SONY_SQUARE" value="2" enum="">
+ DUALSHOCK square button
+ </constant>
+ <constant name="JOY_SONY_TRIANGLE" value="3" enum="">
+ DUALSHOCK triangle button
+ </constant>
+ <constant name="JOY_XBOX_B" value="1" enum="">
+ XBOX controller B button
+ </constant>
+ <constant name="JOY_XBOX_A" value="0" enum="">
+ XBOX controller A button
+ </constant>
+ <constant name="JOY_XBOX_X" value="2" enum="">
+ XBOX controller X button
+ </constant>
+ <constant name="JOY_XBOX_Y" value="3" enum="">
+ XBOX controller Y button
+ </constant>
+ <constant name="JOY_DS_A" value="1" enum="">
+ </constant>
+ <constant name="JOY_DS_B" value="0" enum="">
+ </constant>
+ <constant name="JOY_DS_X" value="3" enum="">
+ </constant>
+ <constant name="JOY_DS_Y" value="2" enum="">
+ </constant>
+ <constant name="JOY_SELECT" value="10" enum="">
+ Joypad Button Select
+ </constant>
+ <constant name="JOY_START" value="11" enum="">
+ Joypad Button Start
+ </constant>
+ <constant name="JOY_DPAD_UP" value="12" enum="">
+ Joypad DPad Up
+ </constant>
+ <constant name="JOY_DPAD_DOWN" value="13" enum="">
+ Joypad DPad Down
+ </constant>
+ <constant name="JOY_DPAD_LEFT" value="14" enum="">
+ Joypad DPad Left
+ </constant>
+ <constant name="JOY_DPAD_RIGHT" value="15" enum="">
+ Joypad DPad Right
+ </constant>
+ <constant name="JOY_L" value="4" enum="">
+ Joypad Left Shoulder Button
+ </constant>
+ <constant name="JOY_L2" value="6" enum="">
+ Joypad Left Trigger
+ </constant>
+ <constant name="JOY_L3" value="8" enum="">
+ Joypad Left Stick Click
+ </constant>
+ <constant name="JOY_R" value="5" enum="">
+ Joypad Right Shoulder Button
+ </constant>
+ <constant name="JOY_R2" value="7" enum="">
+ Joypad Right Trigger
+ </constant>
+ <constant name="JOY_R3" value="9" enum="">
+ Joypad Right Stick Click
+ </constant>
+ <constant name="JOY_AXIS_0" value="0" enum="">
+ Joypad Left Stick Horizontal Axis
+ </constant>
+ <constant name="JOY_AXIS_1" value="1" enum="">
+ Joypad Left Stick Vertical Axis
+ </constant>
+ <constant name="JOY_AXIS_2" value="2" enum="">
+ Joypad Right Stick Horizontal Axis
+ </constant>
+ <constant name="JOY_AXIS_3" value="3" enum="">
+ Joypad Right Stick Vertical Axis
+ </constant>
+ <constant name="JOY_AXIS_4" value="4" enum="">
+ </constant>
+ <constant name="JOY_AXIS_5" value="5" enum="">
+ </constant>
+ <constant name="JOY_AXIS_6" value="6" enum="">
+ Joypad Left Trigger Analog Axis
+ </constant>
+ <constant name="JOY_AXIS_7" value="7" enum="">
+ Joypad Right Trigger Analog Axis
+ </constant>
+ <constant name="JOY_AXIS_MAX" value="8" enum="">
+ </constant>
+ <constant name="JOY_ANALOG_LX" value="0" enum="">
+ Joypad Left Stick Horizontal Axis
+ </constant>
+ <constant name="JOY_ANALOG_LY" value="1" enum="">
+ Joypad Left Stick Vertical Axis
+ </constant>
+ <constant name="JOY_ANALOG_RX" value="2" enum="">
+ Joypad Right Stick Horizontal Axis
+ </constant>
+ <constant name="JOY_ANALOG_RY" value="3" enum="">
+ Joypad Right Stick Vertical Axis
+ </constant>
+ <constant name="JOY_ANALOG_L2" value="6" enum="">
+ </constant>
+ <constant name="JOY_ANALOG_R2" value="7" enum="">
+ </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.
+ </constant>
+ <constant name="FAILED" value="1">
+ Generic fail return error.
+ </constant>
+ <constant name="ERR_UNAVAILABLE" value="2">
+ </constant>
+ <constant name="ERR_UNCONFIGURED" value="3">
+ </constant>
+ <constant name="ERR_UNAUTHORIZED" value="4">
+ </constant>
+ <constant name="ERR_PARAMETER_RANGE_ERROR" value="5">
+ </constant>
+ <constant name="ERR_OUT_OF_MEMORY" value="6">
+ </constant>
+ <constant name="ERR_FILE_NOT_FOUND" value="7">
+ </constant>
+ <constant name="ERR_FILE_BAD_DRIVE" value="8">
+ </constant>
+ <constant name="ERR_FILE_BAD_PATH" value="9">
+ </constant>
+ <constant name="ERR_FILE_NO_PERMISSION" value="10">
+ </constant>
+ <constant name="ERR_FILE_ALREADY_IN_USE" value="11">
+ </constant>
+ <constant name="ERR_FILE_CANT_OPEN" value="12">
+ </constant>
+ <constant name="ERR_FILE_CANT_WRITE" value="13">
+ </constant>
+ <constant name="ERR_FILE_CANT_READ" value="14">
+ </constant>
+ <constant name="ERR_FILE_UNRECOGNIZED" value="15">
+ </constant>
+ <constant name="ERR_FILE_CORRUPT" value="16">
+ </constant>
+ <constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17">
+ </constant>
+ <constant name="ERR_FILE_EOF" value="18">
+ </constant>
+ <constant name="ERR_CANT_OPEN" value="19">
+ </constant>
+ <constant name="ERR_CANT_CREATE" value="20">
+ </constant>
+ <constant name="ERR_PARSE_ERROR" value="43">
+ </constant>
+ <constant name="ERR_QUERY_FAILED" value="21">
+ </constant>
+ <constant name="ERR_ALREADY_IN_USE" value="22">
+ </constant>
+ <constant name="ERR_LOCKED" value="23">
+ </constant>
+ <constant name="ERR_TIMEOUT" value="24">
+ </constant>
+ <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28">
+ </constant>
+ <constant name="ERR_INVALID_DATA" value="30">
+ </constant>
+ <constant name="ERR_INVALID_PARAMETER" value="31">
+ </constant>
+ <constant name="ERR_ALREADY_EXISTS" value="32">
+ </constant>
+ <constant name="ERR_DOES_NOT_EXIST" value="33">
+ </constant>
+ <constant name="ERR_DATABASE_CANT_READ" value="34">
+ </constant>
+ <constant name="ERR_DATABASE_CANT_WRITE" value="35">
+ </constant>
+ <constant name="ERR_COMPILATION_FAILED" value="36">
+ </constant>
+ <constant name="ERR_METHOD_NOT_FOUND" value="37">
+ </constant>
+ <constant name="ERR_LINK_FAILED" value="38">
+ </constant>
+ <constant name="ERR_SCRIPT_FAILED" value="39">
+ </constant>
+ <constant name="ERR_CYCLIC_LINK" value="40">
+ </constant>
+ <constant name="ERR_BUSY" value="44">
+ </constant>
+ <constant name="ERR_HELP" value="46">
+ </constant>
+ <constant name="ERR_BUG" value="47">
+ </constant>
+ <constant name="ERR_WTF" value="49">
+ </constant>
+ <constant name="PROPERTY_HINT_NONE" value="0">
+ No hint for edited property.
+ </constant>
+ <constant name="PROPERTY_HINT_RANGE" value="1">
+ Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
+ </constant>
+ <constant name="PROPERTY_HINT_EXP_RANGE" value="2">
+ Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats.
+ </constant>
+ <constant name="PROPERTY_HINT_ENUM" value="3">
+ Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties.
+ </constant>
+ <constant name="PROPERTY_HINT_EXP_EASING" value="4">
+ </constant>
+ <constant name="PROPERTY_HINT_LENGTH" value="5">
+ </constant>
+ <constant name="PROPERTY_HINT_KEY_ACCEL" value="7">
+ </constant>
+ <constant name="PROPERTY_HINT_FLAGS" value="8">
+ Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers.
+ </constant>
+ <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="9">
+ </constant>
+ <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="10">
+ </constant>
+ <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11">
+ </constant>
+ <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12">
+ </constant>
+ <constant name="PROPERTY_HINT_FILE" value="13">
+ String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc".
+ </constant>
+ <constant name="PROPERTY_HINT_DIR" value="14">
+ String property is a directory (so pop up a file dialog when edited).
+ </constant>
+ <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15">
+ </constant>
+ <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16">
+ </constant>
+ <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17">
+ String property is a resource, so open the resource popup menu when edited.
+ </constant>
+ <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18">
+ </constant>
+ <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19">
+ </constant>
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20">
+ </constant>
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21">
+ </constant>
+ <constant name="PROPERTY_USAGE_STORAGE" value="1">
+ Property will be used as storage (default).
+ </constant>
+ <constant name="PROPERTY_USAGE_EDITOR" value="2">
+ Property will be visible in editor (default).
+ </constant>
+ <constant name="PROPERTY_USAGE_NETWORK" value="4">
+ </constant>
+ <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8">
+ </constant>
+ <constant name="PROPERTY_USAGE_CHECKABLE" value="16">
+ </constant>
+ <constant name="PROPERTY_USAGE_CHECKED" value="32">
+ </constant>
+ <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64">
+ </constant>
+ <constant name="PROPERTY_USAGE_GROUP" value="128">
+ </constant>
+ <constant name="PROPERTY_USAGE_CATEGORY" value="256">
+ </constant>
+ <constant name="PROPERTY_USAGE_STORE_IF_NONZERO" value="512">
+ </constant>
+ <constant name="PROPERTY_USAGE_STORE_IF_NONONE" value="1024">
+ </constant>
+ <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048">
+ </constant>
+ <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096">
+ </constant>
+ <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192">
+ </constant>
+ <constant name="PROPERTY_USAGE_DEFAULT" value="7">
+ Default usage (storage and editor).
+ </constant>
+ <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71">
+ </constant>
+ <constant name="PROPERTY_USAGE_NOEDITOR" value="5">
+ </constant>
+ <constant name="METHOD_FLAG_NORMAL" value="1">
+ </constant>
+ <constant name="METHOD_FLAG_EDITOR" value="2">
+ </constant>
+ <constant name="METHOD_FLAG_NOSCRIPT" value="4">
+ </constant>
+ <constant name="METHOD_FLAG_CONST" value="8">
+ </constant>
+ <constant name="METHOD_FLAG_REVERSE" value="16">
+ </constant>
+ <constant name="METHOD_FLAG_VIRTUAL" value="32">
+ </constant>
+ <constant name="METHOD_FLAG_FROM_SCRIPT" value="64">
+ </constant>
+ <constant name="METHOD_FLAGS_DEFAULT" value="1">
+ </constant>
+ <constant name="TYPE_NIL" value="0">
+ Variable is of type nil (only applied for null).
+ </constant>
+ <constant name="TYPE_BOOL" value="1">
+ Variable is of type [bool].
+ </constant>
+ <constant name="TYPE_INT" value="2">
+ Variable is of type [int].
+ </constant>
+ <constant name="TYPE_REAL" value="3">
+ Variable is of type [float]/real.
+ </constant>
+ <constant name="TYPE_STRING" value="4">
+ Variable is of type [String].
+ </constant>
+ <constant name="TYPE_VECTOR2" value="5">
+ Variable is of type [Vector2].
+ </constant>
+ <constant name="TYPE_RECT2" value="6">
+ Variable is of type [Rect2].
+ </constant>
+ <constant name="TYPE_VECTOR3" value="7">
+ Variable is of type [Vector3].
+ </constant>
+ <constant name="TYPE_TRANSFORM2D" value="8">
+ Variable is of type [Transform2D].
+ </constant>
+ <constant name="TYPE_PLANE" value="9">
+ Variable is of type [Plane].
+ </constant>
+ <constant name="TYPE_QUAT" value="10">
+ Variable is of type [Quat].
+ </constant>
+ <constant name="TYPE_RECT3" value="11">
+ Variable is of type [Rect3].
+ </constant>
+ <constant name="TYPE_BASIS" value="12">
+ Variable is of type [Basis].
+ </constant>
+ <constant name="TYPE_TRANSFORM" value="13">
+ Variable is of type [Transform].
+ </constant>
+ <constant name="TYPE_COLOR" value="14">
+ Variable is of type [Color].
+ </constant>
+ <constant name="TYPE_NODE_PATH" value="15">
+ Variable is of type [NodePath].
+ </constant>
+ <constant name="TYPE_RID" value="16">
+ Variable is of type [RID].
+ </constant>
+ <constant name="TYPE_OBJECT" value="17">
+ Variable is of type [Object].
+ </constant>
+ <constant name="TYPE_DICTIONARY" value="18">
+ Variable is of type [Dictionary].
+ </constant>
+ <constant name="TYPE_ARRAY" value="19">
+ Variable is of type [Array].
+ </constant>
+ <constant name="TYPE_RAW_ARRAY" value="20">
+ Variable is of type [PoolByteArray].
+ </constant>
+ <constant name="TYPE_INT_ARRAY" value="21">
+ Variable is of type [PoolIntArray].
+ </constant>
+ <constant name="TYPE_REAL_ARRAY" value="22">
+ Variable is of type [PoolRealArray].
+ </constant>
+ <constant name="TYPE_STRING_ARRAY" value="23">
+ Variable is of type [PoolStringArray].
+ </constant>
+ <constant name="TYPE_VECTOR2_ARRAY" value="24">
+ Variable is of type [PoolVector2Array].
+ </constant>
+ <constant name="TYPE_VECTOR3_ARRAY" value="25">
+ Variable is of type [PoolVector3Array].
+ </constant>
+ <constant name="TYPE_COLOR_ARRAY" value="26">
+ Variable is of type [PoolColorArray].
+ </constant>
+ <constant name="TYPE_MAX" value="27">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml
new file mode 100644
index 0000000000..03e6416b19
--- /dev/null
+++ b/doc/classes/@NativeScript.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="@NativeScript" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml
new file mode 100644
index 0000000000..2392e3ecca
--- /dev/null
+++ b/doc/classes/@VisualScript.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="@VisualScript" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
new file mode 100644
index 0000000000..4ff39390b2
--- /dev/null
+++ b/doc/classes/ARVRAnchor.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Anchor point in AR Space
+ </brief_description>
+ <description>
+ The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them.
+ This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised.
+ Keep in mind that as long as plane detection is enable the size, placing and orientation of an anchor will be updates as the detection logic learns more about the real world out there especially if only part of the surface is in view.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_anchor_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the anchor id for this anchor.
+ </description>
+ </method>
+ <method name="get_anchor_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name given to this anchor.
+ </description>
+ </method>
+ <method name="get_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the anchor is being tracked and false if no anchor with this id is currently known.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
+ </description>
+ </method>
+ <method name="set_anchor_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="anchor_id" type="int">
+ </argument>
+ <description>
+ Binds this anchor node to an anchor with this id. You can set this before the anchor itself exists. The first anchor that is identified gets id 1, the second id 2, etc. When anchors get removed that slot remains free and can be assigned to the next anchor that is identified. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merge them.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml
new file mode 100644
index 0000000000..e6817d3417
--- /dev/null
+++ b/doc/classes/ARVRCamera.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRCamera" inherits="Camera" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A camera node with a few overrules for AR/VR applied such as location tracking.
+ </brief_description>
+ <description>
+ This is a helper spatial node for our camera, note that if stereoscopic rendering is applicable (VR-HMD) most of the camera properties are ignored as the HMD information overrides them. The only properties that can be trusted are the near and far planes.
+ The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that in contrast to the ARVR Controller the render thread has access to the most up to date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
new file mode 100644
index 0000000000..557f915c1d
--- /dev/null
+++ b/doc/classes/ARVRController.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRController" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A spatial node representing a spatially tracked controller.
+ </brief_description>
+ <description>
+ This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers.
+ Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used you should react to the signals and add ARVRController nodes to your scene.
+ The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_controller_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the controller id currently assigned to this node.
+ </description>
+ </method>
+ <method name="get_controller_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ If active, returns the name of the associated controller if provided by the AR/VR SDK used.
+ </description>
+ </method>
+ <method name="get_hand" qualifiers="const">
+ <return type="int" enum="ARVRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the controller bound to this node is currently active and being tracked.
+ </description>
+ </method>
+ <method name="get_joystick_axis" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="axis" type="int">
+ </argument>
+ <description>
+ Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.
+ </description>
+ </method>
+ <method name="get_joystick_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
+ </description>
+ </method>
+ <method name="is_button_pressed" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ Is the given button currently pressed?
+ </description>
+ </method>
+ <method name="set_controller_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="controller_id" type="int">
+ </argument>
+ <description>
+ Changes the id that identifies the controller bound to this node. The first controller that the ARVR Server detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off that slot is freed ensuring that controllers will keep the same id while it is turned on even when controllers with lower ids are turned off.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id">
+ </member>
+ </members>
+ <signals>
+ <signal name="button_pressed">
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ When a button on this controller is pressed, this signal is given.
+ </description>
+ </signal>
+ <signal name="button_release">
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ When a button on this controller is released, this signal is given.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
new file mode 100644
index 0000000000..fad9571628
--- /dev/null
+++ b/doc/classes/ARVRInterface.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRInterface" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for ARVR interface implementation.
+ </brief_description>
+ <description>
+ This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
+ Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
+ </description>
+ </method>
+ <method name="get_recommended_render_targetsize">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
+ </description>
+ </method>
+ <method name="hmd_is_present">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if an HMD is available for this interface.
+ </description>
+ </method>
+ <method name="initialize">
+ <return type="bool">
+ </return>
+ <description>
+ Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
+ After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
+ Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR.
+ If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different.
+ While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD.
+ </description>
+ </method>
+ <method name="is_initialized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface is active.
+ </description>
+ </method>
+ <method name="is_installed">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false.
+ </description>
+ </method>
+ <method name="is_primary">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface is currently the primary interface (the interface responsible for showing the output).
+ </description>
+ </method>
+ <method name="set_is_primary">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set this interface to the primary interface (unset the old one).
+ </description>
+ </method>
+ <method name="supports_hmd">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface supports HMDs and by extension uses stereo scopic rendering.
+ </description>
+ </method>
+ <method name="uninitialize">
+ <return type="void">
+ </return>
+ <description>
+ Turns the interface off.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="primary" type="bool" setter="set_is_primary" getter="is_primary">
+ </member>
+ </members>
+ <constants>
+ <constant name="EYE_MONO" value="0">
+ Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
+ </constant>
+ <constant name="EYE_LEFT" value="1">
+ Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information.
+ </constant>
+ <constant name="EYE_RIGHT" value="2">
+ Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml
new file mode 100644
index 0000000000..28864bb3ae
--- /dev/null
+++ b/doc/classes/ARVROrigin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Our origin point in AR/VR.
+ </brief_description>
+ <description>
+ This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world.
+ There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly.
+ It is the position of this node that you update when you're character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point.
+ So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_world_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the world scale applied to our positioning.
+ </description>
+ </method>
+ <method name="set_world_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="world_scale" type="float">
+ </argument>
+ <description>
+ Changes the world scaling factor.
+ Most AR/VR platforms will assume a unit size of 1 unit in your game world = 1 meter in the real world. This scale allows you to adjust this to the unit system you use in your game.
+ Note that this method is a passthrough to the ARVRServer itself.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
new file mode 100644
index 0000000000..1379677344
--- /dev/null
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A tracked object
+ </brief_description>
+ <description>
+ An instance of this object represents a device that is tracked such as a controller or anchor point. HMDs aren't represented here as they are fully handled internally.
+ As controllers are turned on and the AR/VR interface detects them instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer
+ The ARVRController and ARVRAnchor both consume objects of this type and should be the objects you use in game. The positional trackers are just the under the hood objects that make this all work and are mostly exposed so GDNative based interfaces can interact with them.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_hand" qualifiers="const">
+ <return type="int" enum="ARVRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_joy_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ If this is a controller that is being tracked the controller will also be represented by a joystick entry with this id.
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ If available this returns the name of the controller or anchor point.
+ </description>
+ </method>
+ <method name="get_orientation" qualifiers="const">
+ <return type="Basis">
+ </return>
+ <description>
+ Returns the orientation matrix of the controller.
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the position of the controller adjusted by world scale.
+ </description>
+ </method>
+ <method name="get_tracks_orientation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the orientation of this device is being tracked.
+ </description>
+ </method>
+ <method name="get_tracks_position" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the position of this device is being tracked.
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="adjust_by_reference_frame" type="bool">
+ </argument>
+ <description>
+ Returns the transform combining the orientation and position of this device.
+ </description>
+ </method>
+ <method name="get_type" qualifiers="const">
+ <return type="int" enum="ARVRServer.TrackerType">
+ </return>
+ <description>
+ Type of tracker.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="TRACKER_HAND_UNKNOWN" value="0">
+ </constant>
+ <constant name="TRACKER_LEFT_HAND" value="1">
+ </constant>
+ <constant name="TRACKER_RIGHT_HAND" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml
new file mode 100644
index 0000000000..54415539e0
--- /dev/null
+++ b/doc/classes/ARVRScriptInterface.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRScriptInterface" inherits="ARVRInterface" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for GDNative based ARVR interfaces.
+ </brief_description>
+ <description>
+ This class is used as a base class/interface class for implementing GDNative based ARVR interfaces and as a result exposes more of the internals of the ARVR server.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_get_projection_for_eye" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Should return the projection 4x4 matrix for the requested eye.
+ </description>
+ </method>
+ <method name="commit_for_eye" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="eye" type="int">
+ </argument>
+ <argument index="1" name="render_target" type="RID">
+ </argument>
+ <description>
+ Outputs a finished render buffer to the AR/VR device for the given eye.
+ </description>
+ </method>
+ <method name="get_recommended_render_targetsize" qualifiers="virtual">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the size at which we should render our scene to get optimal quality on the output device.
+ </description>
+ </method>
+ <method name="get_transform_for_eye" qualifiers="virtual">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="eye" type="int">
+ </argument>
+ <argument index="1" name="cam_transform" type="Transform">
+ </argument>
+ <description>
+ Get the location and orientation transform used when rendering a specific eye.
+ </description>
+ </method>
+ <method name="hmd_is_present" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Return true is an HMD is available.
+ </description>
+ </method>
+ <method name="initialize" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Initialize this interface.
+ </description>
+ </method>
+ <method name="is_initialized" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface has been initialized and is active.
+ </description>
+ </method>
+ <method name="is_installed" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the required middleware is installed.
+ </description>
+ </method>
+ <method name="is_stereo" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if we require stereoscopic rendering for this interface.
+ </description>
+ </method>
+ <method name="process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Gets called before rendering each frame so tracking data gets updated in time.
+ </description>
+ </method>
+ <method name="supports_hmd" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this interface supports HMDs.
+ </description>
+ </method>
+ <method name="uninitialize" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Turn this interface off.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
new file mode 100644
index 0000000000..282f25bec9
--- /dev/null
+++ b/doc/classes/ARVRServer.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ARVRServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ This is our AR/VR Server.
+ </brief_description>
+ <description>
+ The AR/VR Server is the heart of our AR/VR solution and handles all the processing.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server.
+ </description>
+ </method>
+ <method name="find_interface" qualifiers="const">
+ <return type="ARVRInterface">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it.
+ </description>
+ </method>
+ <method name="get_interface" qualifiers="const">
+ <return type="ARVRInterface">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the interface registered at a given index in our list of interfaces.
+ </description>
+ </method>
+ <method name="get_interface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look throught the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true.
+ </description>
+ </method>
+ <method name="get_reference_frame" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ Gets our reference frame transform, mostly used internally and exposed for GDNative build interfaces.
+ </description>
+ </method>
+ <method name="get_tracker" qualifiers="const">
+ <return type="ARVRPositionalTracker">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the positional tracker at the given ID.
+ </description>
+ </method>
+ <method name="get_tracker_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the number of trackers currently registered.
+ </description>
+ </method>
+ <method name="get_world_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns our world scale (see ARVROrigin for more information).
+ </description>
+ </method>
+ <method name="remove_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ Removes a registered interface, again exposed mostly for GDNative based interfaces.
+ </description>
+ </method>
+ <method name="request_reference_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="ignore_tilt" type="bool">
+ </argument>
+ <argument index="1" name="keep_height" type="bool">
+ </argument>
+ <description>
+ This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
+ For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world.
+ For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera.
+ This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world.
+ For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game.
+ You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism.
+ </description>
+ </method>
+ <method name="set_primary_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ Changes the primary interface to the specified interface. Again mostly exposed for GDNative interfaces.
+ </description>
+ </method>
+ <method name="set_world_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="float">
+ </argument>
+ <description>
+ Changing the world scale, see the ARVROrigin documentation for more information.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ </member>
+ </members>
+ <signals>
+ <signal name="interface_added">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Signal send when a new interface has been added.
+ </description>
+ </signal>
+ <signal name="interface_removed">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Signal send when an interface is removed.
+ </description>
+ </signal>
+ <signal name="tracker_added">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="int">
+ </argument>
+ <argument index="2" name="id" type="int">
+ </argument>
+ <description>
+ Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker.
+ </description>
+ </signal>
+ <signal name="tracker_removed">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="int">
+ </argument>
+ <argument index="2" name="id" type="int">
+ </argument>
+ <description>
+ Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TRACKER_CONTROLLER" value="1">
+ Our tracker tracks the location of a controller.
+ </constant>
+ <constant name="TRACKER_BASESTATION" value="2">
+ Our tracker tracks the location of a base station.
+ </constant>
+ <constant name="TRACKER_ANCHOR" value="4">
+ Our tracker tracks the location and size of an AR anchor.
+ </constant>
+ <constant name="TRACKER_UNKNOWN" value="128">
+ Used internally if we haven't set the tracker type yet.
+ </constant>
+ <constant name="TRACKER_ANY_KNOWN" value="127">
+ Used internally to filter trackers of any known type.
+ </constant>
+ <constant name="TRACKER_ANY" value="255">
+ Used interally to select all trackers.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
new file mode 100644
index 0000000000..d94b8355ba
--- /dev/null
+++ b/doc/classes/AStar.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AStar" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ AStar class representation that uses vectors as edges.
+ </brief_description>
+ <description>
+ A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points.
+ You must add points manually with [method AStar.add_point] and create segments manually with [method AStar.connect_points]. So you can test if there is a path between two points with the [method AStar.are_points_connected] function, get the list of existing ids in the found path with [method AStar.get_id_path], or the points list with [method AStar.get_point_path].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_compute_cost" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Called when computing the cost between two connected points.
+ </description>
+ </method>
+ <method name="_estimate_cost" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Called when estimating the cost between a point and the path's ending point.
+ </description>
+ </method>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <argument index="2" name="weight_scale" type="float" default="1.0">
+ </argument>
+ <description>
+ Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ [codeblock]
+ var as = AStar.new()
+
+ as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="are_points_connected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns whether there is a connection/segment between the given points.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clears all the points and segments.
+ </description>
+ </method>
+ <method name="connect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <argument index="2" name="bidirectional" type="bool" default="true">
+ </argument>
+ <description>
+ Creates a segment between the given points.
+ [codeblock]
+ var as = AStar.new()
+
+ as.add_point(1, Vector3(1,1,0))
+ as.add_point(2, Vector3(0,5,0))
+
+ as.connect_points(1, 2, false) # If bidirectional=false it's only possible to go from point 1 to point 2
+ # and not from point 2 to point 1.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="disconnect_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Deletes the segment between the given points.
+ </description>
+ </method>
+ <method name="get_available_point_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns an id with no point associated to it.
+ </description>
+ </method>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="to_pos" type="Vector3">
+ </argument>
+ <description>
+ Returns the id of the closest point to [code]to_pos[/code]. Returns -1 if there are no points in the points pool.
+ </description>
+ </method>
+ <method name="get_closest_pos_in_segment" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_pos" type="Vector3">
+ </argument>
+ <description>
+ Returns the closest position to [code]to_pos[/code] that resides inside a segment between two connected points.
+ [codeblock]
+ var as = AStar.new()
+
+ as.add_point(1, Vector3(0,0,0))
+ as.add_point(2, Vector3(0,5,0))
+
+ as.connect_points(1, 2)
+
+ var res = as.get_closest_pos_in_segment(Vector3(3,3,0)) # returns (0, 3, 0)
+ [/codeblock]
+ The result is in the segment that goes from [code]y=0[/code] to [code]y=5[/code]. It's the closest position in the segment to the given point.
+ </description>
+ </method>
+ <method name="get_id_path">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
+ [codeblock]
+ var as = AStar.new()
+
+ as.add_point(1, Vector3(0,0,0))
+ as.add_point(2, Vector3(0,1,0), 1) # default weight is 1
+ as.add_point(3, Vector3(1,1,0))
+ as.add_point(4, Vector3(2,0,0))
+
+ as.connect_points(1, 2, false)
+ as.connect_points(2, 3, false)
+ as.connect_points(4, 3, false)
+ as.connect_points(1, 4, false)
+ as.connect_points(5, 4, false)
+
+ var res = as.get_id_path(1, 3) # returns [1, 2, 3]
+ [/codeblock]
+ If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
+ </description>
+ </method>
+ <method name="get_point_path">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="from_id" type="int">
+ </argument>
+ <argument index="1" name="to_id" type="int">
+ </argument>
+ <description>
+ Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
+ </description>
+ </method>
+ <method name="get_point_pos" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the position of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_point_weight_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns the weight scale of the point associated with the given id.
+ </description>
+ </method>
+ <method name="get_points">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_point" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns whether a point associated with the given id exists.
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Removes the point associated with the given id from the points pool.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
new file mode 100644
index 0000000000..4244e66a35
--- /dev/null
+++ b/doc/classes/AcceptDialog.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base dialog for user notification.
+ </brief_description>
+ <description>
+ This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_button">
+ <return type="Button">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="right" type="bool" default="false">
+ </argument>
+ <argument index="2" name="action" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [custom_action] signal when pressed.
+ If [code]true[/code], [i]right[/i] will place the button to the right of any sibling buttons. Default value: [code]false[/code].
+ </description>
+ </method>
+ <method name="add_cancel">
+ <return type="Button">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Adds a button with label [i]name[/i] and a cancel action to the dialog and returns the created button.
+ </description>
+ </method>
+ <method name="get_hide_on_ok" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the dialog will be hidden when accepted (default true).
+ </description>
+ </method>
+ <method name="get_label">
+ <return type="Label">
+ </return>
+ <description>
+ Return the label used for built-in text.
+ </description>
+ </method>
+ <method name="get_ok">
+ <return type="Button">
+ </return>
+ <description>
+ Return the OK Button.
+ </description>
+ </method>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the built-in label text.
+ </description>
+ </method>
+ <method name="register_text_enter">
+ <return type="void">
+ </return>
+ <argument index="0" name="line_edit" type="Node">
+ </argument>
+ <description>
+ Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
+ </description>
+ </method>
+ <method name="set_hide_on_ok">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether the dialog is hidden when accepted (default true).
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Set the built-in label text.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok">
+ </member>
+ <member name="dialog_text" type="String" setter="set_text" getter="get_text">
+ </member>
+ </members>
+ <signals>
+ <signal name="confirmed">
+ <description>
+ Emitted when the dialog is accepted.
+ </description>
+ </signal>
+ <signal name="custom_action">
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Emitted when a custom button is pressed. See [method add_button].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml
new file mode 100644
index 0000000000..f8663e90e0
--- /dev/null
+++ b/doc/classes/AnimatedSprite.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Sprite node that can use multiple textures for animation.
+ </brief_description>
+ <description>
+ Sprite node that can use multiple textures for animation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the current animation set to the node.
+ </description>
+ </method>
+ <method name="get_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the visible frame index.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the offset of the sprite in the node origin.
+ </description>
+ </method>
+ <method name="get_sprite_frames" qualifiers="const">
+ <return type="SpriteFrames">
+ </return>
+ <description>
+ Get the [SpriteFrames] resource, which contains all frames.
+ </description>
+ </method>
+ <method name="is_centered" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true when centered. See [method set_centered].
+ </description>
+ </method>
+ <method name="is_flipped_h" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if sprite is flipped horizontally.
+ </description>
+ </method>
+ <method name="is_flipped_v" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if sprite is flipped vertically.
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if an animation if currently being played.
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Play the animation set in parameter. If no parameter is provided, the current animation is played.
+ </description>
+ </method>
+ <method name="set_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="animation" type="String">
+ </argument>
+ <description>
+ Set the current animation of the node and reinits the frame counter of the animation.
+ </description>
+ </method>
+ <method name="set_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="centered" type="bool">
+ </argument>
+ <description>
+ When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is.
+ </description>
+ </method>
+ <method name="set_flip_h">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_h" type="bool">
+ </argument>
+ <description>
+ If true, sprite is flipped horizontally.
+ </description>
+ </method>
+ <method name="set_flip_v">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_v" type="bool">
+ </argument>
+ <description>
+ If true, sprite is flipped vertically.
+ </description>
+ </method>
+ <method name="set_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="frame" type="int">
+ </argument>
+ <description>
+ Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not.
+ </description>
+ </method>
+ <method name="set_sprite_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="sprite_frames" type="SpriteFrames">
+ </argument>
+ <description>
+ Set the [SpriteFrames] resource, which contains all frames.
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stop the current animation (does not reset the frame counter).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="animation" type="String" setter="set_animation" getter="get_animation">
+ </member>
+ <member name="centered" type="bool" setter="set_centered" getter="is_centered">
+ </member>
+ <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
+ </member>
+ <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
+ </member>
+ <member name="frame" type="int" setter="set_frame" getter="get_frame">
+ </member>
+ <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ </member>
+ <member name="playing" type="bool" setter="_set_playing" getter="_is_playing">
+ </member>
+ </members>
+ <signals>
+ <signal name="animation_finished">
+ <description>
+ Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn, before looping.
+ </description>
+ </signal>
+ <signal name="frame_changed">
+ <description>
+ Emitted when frame is changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
new file mode 100644
index 0000000000..4e28f7de8d
--- /dev/null
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the current animation set to the node.
+ </description>
+ </method>
+ <method name="get_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the visible frame index.
+ </description>
+ </method>
+ <method name="get_sprite_frames" qualifiers="const">
+ <return type="SpriteFrames">
+ </return>
+ <description>
+ Get the [SpriteFrames] resource, which contains all frames.
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if an animation if currently being played.
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Play the animation set in parameter. If no parameter is provided, the current animation is played.
+ </description>
+ </method>
+ <method name="set_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="animation" type="String">
+ </argument>
+ <description>
+ Set the current animation of the node and reinits the frame counter of the animation.
+ </description>
+ </method>
+ <method name="set_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="frame" type="int">
+ </argument>
+ <description>
+ Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource).
+ </description>
+ </method>
+ <method name="set_sprite_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="sprite_frames" type="SpriteFrames">
+ </argument>
+ <description>
+ Set the [SpriteFrames] resource, which contains all frames.
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stop the current animation (does not reset the frame counter).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="animation" type="String" setter="set_animation" getter="get_animation">
+ </member>
+ <member name="frame" type="int" setter="set_frame" getter="get_frame">
+ </member>
+ <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
+ </member>
+ <member name="playing" type="bool" setter="_set_playing" getter="_is_playing">
+ </member>
+ </members>
+ <signals>
+ <signal name="frame_changed">
+ <description>
+ Emitted when frame is changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
new file mode 100644
index 0000000000..b80edb24da
--- /dev/null
+++ b/doc/classes/Animation.xml
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Animation" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Contains data used to animate everything in the engine.
+ </brief_description>
+ <description>
+ An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
+ Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_track">
+ <return type="int">
+ </return>
+ <argument index="0" name="type" type="int" enum="Animation.TrackType">
+ </argument>
+ <argument index="1" name="at_pos" type="int" default="-1">
+ </argument>
+ <description>
+ Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the animation (clear all tracks and reset all).
+ </description>
+ </method>
+ <method name="find_track" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Return the index of the specified track. If the track is not found, return -1.
+ </description>
+ </method>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the total length of the animation (in seconds).
+ </description>
+ </method>
+ <method name="get_step" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the animation step value.
+ </description>
+ </method>
+ <method name="get_track_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of tracks in the animation.
+ </description>
+ </method>
+ <method name="has_loop" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the animation has the loop flag set.
+ </description>
+ </method>
+ <method name="method_track_get_key_indices" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <argument index="2" name="delta" type="float">
+ </argument>
+ <description>
+ Return all the key indices of a method track, given a position and delta time.
+ </description>
+ </method>
+ <method name="method_track_get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Return the method name of a method track.
+ </description>
+ </method>
+ <method name="method_track_get_params" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Return the arguments values to be called on a method track for a given key in a given track.
+ </description>
+ </method>
+ <method name="remove_track">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove a track by specifying the track index.
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="time_sec" type="float">
+ </argument>
+ <description>
+ Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
+ </description>
+ </method>
+ <method name="set_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
+ </description>
+ </method>
+ <method name="set_step">
+ <return type="void">
+ </return>
+ <argument index="0" name="size_sec" type="float">
+ </argument>
+ <description>
+ Set the animation step value.
+ </description>
+ </method>
+ <method name="track_find_key" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <argument index="2" name="exact" type="bool" default="false">
+ </argument>
+ <description>
+ Find the key index by time in a given track. Optionally, only find it if the exact time is given.
+ </description>
+ </method>
+ <method name="track_get_interpolation_loop_wrap" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="track_get_interpolation_type" qualifiers="const">
+ <return type="int" enum="Animation.InterpolationType">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the interpolation type of a given track, from the INTERPOLATION_* enum.
+ </description>
+ </method>
+ <method name="track_get_key_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the amount of keys in a given track.
+ </description>
+ </method>
+ <method name="track_get_key_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Return the time at which the key is located.
+ </description>
+ </method>
+ <method name="track_get_key_transition" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Return the transition curve (easing) for a specific key (see built-in math function "ease").
+ </description>
+ </method>
+ <method name="track_get_key_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Return the value of a given key in a given track.
+ </description>
+ </method>
+ <method name="track_get_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the path of a track. for more information on the path format, see [method track_set_path]
+ </description>
+ </method>
+ <method name="track_get_type" qualifiers="const">
+ <return type="int" enum="Animation.TrackType">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the type of a track.
+ </description>
+ </method>
+ <method name="track_insert_key">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <argument index="2" name="key" type="Variant">
+ </argument>
+ <argument index="3" name="transition" type="float" default="1">
+ </argument>
+ <description>
+ Insert a generic key in a given track.
+ </description>
+ </method>
+ <method name="track_is_imported" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return true if the given track is imported. Else, return false.
+ </description>
+ </method>
+ <method name="track_move_down">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Move a track down.
+ </description>
+ </method>
+ <method name="track_move_up">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Move a track up.
+ </description>
+ </method>
+ <method name="track_remove_key">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <description>
+ Remove a key by index in a given track.
+ </description>
+ </method>
+ <method name="track_remove_key_at_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="float">
+ </argument>
+ <description>
+ Remove a key by position (seconds) in a given track.
+ </description>
+ </method>
+ <method name="track_set_imported">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="imported" type="bool">
+ </argument>
+ <description>
+ Set the given track as imported or not.
+ </description>
+ </method>
+ <method name="track_set_interpolation_loop_wrap">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="interpolation" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="track_set_interpolation_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType">
+ </argument>
+ <description>
+ Set the interpolation type of a given track, from the INTERPOLATION_* enum.
+ </description>
+ </method>
+ <method name="track_set_key_transition">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key_idx" type="int">
+ </argument>
+ <argument index="2" name="transition" type="float">
+ </argument>
+ <description>
+ Set the transition curve (easing) for a specific key (see built-in math function "ease").
+ </description>
+ </method>
+ <method name="track_set_key_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="key" type="int">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Set the value of an existing key.
+ </description>
+ </method>
+ <method name="track_set_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="path" type="NodePath">
+ </argument>
+ <description>
+ Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
+ </description>
+ </method>
+ <method name="transform_track_insert_key">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <argument index="2" name="loc" type="Vector3">
+ </argument>
+ <argument index="3" name="rot" type="Quat">
+ </argument>
+ <argument index="4" name="scale" type="Vector3">
+ </argument>
+ <description>
+ Insert a transform key for a transform track.
+ </description>
+ </method>
+ <method name="transform_track_interpolate" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <description>
+ Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
+ </description>
+ </method>
+ <method name="value_track_get_key_indices" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <argument index="2" name="delta" type="float">
+ </argument>
+ <description>
+ Return all the key indices of a value track, given a position and delta time.
+ </description>
+ </method>
+ <method name="value_track_get_update_mode" qualifiers="const">
+ <return type="int" enum="Animation.UpdateMode">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the update mode of a value track.
+ </description>
+ </method>
+ <method name="value_track_set_update_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
+ </argument>
+ <description>
+ Set the update mode (UPDATE_*) of a value track.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="TYPE_VALUE" value="0">
+ Value tracks set values in node properties, but only those which can be Interpolated.
+ </constant>
+ <constant name="TYPE_TRANSFORM" value="1">
+ Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
+ </constant>
+ <constant name="TYPE_METHOD" value="2">
+ Method tracks call functions with given arguments per key.
+ </constant>
+ <constant name="INTERPOLATION_NEAREST" value="0">
+ No interpolation (nearest value).
+ </constant>
+ <constant name="INTERPOLATION_LINEAR" value="1">
+ Linear interpolation.
+ </constant>
+ <constant name="INTERPOLATION_CUBIC" value="2">
+ Cubic interpolation.
+ </constant>
+ <constant name="UPDATE_CONTINUOUS" value="0">
+ Update between keyframes.
+ </constant>
+ <constant name="UPDATE_DISCRETE" value="1">
+ Update at the keyframes and hold the value.
+ </constant>
+ <constant name="UPDATE_TRIGGER" value="2">
+ Update at the keyframes.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
new file mode 100644
index 0000000000..746462380b
--- /dev/null
+++ b/doc/classes/AnimationPlayer.xml
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationPlayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Container and player of [Animation] resources.
+ </brief_description>
+ <description>
+ An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_animation">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="animation" type="Animation">
+ </argument>
+ <description>
+ Add an animation resource to the player, which will be later referenced by the "name" argument.
+ </description>
+ </method>
+ <method name="advance">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip.
+ </description>
+ </method>
+ <method name="animation_get_next" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="anim_from" type="String">
+ </argument>
+ <description>
+ Return the name of the next animation in the queue.
+ </description>
+ </method>
+ <method name="animation_set_next">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim_from" type="String">
+ </argument>
+ <argument index="1" name="anim_to" type="String">
+ </argument>
+ <description>
+ Set the name of an animation that will be played after.
+ </description>
+ </method>
+ <method name="clear_caches">
+ <return type="void">
+ </return>
+ <description>
+ The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
+ </description>
+ </method>
+ <method name="clear_queue">
+ <return type="void">
+ </return>
+ <description>
+ If animations are queued to play, clear them.
+ </description>
+ </method>
+ <method name="find_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="animation" type="Animation">
+ </argument>
+ <description>
+ Find an animation name by resource.
+ </description>
+ </method>
+ <method name="get_animation" qualifiers="const">
+ <return type="Animation">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Get an [Animation] resource by requesting a name.
+ </description>
+ </method>
+ <method name="get_animation_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Get the list of names of the animations stored in the player.
+ </description>
+ </method>
+ <method name="get_animation_process_mode" qualifiers="const">
+ <return type="int" enum="AnimationPlayer.AnimationProcessMode">
+ </return>
+ <description>
+ Return the mode in which the animation player processes. See [method set_animation_process_mode].
+ </description>
+ </method>
+ <method name="get_autoplay" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the animation that will be automatically played when the scene is loaded.
+ </description>
+ </method>
+ <method name="get_blend_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="anim_from" type="String">
+ </argument>
+ <argument index="1" name="anim_to" type="String">
+ </argument>
+ <description>
+ Get the blend time between two animations, referenced by their names.
+ </description>
+ </method>
+ <method name="get_current_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the animation being played.
+ </description>
+ </method>
+ <method name="get_current_animation_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the length (in seconds) of the currently being played animation.
+ </description>
+ </method>
+ <method name="get_current_animation_pos" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the position (in seconds) of the currently being played animation.
+ </description>
+ </method>
+ <method name="get_default_blend_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the default blend time between animations.
+ </description>
+ </method>
+ <method name="get_pos" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided).
+ </description>
+ </method>
+ <method name="get_root" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Return path to root node (see [method set_root]).
+ </description>
+ </method>
+ <method name="get_speed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
+ </description>
+ </method>
+ <method name="has_animation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Request whether an [Animation] name exist within the player.
+ </description>
+ </method>
+ <method name="is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the player is active.
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether an animation is playing.
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="1" name="custom_blend" type="float" default="-1">
+ </argument>
+ <argument index="2" name="custom_speed" type="float" default="1.0">
+ </argument>
+ <argument index="3" name="from_end" type="bool" default="false">
+ </argument>
+ <description>
+ Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
+ </description>
+ </method>
+ <method name="play_backwards">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="1" name="custom_blend" type="float" default="-1">
+ </argument>
+ <description>
+ Play a given animation by the animation name in reverse.
+ </description>
+ </method>
+ <method name="queue">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Queue an animation for playback once the current one is done.
+ </description>
+ </method>
+ <method name="remove_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Remove an animation from the player (by supplying the same name used to add it).
+ </description>
+ </method>
+ <method name="rename_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="newname" type="String">
+ </argument>
+ <description>
+ Rename an existing animation.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos_sec" type="float">
+ </argument>
+ <argument index="1" name="update" type="bool" default="false">
+ </argument>
+ <description>
+ Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ Set the player as active (playing). If false, it will do nothing.
+ </description>
+ </method>
+ <method name="set_animation_process_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AnimationPlayer.AnimationProcessMode">
+ </argument>
+ <description>
+ Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the animation that will be automatically played when the scene is loaded.
+ </description>
+ </method>
+ <method name="set_blend_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim_from" type="String">
+ </argument>
+ <argument index="1" name="anim_to" type="String">
+ </argument>
+ <argument index="2" name="sec" type="float">
+ </argument>
+ <description>
+ Specify a blend time (in seconds) between two animations, referenced by their names.
+ </description>
+ </method>
+ <method name="set_current_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play().
+ </description>
+ </method>
+ <method name="set_default_blend_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="sec" type="float">
+ </argument>
+ <description>
+ Set the default blend time between animations.
+ </description>
+ </method>
+ <method name="set_root">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed.
+ </description>
+ </method>
+ <method name="set_speed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="float">
+ </argument>
+ <description>
+ Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling).
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <argument index="0" name="reset" type="bool" default="true">
+ </argument>
+ <description>
+ Stop the currently playing animation.
+ </description>
+ </method>
+ <method name="stop_all">
+ <return type="void">
+ </return>
+ <description>
+ Stop playback of animations (deprecated).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time">
+ </member>
+ <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode">
+ </member>
+ <member name="root_node" type="NodePath" setter="set_root" getter="get_root">
+ </member>
+ </members>
+ <signals>
+ <signal name="animation_changed">
+ <argument index="0" name="old_name" type="String">
+ </argument>
+ <argument index="1" name="new_name" type="String">
+ </argument>
+ <description>
+ If the currently being played animation changes, this signal will notify of such change.
+ </description>
+ </signal>
+ <signal name="animation_finished">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Notifies when an animation finished playing.
+ </description>
+ </signal>
+ <signal name="animation_started">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Notifies when an animation starts playing.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ANIMATION_PROCESS_FIXED" value="0">
+ Process animation on fixed process. This is specially useful when animating kinematic bodies.
+ </constant>
+ <constant name="ANIMATION_PROCESS_IDLE" value="1">
+ Process animation on idle process.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
new file mode 100644
index 0000000000..e128b4d865
--- /dev/null
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -0,0 +1,667 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Animation Player that uses a node graph for the blending.
+ </brief_description>
+ <description>
+ Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
+ </argument>
+ <argument index="1" name="id" type="String">
+ </argument>
+ <description>
+ Add a node of a given type in the graph with given id.
+ </description>
+ </method>
+ <method name="advance">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="animation_node_get_animation" qualifiers="const">
+ <return type="Animation">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns an animation given its name.
+ </description>
+ </method>
+ <method name="animation_node_get_master_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="animation_node_set_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="animation" type="Animation">
+ </argument>
+ <description>
+ Set the animation for an animation node.
+ </description>
+ </method>
+ <method name="animation_node_set_filter_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="path" type="NodePath">
+ </argument>
+ <argument index="2" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="animation_node_set_master_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="source" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="are_nodes_connected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="dst_id" type="String">
+ </argument>
+ <argument index="2" name="dst_input_idx" type="int">
+ </argument>
+ <description>
+ Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot.
+ </description>
+ </method>
+ <method name="blend2_node_get_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns the blend amount of a Blend2 node given its name.
+ </description>
+ </method>
+ <method name="blend2_node_set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="blend" type="float">
+ </argument>
+ <description>
+ Sets the blend amount of a Blend2 node given its name and value.
+ </description>
+ </method>
+ <method name="blend2_node_set_filter_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="path" type="NodePath">
+ </argument>
+ <argument index="2" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="blend3_node_get_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns the blend amount of a Blend3 node given its name.
+ </description>
+ </method>
+ <method name="blend3_node_set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="blend" type="float">
+ </argument>
+ <description>
+ Sets the blend amount of a Blend3 node given its name and value.
+ </description>
+ </method>
+ <method name="blend4_node_get_amount" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns the blend amount of a Blend4 node given its name.
+ </description>
+ </method>
+ <method name="blend4_node_set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="blend" type="Vector2">
+ </argument>
+ <description>
+ Sets the blend amount of a Blend4 node given its name and value.
+ </description>
+ </method>
+ <method name="connect_nodes">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="dst_id" type="String">
+ </argument>
+ <argument index="2" name="dst_input_idx" type="int">
+ </argument>
+ <description>
+ Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot.
+ </description>
+ </method>
+ <method name="disconnect_nodes">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="dst_input_idx" type="int">
+ </argument>
+ <description>
+ Disconnects nodes connected to [code]id[/code] at the specified input slot.
+ </description>
+ </method>
+ <method name="get_animation_process_mode" qualifiers="const">
+ <return type="int" enum="AnimationTreePlayer.AnimationProcessMode">
+ </return>
+ <description>
+ Returns playback process mode of this AnimationTreePlayer.
+ </description>
+ </method>
+ <method name="get_base_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_master_player" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_list">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Returns a PoolStringArray containing the name of all nodes.
+ </description>
+ </method>
+ <method name="is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this AnimationTreePlayer is active.
+ </description>
+ </method>
+ <method name="mix_node_get_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns mix amount of a Mix node given its name.
+ </description>
+ </method>
+ <method name="mix_node_set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="ratio" type="float">
+ </argument>
+ <description>
+ Sets mix amount of a Mix node given its name and value.
+ </description>
+ </method>
+ <method name="node_exists" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="node" type="String">
+ </argument>
+ <description>
+ Check if a node exists (by name).
+ </description>
+ </method>
+ <method name="node_get_input_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Return the input count for a given node. Different types of nodes have different amount of inputs.
+ </description>
+ </method>
+ <method name="node_get_input_source" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ Return the input source for a given node input.
+ </description>
+ </method>
+ <method name="node_get_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns position of a node in the graph given its name.
+ </description>
+ </method>
+ <method name="node_get_type" qualifiers="const">
+ <return type="int" enum="AnimationTreePlayer.NodeType">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Get the node type, will return from NODE_* enum.
+ </description>
+ </method>
+ <method name="node_rename">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="node" type="String">
+ </argument>
+ <argument index="1" name="new_name" type="String">
+ </argument>
+ <description>
+ Rename a node in the graph.
+ </description>
+ </method>
+ <method name="node_set_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="screen_pos" type="Vector2">
+ </argument>
+ <description>
+ Sets position of a node in the graph given its name and position.
+ </description>
+ </method>
+ <method name="oneshot_node_get_autorestart_delay" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns autostart delay of a OneShot node given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns autostart random delay of a OneShot node given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_get_fadein_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns fade in time of a OneShot node given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_get_fadeout_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns fade out time of a OneShot node given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_has_autorestart" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns whether a OneShot node will auto restart given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns whether a OneShot node is active given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_set_autorestart">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ Sets autorestart property of a OneShot node given its name and value.
+ </description>
+ </method>
+ <method name="oneshot_node_set_autorestart_delay">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="delay_sec" type="float">
+ </argument>
+ <description>
+ Sets autorestart delay of a OneShot node given its name and value in seconds.
+ </description>
+ </method>
+ <method name="oneshot_node_set_autorestart_random_delay">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="rand_sec" type="float">
+ </argument>
+ <description>
+ Sets autorestart random delay of a OneShot node given its name and value in seconds.
+ </description>
+ </method>
+ <method name="oneshot_node_set_fadein_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <description>
+ Sets fade in time of a OneShot node given its name and value in seconds.
+ </description>
+ </method>
+ <method name="oneshot_node_set_fadeout_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <description>
+ Sets fade out time of a OneShot node given its name and value in seconds.
+ </description>
+ </method>
+ <method name="oneshot_node_set_filter_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="path" type="NodePath">
+ </argument>
+ <argument index="2" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="oneshot_node_start">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Starts a OneShot node given its name.
+ </description>
+ </method>
+ <method name="oneshot_node_stop">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Stops a OneShot node given its name.
+ </description>
+ </method>
+ <method name="recompute_caches">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reset">
+ <return type="void">
+ </return>
+ <description>
+ Resets this AnimationTreePlayer.
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Sets whether this AnimationTreePlayer is active. AnimationTreePlayer will start processing if set to active.
+ </description>
+ </method>
+ <method name="set_animation_process_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AnimationTreePlayer.AnimationProcessMode">
+ </argument>
+ <description>
+ Sets process mode (ANIMATION_PROCESS_*) of this AnimationTreePlayer.
+ </description>
+ </method>
+ <method name="set_base_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Sets base path of this AnimationTreePlayer.
+ </description>
+ </method>
+ <method name="set_master_player">
+ <return type="void">
+ </return>
+ <argument index="0" name="nodepath" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="timescale_node_get_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ Returns time scale value of a TimeScale node given its name.
+ </description>
+ </method>
+ <method name="timescale_node_set_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="scale" type="float">
+ </argument>
+ <description>
+ Sets time scale value of a TimeScale node given its name and value.
+ </description>
+ </method>
+ <method name="timeseek_node_seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="pos_sec" type="float">
+ </argument>
+ <description>
+ Sets time seek value of a TimeSeek node given its name and value.
+ </description>
+ </method>
+ <method name="transition_node_delete_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="input_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_get_current" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_get_input_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_get_xfade_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_has_input_auto_advance" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="input_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_set_current">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="input_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_set_input_auto_advance">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="input_idx" type="int">
+ </argument>
+ <argument index="2" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_set_input_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="transition_node_set_xfade_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="String">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode">
+ </member>
+ </members>
+ <constants>
+ <constant name="NODE_OUTPUT" value="0">
+ Output node.
+ </constant>
+ <constant name="NODE_ANIMATION" value="1">
+ Animation node.
+ </constant>
+ <constant name="NODE_ONESHOT" value="2">
+ OneShot node.
+ </constant>
+ <constant name="NODE_MIX" value="3">
+ Mix node.
+ </constant>
+ <constant name="NODE_BLEND2" value="4">
+ Blend2 node.
+ </constant>
+ <constant name="NODE_BLEND3" value="5">
+ Blend3 node.
+ </constant>
+ <constant name="NODE_BLEND4" value="6">
+ Blend4 node.
+ </constant>
+ <constant name="NODE_TIMESCALE" value="7">
+ TimeScale node.
+ </constant>
+ <constant name="NODE_TIMESEEK" value="8">
+ TimeSeek node.
+ </constant>
+ <constant name="NODE_TRANSITION" value="9">
+ Transition node.
+ </constant>
+ <constant name="ANIMATION_PROCESS_FIXED" value="0">
+ </constant>
+ <constant name="ANIMATION_PROCESS_IDLE" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
new file mode 100644
index 0000000000..c59bbee084
--- /dev/null
+++ b/doc/classes/Area.xml
@@ -0,0 +1,507 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Area" inherits="CollisionObject" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ General purpose area detection and influence for 3D physics.
+ </brief_description>
+ <description>
+ General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the angular damp rate.
+ </description>
+ </method>
+ <method name="get_audio_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layer this area is in.
+ </description>
+ </method>
+ <method name="get_collision_layer_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the layer mask.
+ </description>
+ </method>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layers this area can scan for collisions.
+ </description>
+ </method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the collision mask.
+ </description>
+ </method>
+ <method name="get_gravity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the gravity intensity.
+ </description>
+ </method>
+ <method name="get_gravity_distance_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the falloff factor for point gravity.
+ </description>
+ </method>
+ <method name="get_gravity_vector" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ </description>
+ </method>
+ <method name="get_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the linear damp rate.
+ </description>
+ </method>
+ <method name="get_overlapping_areas" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return a list of the areas that are totally or partially inside this area.
+ </description>
+ </method>
+ <method name="get_overlapping_bodies" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area.
+ </description>
+ </method>
+ <method name="get_priority" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the processing order of this area.
+ </description>
+ </method>
+ <method name="get_reverb_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_reverb_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_reverb_uniformity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_space_override_mode" qualifiers="const">
+ <return type="int" enum="Area.SpaceOverride">
+ </return>
+ <description>
+ Return the space override mode.
+ </description>
+ </method>
+ <method name="is_gravity_a_point" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
+ </description>
+ </method>
+ <method name="is_monitorable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this area can be detected by other, monitoring, areas.
+ </description>
+ </method>
+ <method name="is_monitoring" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this area detects bodies/areas entering/exiting it.
+ </description>
+ </method>
+ <method name="is_overriding_audio_bus" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_using_reverb_bus" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="overlaps_area" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="area" type="Node">
+ </argument>
+ <description>
+ Return whether the area passed is totally or partially inside this area.
+ </description>
+ </method>
+ <method name="overlaps_body" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Return whether the body passed is totally or partially inside this area.
+ </description>
+ </method>
+ <method name="set_angular_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_damp" type="float">
+ </argument>
+ <description>
+ Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ </description>
+ </method>
+ <method name="set_audio_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_audio_bus_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_layer" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ </description>
+ </method>
+ <method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_mask" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area can scan for collisions.
+ </description>
+ </method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ </description>
+ </method>
+ <method name="set_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="gravity" type="float">
+ </argument>
+ <description>
+ Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ </description>
+ </method>
+ <method name="set_gravity_distance_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance_scale" type="float">
+ </argument>
+ <description>
+ Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ </description>
+ </method>
+ <method name="set_gravity_is_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
+ </description>
+ </method>
+ <method name="set_gravity_vector">
+ <return type="void">
+ </return>
+ <argument index="0" name="vector" type="Vector3">
+ </argument>
+ <description>
+ Set the gravity vector. This vector does not have to be normalized.
+ If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ </description>
+ </method>
+ <method name="set_linear_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_damp" type="float">
+ </argument>
+ <description>
+ Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ </description>
+ </method>
+ <method name="set_monitorable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
+ </description>
+ </method>
+ <method name="set_monitoring">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether this area can detect bodies/areas entering/exiting it.
+ </description>
+ </method>
+ <method name="set_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="priority" type="float">
+ </argument>
+ <description>
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
+ </description>
+ </method>
+ <method name="set_reverb_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_reverb_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_reverb_uniformity">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_space_override_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="int" enum="Area.SpaceOverride">
+ </argument>
+ <description>
+ Set the space override mode. This mode controls how an area affects gravity and damp.
+ AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ </description>
+ </method>
+ <method name="set_use_reverb_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ </member>
+ <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus">
+ </member>
+ <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus">
+ </member>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ </member>
+ <member name="gravity" type="float" setter="set_gravity" getter="get_gravity">
+ </member>
+ <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale">
+ </member>
+ <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
+ </member>
+ <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector">
+ </member>
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ </member>
+ <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable">
+ </member>
+ <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring">
+ </member>
+ <member name="priority" type="float" setter="set_priority" getter="get_priority">
+ </member>
+ <member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount">
+ </member>
+ <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus">
+ </member>
+ <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus">
+ </member>
+ <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity">
+ </member>
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride">
+ </member>
+ </members>
+ <signals>
+ <signal name="area_entered">
+ <argument index="0" name="area" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ </description>
+ </signal>
+ <signal name="area_exited">
+ <argument index="0" name="area" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ </description>
+ </signal>
+ <signal name="area_shape_entered">
+ <argument index="0" name="area_id" type="int">
+ </argument>
+ <argument index="1" name="area" type="Object">
+ </argument>
+ <argument index="2" name="area_shape" type="int">
+ </argument>
+ <argument index="3" name="self_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="area_shape_exited">
+ <argument index="0" name="area_id" type="int">
+ </argument>
+ <argument index="1" name="area" type="Object">
+ </argument>
+ <argument index="2" name="area_shape" type="int">
+ </argument>
+ <argument index="3" name="self_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="body_entered">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ </description>
+ </signal>
+ <signal name="body_exited">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ </description>
+ </signal>
+ <signal name="body_shape_entered">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="area_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="body_shape_exited">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="area_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="SPACE_OVERRIDE_DISABLED" value="0">
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE" value="1">
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE" value="3">
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
new file mode 100644
index 0000000000..e093b5cb49
--- /dev/null
+++ b/doc/classes/Area2D.xml
@@ -0,0 +1,465 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range.
+ </brief_description>
+ <description>
+ 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the angular damp rate.
+ </description>
+ </method>
+ <method name="get_audio_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layer this area is in.
+ </description>
+ </method>
+ <method name="get_collision_layer_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer.
+ </description>
+ </method>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layers this area will scan to determine collisions.
+ </description>
+ </method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer.
+ </description>
+ </method>
+ <method name="get_gravity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the gravity intensity.
+ </description>
+ </method>
+ <method name="get_gravity_distance_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the falloff factor for point gravity.
+ </description>
+ </method>
+ <method name="get_gravity_vector" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ </description>
+ </method>
+ <method name="get_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the linear damp rate.
+ </description>
+ </method>
+ <method name="get_overlapping_areas" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns a list of the [Area2D]s that intersect with this area.
+ </description>
+ </method>
+ <method name="get_overlapping_bodies" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return a list of the [PhysicsBody2D]s that intersect with this area.
+ </description>
+ </method>
+ <method name="get_priority" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the processing order of this area.
+ </description>
+ </method>
+ <method name="get_space_override_mode" qualifiers="const">
+ <return type="int" enum="Area2D.SpaceOverride">
+ </return>
+ <description>
+ Return the space override mode.
+ </description>
+ </method>
+ <method name="is_gravity_a_point" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
+ </description>
+ </method>
+ <method name="is_monitorable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this area can be detected by other, monitoring, areas.
+ </description>
+ </method>
+ <method name="is_monitoring" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this area detects bodies/areas entering/exiting it.
+ </description>
+ </method>
+ <method name="is_overriding_audio_bus" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="overlaps_area" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="area" type="Node">
+ </argument>
+ <description>
+ Return whether the area passed is totally or partially inside this area.
+ </description>
+ </method>
+ <method name="overlaps_body" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Return whether the body passed is totally or partially inside this area.
+ </description>
+ </method>
+ <method name="set_angular_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_damp" type="float">
+ </argument>
+ <description>
+ Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ </description>
+ </method>
+ <method name="set_audio_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_audio_bus_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_layer" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ </description>
+ </method>
+ <method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_mask" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area can scan for collisions.
+ </description>
+ </method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ </description>
+ </method>
+ <method name="set_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="gravity" type="float">
+ </argument>
+ <description>
+ Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ </description>
+ </method>
+ <method name="set_gravity_distance_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance_scale" type="float">
+ </argument>
+ <description>
+ Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ </description>
+ </method>
+ <method name="set_gravity_is_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector].
+ </description>
+ </method>
+ <method name="set_gravity_vector">
+ <return type="void">
+ </return>
+ <argument index="0" name="vector" type="Vector2">
+ </argument>
+ <description>
+ Set the gravity vector. This vector does not have to be normalized.
+ If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ </description>
+ </method>
+ <method name="set_linear_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_damp" type="float">
+ </argument>
+ <description>
+ Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
+ In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
+ </description>
+ </method>
+ <method name="set_monitorable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
+ </description>
+ </method>
+ <method name="set_monitoring">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether this area can detect bodies/areas entering/exiting it.
+ </description>
+ </method>
+ <method name="set_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="priority" type="float">
+ </argument>
+ <description>
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
+ </description>
+ </method>
+ <method name="set_space_override_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="space_override_mode" type="int" enum="Area2D.SpaceOverride">
+ </argument>
+ <description>
+ Set the space override mode. This mode controls how an area affects gravity and damp.
+ AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
+ </member>
+ <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus">
+ The name of the Area2D's audio bus.
+ </member>
+ <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus">
+ If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code].
+ </member>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The physics layer this Area2D is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this Area2D scans to determine collision detections.
+ </member>
+ <member name="gravity" type="float" setter="set_gravity" getter="get_gravity">
+ The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ </member>
+ <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale">
+ The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ </member>
+ <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
+ If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code].
+ </member>
+ <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector">
+ The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ </member>
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
+ </member>
+ <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable">
+ If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code].
+ </member>
+ <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring">
+ If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code].
+ </member>
+ <member name="priority" type="float" setter="set_priority" getter="get_priority">
+ The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first.
+ </member>
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride">
+ How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options.
+ </member>
+ </members>
+ <signals>
+ <signal name="area_entered">
+ <argument index="0" name="area" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ </description>
+ </signal>
+ <signal name="area_exited">
+ <argument index="0" name="area" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ </description>
+ </signal>
+ <signal name="area_shape_entered">
+ <argument index="0" name="area_id" type="int">
+ </argument>
+ <argument index="1" name="area" type="Object">
+ </argument>
+ <argument index="2" name="area_shape" type="int">
+ </argument>
+ <argument index="3" name="self_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="area_shape_exited">
+ <argument index="0" name="area_id" type="int">
+ </argument>
+ <argument index="1" name="area" type="Object">
+ </argument>
+ <argument index="2" name="area_shape" type="int">
+ </argument>
+ <argument index="3" name="self_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="body_entered">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ </description>
+ </signal>
+ <signal name="body_exited">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ </description>
+ </signal>
+ <signal name="body_shape_entered">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="area_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ </description>
+ </signal>
+ <signal name="body_shape_exited">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="area_shape" type="int">
+ </argument>
+ <description>
+ This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="SPACE_OVERRIDE_DISABLED" value="0">
+ This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them.
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE" value="1">
+ This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE" value="3">
+ This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
new file mode 100644
index 0000000000..042dfb3e12
--- /dev/null
+++ b/doc/classes/Array.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Array" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generic array datatype.
+ </brief_description>
+ <description>
+ Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolColorArray">
+ </argument>
+ <description>
+ Construct an array from a [PoolColorArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolVector3Array">
+ </argument>
+ <description>
+ Construct an array from a [PoolVector3Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolVector2Array">
+ </argument>
+ <description>
+ Construct an array from a [PoolVector2Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolStringArray">
+ </argument>
+ <description>
+ Construct an array from a [PoolStringArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolRealArray">
+ </argument>
+ <description>
+ Construct an array from a [PoolRealArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolIntArray">
+ </argument>
+ <description>
+ Construct an array from a [PoolIntArray].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PoolByteArray">
+ </argument>
+ <description>
+ Construct an array from a [PoolByteArray].
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="back">
+ <description>
+ Returns the last element of the array if the array is not empty (size&gt;0).
+ </description>
+ </method>
+ <method name="clear">
+ <description>
+ Clear the array (resize to 0).
+ </description>
+ </method>
+ <method name="count">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Return the amount of times an element is in the array.
+ </description>
+ </method>
+ <method name="duplicate">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the array is empty (size==0).
+ </description>
+ </method>
+ <method name="erase">
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Remove the first occurrence of a value from the array.
+ </description>
+ </method>
+ <method name="find">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="var">
+ </argument>
+ <argument index="1" name="from" type="int" default="0">
+ </argument>
+ <description>
+ Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
+ <method name="find_last">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Searches the array in reverse order for a value and returns its index or -1 if not found.
+ </description>
+ </method>
+ <method name="front">
+ <description>
+ Returns the first element of the array if the array is not empty (size&gt;0).
+ </description>
+ </method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Return true if the array contains given value.
+ [codeblock]
+ [ "inside", 7 ].has("inside") == true
+ [ "inside", 7 ].has("outside") == false
+ [ "inside", 7 ].has(7) == true
+ [ "inside", 7 ].has("7") == false
+ [/codeblock]
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <description>
+ Return a hashed integer value representing the array contents.
+ </description>
+ </method>
+ <method name="insert">
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <argument index="1" name="value" type="var">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="pop_back">
+ <description>
+ Remove the last element of the array.
+ </description>
+ </method>
+ <method name="pop_front">
+ <description>
+ Remove the first element of the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Append an element at the end of the array.
+ </description>
+ </method>
+ <method name="push_front">
+ <argument index="0" name="value" type="var">
+ </argument>
+ <description>
+ Add an element at the beginning of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
+ </description>
+ </method>
+ <method name="rfind">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="var">
+ </argument>
+ <argument index="1" name="from" type="int" default="-1">
+ </argument>
+ <description>
+ Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of elements in the array.
+ </description>
+ </method>
+ <method name="sort">
+ <description>
+ Sort the array using natural order.
+ </description>
+ </method>
+ <method name="sort_custom">
+ <argument index="0" name="obj" type="Object">
+ </argument>
+ <argument index="1" name="func" type="String">
+ </argument>
+ <description>
+ Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
new file mode 100644
index 0000000000..36f8494c44
--- /dev/null
+++ b/doc/classes/ArrayMesh.xml
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_blend_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_surface_from_arrays">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <argument index="1" name="arrays" type="Array">
+ </argument>
+ <argument index="2" name="blend_shapes" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="compress_flags" type="int" default="97792">
+ </argument>
+ <description>
+ Create a new surface ([method get_surface_count] that will become surf_idx for this.
+ Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
+ </description>
+ </method>
+ <method name="center_geometry">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_blend_shapes">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_mode" qualifiers="const">
+ <return type="int" enum="Mesh.BlendShapeMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of surfaces that the [ArrayMesh] holds.
+ </description>
+ </method>
+ <method name="regen_normalmaps">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_shape_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_aabb">
+ <return type="void">
+ </return>
+ <argument index="0" name="aabb" type="Rect3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_get_array_index_len" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return the length in indices of the index array in the requested surface (see [method add_surface]).
+ </description>
+ </method>
+ <method name="surface_get_array_len" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
+ </description>
+ </method>
+ <method name="surface_get_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_get_blend_shape_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_get_format" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return the format mask of the requested surface (see [method add_surface]).
+ </description>
+ </method>
+ <method name="surface_get_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return a [Material] in a given surface. Surface is rendered using this material.
+ </description>
+ </method>
+ <method name="surface_get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_get_primitive_type" qualifiers="const">
+ <return type="int" enum="Mesh.PrimitiveType">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Return the primitive type of the requested surface (see [method add_surface]).
+ </description>
+ </method>
+ <method name="surface_remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <description>
+ Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
+ </description>
+ </method>
+ <method name="surface_set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <argument index="1" name="material" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="surface_set_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="surf_idx" type="int">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ Set a [Material] for a given surface. Surface will be rendered using this material.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="NO_INDEX_ARRAY" value="-1" enum="">
+ Default value used for index_array_len when no indices are present.
+ </constant>
+ <constant name="ARRAY_WEIGHTS_SIZE" value="4" enum="">
+ Amount of weights/bone indices per vertex (always 4).
+ </constant>
+ <constant name="ARRAY_VERTEX" value="0">
+ Vertex array (array of [Vector3] vertices).
+ </constant>
+ <constant name="ARRAY_NORMAL" value="1">
+ Normal array (array of [Vector3] normals).
+ </constant>
+ <constant name="ARRAY_TANGENT" value="2">
+ Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
+ </constant>
+ <constant name="ARRAY_COLOR" value="3">
+ Vertex array (array of [Color] colors).
+ </constant>
+ <constant name="ARRAY_TEX_UV" value="4">
+ UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
+ </constant>
+ <constant name="ARRAY_TEX_UV2" value="5">
+ Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
+ </constant>
+ <constant name="ARRAY_BONES" value="6">
+ Array of bone indices, as a float array. Each element in groups of 4 floats.
+ </constant>
+ <constant name="ARRAY_WEIGHTS" value="7">
+ Array of bone weights, as a float array. Each element in groups of 4 floats.
+ </constant>
+ <constant name="ARRAY_INDEX" value="8">
+ Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
+ </constant>
+ <constant name="ARRAY_MAX" value="9">
+ </constant>
+ <constant name="ARRAY_FORMAT_VERTEX" value="1">
+ Array format will include vertices (mandatory).
+ </constant>
+ <constant name="ARRAY_FORMAT_NORMAL" value="2">
+ Array format will include normals
+ </constant>
+ <constant name="ARRAY_FORMAT_TANGENT" value="4">
+ Array format will include tangents
+ </constant>
+ <constant name="ARRAY_FORMAT_COLOR" value="8">
+ Array format will include a color array.
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV" value="16">
+ Array format will include UVs.
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
+ Array format will include another set of UVs.
+ </constant>
+ <constant name="ARRAY_FORMAT_BONES" value="64">
+ Array format will include bone indices.
+ </constant>
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
+ Array format will include bone weights.
+ </constant>
+ <constant name="ARRAY_FORMAT_INDEX" value="256">
+ Index array will be used.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
new file mode 100644
index 0000000000..179f78f16f
--- /dev/null
+++ b/doc/classes/AtlasTexture.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AtlasTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
+ </brief_description>
+ <description>
+ [Texture] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture], a margin that defines the border width,
+ and a region that defines the actual area of the AtlasTexture.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_atlas" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_margin" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_region" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_atlas">
+ <return type="void">
+ </return>
+ <argument index="0" name="atlas" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas">
+ The texture that contains the atlas. Can be any [Texture] subtype.
+ </member>
+ <member name="margin" type="Rect2" setter="set_margin" getter="get_margin">
+ The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
+ </member>
+ <member name="region" type="Rect2" setter="set_region" getter="get_region">
+ The AtlasTexture's used region.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
new file mode 100644
index 0000000000..e5b17b8dfb
--- /dev/null
+++ b/doc/classes/AudioBusLayout.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
new file mode 100644
index 0000000000..627d243f25
--- /dev/null
+++ b/doc/classes/AudioEffect.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffect" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Audio Effect For Audio.
+ </brief_description>
+ <description>
+ Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
new file mode 100644
index 0000000000..8497042b53
--- /dev/null
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Amplifies the volume of an audio source.
+ </brief_description>
+ <description>
+ Amplifies the volume of an audio source. Increase gain of the audio being routed through the bus.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_volume_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the set maximum volume.
+ </description>
+ </method>
+ <method name="set_volume_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="volume" type="float">
+ </argument>
+ <description>
+ Sets the maximum volume.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ The effect's volume limit.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
new file mode 100644
index 0000000000..96f95fbffd
--- /dev/null
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
new file mode 100644
index 0000000000..4437961cc6
--- /dev/null
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
new file mode 100644
index 0000000000..b9f27678ec
--- /dev/null
+++ b/doc/classes/AudioEffectChorus.xml
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Adds a chorus audio effect.
+ </brief_description>
+ <description>
+ Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_dry" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the set dry ratio.
+ </description>
+ </method>
+ <method name="get_voice_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the set voice count.
+ </description>
+ </method>
+ <method name="get_voice_cutoff_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice's set cutoff frequency.
+ </description>
+ </method>
+ <method name="get_voice_delay_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice's set delay.
+ </description>
+ </method>
+ <method name="get_voice_depth_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice's set filter depth.
+ </description>
+ </method>
+ <method name="get_voice_level_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice's set maximum volume.
+ </description>
+ </method>
+ <method name="get_voice_pan" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice's set pan.
+ </description>
+ </method>
+ <method name="get_voice_rate_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <description>
+ Returns the voice filter's set rate in cycles.
+ </description>
+ </method>
+ <method name="get_wet" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the set applied wetness of the effect.
+ </description>
+ </method>
+ <method name="set_dry">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ Returns the set applied dryness of the effect.
+ </description>
+ </method>
+ <method name="set_voice_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="voices" type="int">
+ </argument>
+ <description>
+ Set the number of voices in the effect's filter.
+ </description>
+ </method>
+ <method name="set_voice_cutoff_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="cutoff_hz" type="float">
+ </argument>
+ <description>
+ Set the cutoff frequency of the voice. The maximum frequency the voice may affect.
+ </description>
+ </method>
+ <method name="set_voice_delay_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="delay_ms" type="float">
+ </argument>
+ <description>
+ Set the delay of the voice's signal.
+ </description>
+ </method>
+ <method name="set_voice_depth_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="depth_ms" type="float">
+ </argument>
+ <description>
+ Set the filter depth of the voice's signal.
+ </description>
+ </method>
+ <method name="set_voice_level_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="level_db" type="float">
+ </argument>
+ <description>
+ Set the volume level of the voice.
+ </description>
+ </method>
+ <method name="set_voice_pan">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="pan" type="float">
+ </argument>
+ <description>
+ Set the pan level of the voice.
+ </description>
+ </method>
+ <method name="set_voice_rate_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="voice_idx" type="int">
+ </argument>
+ <argument index="1" name="rate_hz" type="float">
+ </argument>
+ <description>
+ Set the voice filter's rate.
+ </description>
+ </method>
+ <method name="set_wet">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ Set the amount of effect.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="dry" type="float" setter="set_dry" getter="get_dry">
+ The effect's raw signal.
+ </member>
+ <member name="voice/1/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
+ The voice's cutoff frequency.
+ </member>
+ <member name="voice/1/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
+ The voice's signal delay.
+ </member>
+ <member name="voice/1/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
+ The voice filter's depth.
+ </member>
+ <member name="voice/1/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
+ The voice's volume.
+ </member>
+ <member name="voice/1/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
+ The voice's pan level.
+ </member>
+ <member name="voice/1/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
+ The voice's filter rate.
+ </member>
+ <member name="voice/2/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
+ The voice's cutoff frequency.
+ </member>
+ <member name="voice/2/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
+ The voice's signal delay.
+ </member>
+ <member name="voice/2/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
+ The voice filter's depth.
+ </member>
+ <member name="voice/2/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
+ The voice's volume.
+ </member>
+ <member name="voice/2/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
+ The voice's pan level.
+ </member>
+ <member name="voice/2/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
+ The voice's filter rate.
+ </member>
+ <member name="voice/3/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
+ The voice's cutoff frequency.
+ </member>
+ <member name="voice/3/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
+ The voice's signal delay.
+ </member>
+ <member name="voice/3/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
+ The voice filter's depth.
+ </member>
+ <member name="voice/3/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
+ The voice's volume.
+ </member>
+ <member name="voice/3/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
+ The voice's pan level.
+ </member>
+ <member name="voice/3/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
+ The voice's filter rate.
+ </member>
+ <member name="voice/4/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
+ The voice's cutoff frequency.
+ </member>
+ <member name="voice/4/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
+ The voice's signal delay.
+ </member>
+ <member name="voice/4/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
+ The voice filter's depth.
+ </member>
+ <member name="voice/4/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
+ The voice's volume.
+ </member>
+ <member name="voice/4/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
+ The voice's pan level.
+ </member>
+ <member name="voice/4/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
+ The voice's filter rate.
+ </member>
+ <member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count">
+ The amount of voices in the effect.
+ </member>
+ <member name="wet" type="float" setter="set_wet" getter="get_wet">
+ The effect's processed signal.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
new file mode 100644
index 0000000000..5a7a91ede0
--- /dev/null
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_attack_us" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_gain" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mix" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_release_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sidechain" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_threshold" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_attack_us">
+ <return type="void">
+ </return>
+ <argument index="0" name="attack_us" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_gain">
+ <return type="void">
+ </return>
+ <argument index="0" name="gain" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mix">
+ <return type="void">
+ </return>
+ <argument index="0" name="mix" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_release_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="release_ms" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sidechain">
+ <return type="void">
+ </return>
+ <argument index="0" name="sidechain" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_threshold">
+ <return type="void">
+ </return>
+ <argument index="0" name="threshold" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us">
+ </member>
+ <member name="gain" type="float" setter="set_gain" getter="get_gain">
+ </member>
+ <member name="mix" type="float" setter="set_mix" getter="get_mix">
+ </member>
+ <member name="ratio" type="float" setter="set_ratio" getter="get_ratio">
+ </member>
+ <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms">
+ </member>
+ <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain">
+ </member>
+ <member name="threshold" type="float" setter="set_threshold" getter="get_threshold">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
new file mode 100644
index 0000000000..8d317b3c46
--- /dev/null
+++ b/doc/classes/AudioEffectDelay.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_dry">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_feedback_delay_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_feedback_level_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_feedback_lowpass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap1_delay_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap1_level_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap1_pan" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap2_delay_ms" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap2_level_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tap2_pan" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_feedback_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_tap1_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_tap2_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_dry">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feedback_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feedback_delay_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feedback_level_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feedback_lowpass">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap1_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap1_delay_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap1_level_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap1_pan">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap2_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap2_delay_ms">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap2_level_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tap2_pan">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="dry" type="float" setter="set_dry" getter="get_dry">
+ </member>
+ <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active">
+ </member>
+ <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms">
+ </member>
+ <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db">
+ </member>
+ <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass">
+ </member>
+ <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active">
+ </member>
+ <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms">
+ </member>
+ <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db">
+ </member>
+ <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan">
+ </member>
+ <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active">
+ </member>
+ <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms">
+ </member>
+ <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db">
+ </member>
+ <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
new file mode 100644
index 0000000000..e5c5a3b50e
--- /dev/null
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_drive" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_keep_hf_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="AudioEffectDistortion.Mode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_post_gain" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pre_gain" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_drive">
+ <return type="void">
+ </return>
+ <argument index="0" name="drive" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_keep_hf_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="keep_hf_hz" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioEffectDistortion.Mode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_post_gain">
+ <return type="void">
+ </return>
+ <argument index="0" name="post_gain" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pre_gain">
+ <return type="void">
+ </return>
+ <argument index="0" name="pre_gain" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="drive" type="float" setter="set_drive" getter="get_drive">
+ </member>
+ <member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz">
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="AudioEffectDistortion.Mode">
+ </member>
+ <member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain">
+ </member>
+ <member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain">
+ </member>
+ </members>
+ <constants>
+ <constant name="MODE_CLIP" value="0">
+ </constant>
+ <constant name="MODE_ATAN" value="1">
+ </constant>
+ <constant name="MODE_LOFI" value="2">
+ </constant>
+ <constant name="MODE_OVERDRIVE" value="3">
+ </constant>
+ <constant name="MODE_WAVESHAPE" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
new file mode 100644
index 0000000000..94d5c696c3
--- /dev/null
+++ b/doc/classes/AudioEffectEQ.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_band_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_band_gain_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="band_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_band_gain_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="band_idx" type="int">
+ </argument>
+ <argument index="1" name="volume_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
new file mode 100644
index 0000000000..004236dfde
--- /dev/null
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
new file mode 100644
index 0000000000..e4faa9bb0c
--- /dev/null
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
new file mode 100644
index 0000000000..b74cc5d285
--- /dev/null
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
new file mode 100644
index 0000000000..17aa01d60a
--- /dev/null
+++ b/doc/classes/AudioEffectFilter.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cutoff" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_db" qualifiers="const">
+ <return type="int" enum="AudioEffectFilter.FilterDB">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_gain" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resonance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_cutoff">
+ <return type="void">
+ </return>
+ <argument index="0" name="freq" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int" enum="AudioEffectFilter.FilterDB">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_gain">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_resonance">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff">
+ </member>
+ <member name="dB" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB">
+ </member>
+ <member name="gain" type="float" setter="set_gain" getter="get_gain">
+ </member>
+ <member name="resonance" type="float" setter="set_resonance" getter="get_resonance">
+ </member>
+ </members>
+ <constants>
+ <constant name="FILTER_6DB" value="0">
+ </constant>
+ <constant name="FILTER_12DB" value="1">
+ </constant>
+ <constant name="FILTER_18DB" value="2">
+ </constant>
+ <constant name="FILTER_24DB" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
new file mode 100644
index 0000000000..641f7cfee2
--- /dev/null
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
new file mode 100644
index 0000000000..a2504d6808
--- /dev/null
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
new file mode 100644
index 0000000000..e52fb57c70
--- /dev/null
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_ceiling_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_soft_clip_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_soft_clip_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_threshold_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_ceiling_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="ceiling" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_soft_clip_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="soft_clip" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_soft_clip_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="soft_clip" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_threshold_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="threshold" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db">
+ </member>
+ <member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db">
+ </member>
+ <member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio">
+ </member>
+ <member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
new file mode 100644
index 0000000000..fcaf32d761
--- /dev/null
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
new file mode 100644
index 0000000000..8cf1a63c81
--- /dev/null
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
new file mode 100644
index 0000000000..f90577fa5a
--- /dev/null
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
new file mode 100644
index 0000000000..b55d7f91c1
--- /dev/null
+++ b/doc/classes/AudioEffectPanner.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_pan" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_pan">
+ <return type="void">
+ </return>
+ <argument index="0" name="cpanume" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="pan" type="float" setter="set_pan" getter="get_pan">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
new file mode 100644
index 0000000000..7e9cd27a47
--- /dev/null
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_depth" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_feedback" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_range_max_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_range_min_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rate_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feedback">
+ <return type="void">
+ </return>
+ <argument index="0" name="fbk" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_range_max_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="hz" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_range_min_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="hz" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rate_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="hz" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="depth" type="float" setter="set_depth" getter="get_depth">
+ </member>
+ <member name="feedback" type="float" setter="set_feedback" getter="get_feedback">
+ </member>
+ <member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz">
+ </member>
+ <member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz">
+ </member>
+ <member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
new file mode 100644
index 0000000000..6fc3acdc20
--- /dev/null
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_pitch_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_pitch_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="rate" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
new file mode 100644
index 0000000000..b390fa239c
--- /dev/null
+++ b/doc/classes/AudioEffectReverb.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_damping" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dry" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_hpf" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_predelay_feedback" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_predelay_msec" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_room_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_spread" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_wet" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_damping">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dry">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_hpf">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_predelay_feedback">
+ <return type="void">
+ </return>
+ <argument index="0" name="feedback" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_predelay_msec">
+ <return type="void">
+ </return>
+ <argument index="0" name="msec" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_room_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_spread">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_wet">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping" type="float" setter="set_damping" getter="get_damping">
+ </member>
+ <member name="dry" type="float" setter="set_dry" getter="get_dry">
+ </member>
+ <member name="hipass" type="float" setter="set_hpf" getter="get_hpf">
+ </member>
+ <member name="predelay_feedback" type="float" setter="set_predelay_msec" getter="get_predelay_msec">
+ </member>
+ <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec">
+ </member>
+ <member name="room_size" type="float" setter="set_room_size" getter="get_room_size">
+ </member>
+ <member name="spread" type="float" setter="set_spread" getter="get_spread">
+ </member>
+ <member name="wet" type="float" setter="set_wet" getter="get_wet">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
new file mode 100644
index 0000000000..345d019d85
--- /dev/null
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_pan_pullout" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surround" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_time_pullout" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_pan_pullout">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_surround">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_time_pullout">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout">
+ </member>
+ <member name="surround" type="float" setter="set_surround" getter="get_surround">
+ </member>
+ <member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
new file mode 100644
index 0000000000..dc30c0c5f9
--- /dev/null
+++ b/doc/classes/AudioServer.xml
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Server interface for low level audio access.
+ </brief_description>
+ <description>
+ AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="at_pos" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_bus_effect">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect" type="AudioEffect">
+ </argument>
+ <argument index="2" name="at_pos" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="generate_bus_layout" qualifiers="const">
+ <return type="AudioBusLayout">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_effect">
+ <return type="AudioEffect">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_effect_count">
+ <return type="int">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="bus_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_peak_volume_left_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="channel" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_peak_volume_right_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="channel" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_send" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus_volume_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_mix_rate" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_speaker_mode" qualifiers="const">
+ <return type="int" enum="AudioServer.SpeakerMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_bus_bypassing_effects" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_bus_effect_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_bus_mute" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_bus_solo" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lock">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="to_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_bus_effect">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_bypass_effects">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_effect_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect_idx" type="int">
+ </argument>
+ <argument index="2" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_layout">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_layout" type="AudioBusLayout">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_mute">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_send">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="send" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_solo">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus_volume_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="volume_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="swap_bus_effects">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus_idx" type="int">
+ </argument>
+ <argument index="1" name="effect_idx" type="int">
+ </argument>
+ <argument index="2" name="by_effect_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unlock">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="bus_layout_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="SPEAKER_MODE_STEREO" value="0">
+ </constant>
+ <constant name="SPEAKER_SURROUND_51" value="2">
+ </constant>
+ <constant name="SPEAKER_SURROUND_71" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
new file mode 100644
index 0000000000..b4a98b2d8c
--- /dev/null
+++ b/doc/classes/AudioStream.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStream" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for audio streams.
+ </brief_description>
+ <description>
+ Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamOGGVorbis.xml b/doc/classes/AudioStreamOGGVorbis.xml
new file mode 100644
index 0000000000..679438b66b
--- /dev/null
+++ b/doc/classes/AudioStreamOGGVorbis.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ OGG Vorbis audio stream driver.
+ </brief_description>
+ <description>
+ OGG Vorbis audio stream driver.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_data" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_loop_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_loop" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_loop_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="seconds" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
+ Raw audio data.
+ </member>
+ <member name="loop" type="bool" setter="set_loop" getter="has_loop">
+ If [code]true[/code], audio will loop continuously. Default value: [code]false[/code].
+ </member>
+ <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset">
+ If loop is [code]true[/code], loop starts from this position, in seconds.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
new file mode 100644
index 0000000000..30a9a8f070
--- /dev/null
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
new file mode 100644
index 0000000000..edf5dd619b
--- /dev/null
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plays back audio.
+ </brief_description>
+ <description>
+ Plays background audio.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mix_target" qualifiers="const">
+ <return type="int" enum="AudioStreamPlayer.MixTarget">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pos">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_stream" qualifiers="const">
+ <return type="AudioStream">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_volume_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_autoplay_enabled">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
+ </argument>
+ <description>
+ Plays the audio from the given position 'from_pos', in seconds.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_pos" type="float">
+ </argument>
+ <description>
+ Sets the position from which audio will be played, in seconds.
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mix_target">
+ <return type="void">
+ </return>
+ <argument index="0" name="mix_target" type="int" enum="AudioStreamPlayer.MixTarget">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stream">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="AudioStream">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_volume_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="volume_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stops the audio.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code].
+ </member>
+ <member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Bus on which this audio is playing.
+ </member>
+ <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget">
+ </member>
+ <member name="playing" type="bool" setter="_set_playing" getter="is_playing">
+ If [code]true[/code], audio is playing.
+ </member>
+ <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
+ The [AudioStream] object to be played.
+ </member>
+ <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ Volume of sound, in dB.
+ </member>
+ </members>
+ <signals>
+ <signal name="finished">
+ <description>
+ Emitted when the audio stops playing.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MIX_TARGET_STEREO" value="0">
+ </constant>
+ <constant name="MIX_TARGET_SURROUND" value="1">
+ </constant>
+ <constant name="MIX_TARGET_CENTER" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
new file mode 100644
index 0000000000..e31f2dd941
--- /dev/null
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plays audio in 2D.
+ </brief_description>
+ <description>
+ Plays audio that dampens with distance from screen center.
+ </description>
+ <tutorials>
+ http://docs.godotengine.org/en/latest/learning/features/audio/index.html
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_area_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_attenuation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pos">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_stream" qualifiers="const">
+ <return type="AudioStream">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_volume_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_autoplay_enabled">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
+ </argument>
+ <description>
+ Plays the audio from the given position 'from_pos', in seconds.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_pos" type="float">
+ </argument>
+ <description>
+ Sets the position from which audio will be played, in seconds.
+ </description>
+ </method>
+ <method name="set_area_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_attenuation">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="pixels" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stream">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="AudioStream">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_volume_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="volume_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stops the audio.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask">
+ Areas in which this sound plays.
+ </member>
+ <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation">
+ Dampens audio over distance with this as an exponent.
+ </member>
+ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code].
+ </member>
+ <member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Bus on which this audio is playing.
+ </member>
+ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
+ Maximum distance from which audio is still hearable.
+ </member>
+ <member name="playing" type="bool" setter="_set_playing" getter="is_playing">
+ If [code]true[/code], audio is playing.
+ </member>
+ <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
+ The [AudioStream] object to be played.
+ </member>
+ <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ Base volume without dampening.
+ </member>
+ </members>
+ <signals>
+ <signal name="finished">
+ <description>
+ Emitted when the audio stops playing.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
new file mode 100644
index 0000000000..3aad0ea87a
--- /dev/null
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plays 3D sound in 3D space
+ </brief_description>
+ <description>
+ Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
+ </description>
+ <tutorials>
+ http://docs.godotengine.org/en/latest/learning/features/audio/index.html
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_area_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_attenuation_filter_cutoff_hz" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_attenuation_filter_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_attenuation_model" qualifiers="const">
+ <return type="int" enum="AudioStreamPlayer3D.AttenuationModel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bus" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_doppler_tracking" qualifiers="const">
+ <return type="int" enum="AudioStreamPlayer3D.DopplerTracking">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_angle" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_angle_filter_attenuation_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_out_of_range_mode" qualifiers="const">
+ <return type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pos">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_stream" qualifiers="const">
+ <return type="AudioStream">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unit_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unit_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_autoplay_enabled">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_emission_angle_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
+ </argument>
+ <description>
+ Plays the audio from the given position 'from_pos', in seconds.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_pos" type="float">
+ </argument>
+ <description>
+ Sets the position from which audio will be played, in seconds.
+ </description>
+ </method>
+ <method name="set_area_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_attenuation_filter_cutoff_hz">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_attenuation_filter_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_attenuation_model">
+ <return type="void">
+ </return>
+ <argument index="0" name="model" type="int" enum="AudioStreamPlayer3D.AttenuationModel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bus">
+ <return type="void">
+ </return>
+ <argument index="0" name="bus" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_doppler_tracking">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.DopplerTracking">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_angle_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_angle_filter_attenuation_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="metres" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_out_of_range_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stream">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="AudioStream">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_unit_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="unit_db" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_unit_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="unit_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stops the audio.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask">
+ Areas in which this sound plays.
+ </member>
+ <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz">
+ Dampens audio above this frequency, in Hz.
+ </member>
+ <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db">
+ Amount how much the filter affects the loudness, in dB.
+ </member>
+ <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel">
+ Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
+ </member>
+ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays audio plays when added to scene tree. Default value: [code]false[/code].
+ </member>
+ <member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Bus on which this audio is playing.
+ </member>
+ <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking">
+ Decides in which step the Doppler effect should be calculated.
+ </member>
+ <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle">
+ The angle in which the audio reaches cameras undampened.
+ </member>
+ <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled">
+ If [code]true[/code], the audio should be dampened according to the direction of the sound.
+ </member>
+ <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db">
+ dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
+ </member>
+ <member name="max_db" type="float" setter="set_max_db" getter="get_max_db">
+ Sets the absolute maximum of the soundlevel, in dB.
+ </member>
+ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
+ Sets the distance from wich the 'out_of_range_mode' takes effect. Has no effect if set to 0.
+ </member>
+ <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode">
+ Decides if audio should pause when source is outside of 'max_distance' range.
+ </member>
+ <member name="playing" type="bool" setter="_set_playing" getter="is_playing">
+ If [code]true[/code], audio is playing.
+ </member>
+ <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
+ The [AudioStream] object to be played.
+ </member>
+ <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db">
+ Base sound level unaffected by dampening, in dB.
+ </member>
+ <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size">
+ Factor for the attenuation effect.
+ </member>
+ </members>
+ <signals>
+ <signal name="finished">
+ <description>
+ Fires when the audio stops playing.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
+ Linear dampening of loudness according to distance.
+ </constant>
+ <constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1">
+ Squared dampening of loudness according to distance.
+ </constant>
+ <constant name="ATTENUATION_LOGARITHMIC" value="2">
+ Logarithmic dampening of loudness according to distance.
+ </constant>
+ <constant name="OUT_OF_RANGE_MIX" value="0">
+ Mix this audio in, even when it's out of range.
+ </constant>
+ <constant name="OUT_OF_RANGE_PAUSE" value="1">
+ Pause this audio when it gets out of range.
+ </constant>
+ <constant name="DOPPLER_TRACKING_DISABLED" value="0">
+ Disables doppler tracking.
+ </constant>
+ <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
+ Executes doppler trackin in idle step.
+ </constant>
+ <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
+ Executes doppler tracking in fixed step.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
new file mode 100644
index 0000000000..1573a78d1f
--- /dev/null
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plays audio with random pitch tweaking.
+ </brief_description>
+ <description>
+ Randomly varies pitch on each start.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_audio_stream" qualifiers="const">
+ <return type="AudioStream">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_random_pitch" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_audio_stream">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="AudioStream">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_random_pitch">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream">
+ The current [AudioStream].
+ </member>
+ <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch">
+ The intensity of random pitch variation.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
new file mode 100644
index 0000000000..7f7414e4d3
--- /dev/null
+++ b/doc/classes/AudioStreamSample.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plays audio.
+ </brief_description>
+ <description>
+ Plays audio, can loop.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_data" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_format" qualifiers="const">
+ <return type="int" enum="AudioStreamSample.Format">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_loop_begin" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_loop_end" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_loop_mode" qualifiers="const">
+ <return type="int" enum="AudioStreamSample.LoopMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mix_rate" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_stereo" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="AudioStreamSample.Format">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_loop_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop_begin" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_loop_end">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop_end" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_loop_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop_mode" type="int" enum="AudioStreamSample.LoopMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mix_rate">
+ <return type="void">
+ </return>
+ <argument index="0" name="mix_rate" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stereo">
+ <return type="void">
+ </return>
+ <argument index="0" name="stereo" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
+ Raw audio data.
+ </member>
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format">
+ Audio format. See FORMAT_* constants for values.
+ </member>
+ <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin">
+ Loop start in bytes.
+ </member>
+ <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end">
+ Loop end in bytes.
+ </member>
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode">
+ Loop mode. See LOOP_* constants for values.
+ </member>
+ <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate">
+ The sample rate for mixing this audio.
+ </member>
+ <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo">
+ If [code]true[/code], audio is stereo. Default value: [code]false[/code].
+ </member>
+ </members>
+ <constants>
+ <constant name="FORMAT_8_BITS" value="0">
+ Audio codec 8 bit.
+ </constant>
+ <constant name="FORMAT_16_BITS" value="1">
+ Audio codec 16 bit.
+ </constant>
+ <constant name="FORMAT_IMA_ADPCM" value="2">
+ Audio codec IMA ADPCM.
+ </constant>
+ <constant name="LOOP_DISABLED" value="0">
+ Audio does not loop.
+ </constant>
+ <constant name="LOOP_FORWARD" value="1">
+ Audio loops the data between loop_begin and loop_end playing forward only.
+ </constant>
+ <constant name="LOOP_PING_PONG" value="2">
+ Audio loops the data between loop_begin and loop_end playing back and forth.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
new file mode 100644
index 0000000000..091bd3fa73
--- /dev/null
+++ b/doc/classes/BackBufferCopy.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
+ </brief_description>
+ <description>
+ Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_copy_mode" qualifiers="const">
+ <return type="int" enum="BackBufferCopy.CopyMode">
+ </return>
+ <description>
+ Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
+ </description>
+ </method>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return the area covered by the BackBufferCopy.
+ </description>
+ </method>
+ <method name="set_copy_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="copy_mode" type="int" enum="BackBufferCopy.CopyMode">
+ </argument>
+ <description>
+ Set the copy mode of the BackBufferCopy (refer to constants section).
+ </description>
+ </method>
+ <method name="set_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Defines the area covered by the BackBufferCopy.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode">
+ </member>
+ <member name="rect" type="Rect2" setter="set_rect" getter="get_rect">
+ </member>
+ </members>
+ <constants>
+ <constant name="COPY_MODE_DISABLED" value="0">
+ Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
+ </constant>
+ <constant name="COPY_MODE_RECT" value="1">
+ Sets the copy mode to a region.
+ </constant>
+ <constant name="COPY_MODE_VIEWPORT" value="2">
+ Sets the copy mode to the entire screen.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
new file mode 100644
index 0000000000..2ad46579b2
--- /dev/null
+++ b/doc/classes/BaseButton.xml
@@ -0,0 +1,213 @@
+<?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.
+ </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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_pressed" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called when button is pressed.
+ </description>
+ </method>
+ <method name="_toggled" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ Called when button is toggled (only if toggle_mode is active).
+ </description>
+ </method>
+ <method name="get_action_mode" qualifiers="const">
+ <return type="int" enum="BaseButton.ActionMode">
+ </return>
+ <description>
+ Return the current mode of action (see [method set_action_mode]) (one of the ACTION_MODE_* constants).
+ </description>
+ </method>
+ <method name="get_button_group" qualifiers="const">
+ <return type="ButtonGroup">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_draw_mode" qualifiers="const">
+ <return type="int" enum="BaseButton.DrawMode">
+ </return>
+ <description>
+ Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.
+ </description>
+ </method>
+ <method name="get_enabled_focus_mode" qualifiers="const">
+ <return type="int" enum="Control.FocusMode">
+ </return>
+ <description>
+ Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
+ <method name="get_shortcut" qualifiers="const">
+ <return type="ShortCut">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the button is in disabled state (see [method set_disabled]).
+ </description>
+ </method>
+ <method name="is_hovered" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if mouse entered the button before it exit.
+ </description>
+ </method>
+ <method name="is_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down.
+ </description>
+ </method>
+ <method name="is_toggle_mode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return the toggle_mode property (see [method set_toggle_mode]).
+ </description>
+ </method>
+ <method name="set_action_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="BaseButton.ActionMode">
+ </argument>
+ <description>
+ Set the current mode of action, determining when the button is considered clicked (see the ACTION_MODE_* constants).
+ </description>
+ </method>
+ <method name="set_button_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="button_group" type="ButtonGroup">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="disabled" type="bool">
+ </argument>
+ <description>
+ Set the button into disabled state. When a button is disabled, it can't be clicked or toggled.
+ </description>
+ </method>
+ <method name="set_enabled_focus_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Control.FocusMode">
+ </argument>
+ <description>
+ Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ Set the button to pressed state (only if toggle_mode is active).
+ </description>
+ </method>
+ <method name="set_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="shortcut" type="ShortCut">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_toggle_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
+ </member>
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ </member>
+ <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode">
+ </member>
+ <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ </member>
+ <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
+ </member>
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ </member>
+ </members>
+ <signals>
+ <signal name="button_down">
+ <description>
+ Emitted when the button starts being held down.
+ </description>
+ </signal>
+ <signal name="button_up">
+ <description>
+ Emitted when the button stops being held down.
+ </description>
+ </signal>
+ <signal name="pressed">
+ <description>
+ This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise).
+ </description>
+ </signal>
+ <signal name="toggled">
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="DRAW_NORMAL" value="0">
+ The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
+ </constant>
+ <constant name="DRAW_PRESSED" value="1">
+ The state of buttons are pressed.
+ </constant>
+ <constant name="DRAW_HOVER" value="2">
+ The state of buttons are hovered.
+ </constant>
+ <constant name="DRAW_DISABLED" value="3">
+ The state of buttons are disabled.
+ </constant>
+ <constant name="ACTION_MODE_BUTTON_PRESS" value="0">
+ Require just a press to consider the button clicked.
+ </constant>
+ <constant name="ACTION_MODE_BUTTON_RELEASE" value="1">
+ Require a press and a subsequent release before considering the button clicked.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
new file mode 100644
index 0000000000..7731647648
--- /dev/null
+++ b/doc/classes/Basis.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Basis" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 3x3 matrix datatype.
+ </brief_description>
+ <description>
+ 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized. Almost always used as orthogonal basis for a [Transform].
+ For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Basis">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="from" type="Quat">
+ </argument>
+ <description>
+ Create a rotation matrix from the given quaternion.
+ </description>
+ </method>
+ <method name="Basis">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="euler" type="Vector3">
+ </argument>
+ <description>
+ Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle).
+ </description>
+ </method>
+ <method name="Basis">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="phi" type="float">
+ </argument>
+ <description>
+ Create a rotation matrix which rotates around the given axis by the specified angle. The axis must be a normalized vector.
+ </description>
+ </method>
+ <method name="Basis">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="x_axis" type="Vector3">
+ </argument>
+ <argument index="1" name="y_axis" type="Vector3">
+ </argument>
+ <argument index="2" name="z_axis" type="Vector3">
+ </argument>
+ <description>
+ Create a matrix from 3 axis vectors.
+ </description>
+ </method>
+ <method name="determinant">
+ <return type="float">
+ </return>
+ <description>
+ Return the determinant of the matrix.
+ </description>
+ </method>
+ <method name="get_euler">
+ <return type="Vector3">
+ </return>
+ <description>
+ Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle).
+ </description>
+ </method>
+ <method name="get_orthogonal_index">
+ <return type="int">
+ </return>
+ <description>
+ This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code.
+ </description>
+ </method>
+ <method name="get_scale">
+ <return type="Vector3">
+ </return>
+ <description>
+ Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
+ </description>
+ </method>
+ <method name="inverse">
+ <return type="Basis">
+ </return>
+ <description>
+ Return the inverse of the matrix.
+ </description>
+ </method>
+ <method name="orthonormalized">
+ <return type="Basis">
+ </return>
+ <description>
+ Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
+ </description>
+ </method>
+ <method name="rotated">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="phi" type="float">
+ </argument>
+ <description>
+ Introduce an additional rotation around the given axis by phi (radians). Only relevant when the matrix is being used as a part of [Transform]. The axis must be a normalized vector.
+ </description>
+ </method>
+ <method name="scaled">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform].
+ </description>
+ </method>
+ <method name="tdotx">
+ <return type="float">
+ </return>
+ <argument index="0" name="with" type="Vector3">
+ </argument>
+ <description>
+ Transposed dot product with the x axis of the matrix.
+ </description>
+ </method>
+ <method name="tdoty">
+ <return type="float">
+ </return>
+ <argument index="0" name="with" type="Vector3">
+ </argument>
+ <description>
+ Transposed dot product with the y axis of the matrix.
+ </description>
+ </method>
+ <method name="tdotz">
+ <return type="float">
+ </return>
+ <argument index="0" name="with" type="Vector3">
+ </argument>
+ <description>
+ Transposed dot product with the z axis of the matrix.
+ </description>
+ </method>
+ <method name="transposed">
+ <return type="Basis">
+ </return>
+ <description>
+ Return the transposed version of the matrix.
+ </description>
+ </method>
+ <method name="xform">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="v" type="Vector3">
+ </argument>
+ <description>
+ Return a vector transformed (multiplied) by the matrix.
+ </description>
+ </method>
+ <method name="xform_inv">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="v" type="Vector3">
+ </argument>
+ <description>
+ Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="x" type="Vector3" setter="" getter="">
+ </member>
+ <member name="y" type="Vector3" setter="" getter="">
+ </member>
+ <member name="z" type="Vector3" setter="" getter="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
new file mode 100644
index 0000000000..62b1c9ff4f
--- /dev/null
+++ b/doc/classes/BitMap.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BitMap" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Boolean matrix.
+ </brief_description>
+ <description>
+ A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="create">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Creates a bitmap with the specified size, filled with false.
+ </description>
+ </method>
+ <method name="create_from_image_alpha">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <description>
+ Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case.
+ </description>
+ </method>
+ <method name="get_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Returns bitmap's value at the specified position.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns bitmap's dimensions.
+ </description>
+ </method>
+ <method name="get_true_bit_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the amount of bitmap elements that are set to true.
+ </description>
+ </method>
+ <method name="set_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="bit" type="bool">
+ </argument>
+ <description>
+ Sets the bitmap's element at the specified position, to the specified value.
+ </description>
+ </method>
+ <method name="set_bit_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_rect" type="Rect2">
+ </argument>
+ <argument index="1" name="bit" type="bool">
+ </argument>
+ <description>
+ Sets a rectangular portion of the bitmap to the specified value.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
new file mode 100644
index 0000000000..e983c59782
--- /dev/null
+++ b/doc/classes/BitmapFont.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BitmapFont" inherits="Font" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_char">
+ <return type="void">
+ </return>
+ <argument index="0" name="character" type="int">
+ </argument>
+ <argument index="1" name="texture" type="int">
+ </argument>
+ <argument index="2" name="rect" type="Rect2">
+ </argument>
+ <argument index="3" name="align" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <argument index="4" name="advance" type="float" default="-1">
+ </argument>
+ <description>
+ Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance.
+ </description>
+ </method>
+ <method name="add_kerning_pair">
+ <return type="void">
+ </return>
+ <argument index="0" name="char_a" type="int">
+ </argument>
+ <argument index="1" name="char_b" type="int">
+ </argument>
+ <argument index="2" name="kerning" type="int">
+ </argument>
+ <description>
+ Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ </description>
+ </method>
+ <method name="add_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ Add a texture to the [BitmapFont].
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the font data.
+ </description>
+ </method>
+ <method name="create_from_fnt">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_char_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <argument index="1" name="next" type="int" default="0">
+ </argument>
+ <description>
+ Return the size of a character, optionally taking kerning into account if the next character is provided.
+ </description>
+ </method>
+ <method name="get_fallback" qualifiers="const">
+ <return type="BitmapFont">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_kerning_pair" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="char_a" type="int">
+ </argument>
+ <argument index="1" name="char_b" type="int">
+ </argument>
+ <description>
+ Return a kerning pair as a difference.
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_ascent">
+ <return type="void">
+ </return>
+ <argument index="0" name="px" type="float">
+ </argument>
+ <description>
+ Set the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="set_distance_field_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fallback">
+ <return type="void">
+ </return>
+ <argument index="0" name="fallback" type="BitmapFont">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="px" type="float">
+ </argument>
+ <description>
+ Set the total font height (ascent plus descent) in pixels.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ascent" type="float" setter="set_ascent" getter="get_ascent">
+ </member>
+ <member name="chars" type="PoolIntArray" setter="_set_chars" getter="_get_chars">
+ </member>
+ <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint">
+ </member>
+ <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback">
+ </member>
+ <member name="height" type="float" setter="set_height" getter="get_height">
+ </member>
+ <member name="kernings" type="PoolIntArray" setter="_set_kernings" getter="_get_kernings">
+ </member>
+ <member name="textures" type="Array" setter="_set_textures" getter="_get_textures">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml
new file mode 100644
index 0000000000..9297c0e1b1
--- /dev/null
+++ b/doc/classes/BoneAttachment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A node that will attach to a bone.
+ </brief_description>
+ <description>
+ This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bone_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of the bone node attached to.
+ </description>
+ </method>
+ <method name="set_bone_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_name" type="String">
+ </argument>
+ <description>
+ Changes the name of the bone node
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
new file mode 100644
index 0000000000..0c70d919f3
--- /dev/null
+++ b/doc/classes/BoxContainer.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoxContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for box containers.
+ </brief_description>
+ <description>
+ Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_spacer">
+ <return type="void">
+ </return>
+ <argument index="0" name="begin" type="bool">
+ </argument>
+ <description>
+ Adds a control to the box as a spacer. If [code]true[/code], [i]begin[/i] will insert the spacer control in front of other children.
+ </description>
+ </method>
+ <method name="get_alignment" qualifiers="const">
+ <return type="int" enum="BoxContainer.AlignMode">
+ </return>
+ <description>
+ Return the alignment of children in the container.
+ </description>
+ </method>
+ <method name="set_alignment">
+ <return type="void">
+ </return>
+ <argument index="0" name="alignment" type="int" enum="BoxContainer.AlignMode">
+ </argument>
+ <description>
+ Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode">
+ The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END).
+ </member>
+ </members>
+ <constants>
+ <constant name="ALIGN_BEGIN" value="0">
+ Aligns children with the beginning of the container.
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ Aligns children with the center of the container.
+ </constant>
+ <constant name="ALIGN_END" value="2">
+ Aligns children with the end of the container.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml
new file mode 100644
index 0000000000..4e8eb0ba6f
--- /dev/null
+++ b/doc/classes/BoxShape.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoxShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Box shape resource.
+ </brief_description>
+ <description>
+ 3D box shape that can be a child of a [PhysicsBody] or [Area].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_extents" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the half extents of the shape.
+ </description>
+ </method>
+ <method name="set_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ Set the half extents for the shape.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+ The shape's half extents.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
new file mode 100644
index 0000000000..bb02e4266b
--- /dev/null
+++ b/doc/classes/Button.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Button" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Standard themed Button.
+ </brief_description>
+ <description>
+ Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_button_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_clip_text" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_text_align" qualifiers="const">
+ <return type="int" enum="Button.TextAlign">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_flat" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_button_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_clip_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flat">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_text_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Button.TextAlign">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign">
+ Text alignment policy for the button's text, use one of the ALIGN_* constants.
+ </member>
+ <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text">
+ When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
+ </member>
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat">
+ Flat buttons don't display decoration.
+ </member>
+ <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
+ Button's icon, if text is present the icon will be placed before the text.
+ </member>
+ <member name="text" type="String" setter="set_text" getter="get_text">
+ The button's text that will be displayed inside the button's area.
+ </member>
+ </members>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ Align the text to the left.
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ Align the text to the center.
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ Align the text to the right.
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
new file mode 100644
index 0000000000..c2c999f9d8
--- /dev/null
+++ b/doc/classes/ButtonGroup.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ButtonGroup" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Group of Buttons.
+ </brief_description>
+ <description>
+ Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_pressed_button">
+ <return type="BaseButton">
+ </return>
+ <description>
+ Return the pressed button.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
new file mode 100644
index 0000000000..2302c39e35
--- /dev/null
+++ b/doc/classes/Camera.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Camera" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Camera node, displays from a point of view.
+ </brief_description>
+ <description>
+ Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear_current">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_camera_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
+ </description>
+ </method>
+ <method name="get_cull_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_doppler_tracking" qualifiers="const">
+ <return type="int" enum="Camera.DopplerTracking">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_environment" qualifiers="const">
+ <return type="Environment">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fov" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_h_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_keep_aspect_mode" qualifiers="const">
+ <return type="int" enum="Camera.KeepAspect">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_projection" qualifiers="const">
+ <return type="int" enum="Camera.Projection">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_zfar" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_znear" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_current" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
+ </description>
+ </method>
+ <method name="is_position_behind" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="world_point" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_current">
+ <return type="void">
+ </return>
+ <description>
+ Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
+ </description>
+ </method>
+ <method name="project_local_ray_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="project_position" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="project_ray_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ </description>
+ </method>
+ <method name="project_ray_origin" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
+ </description>
+ </method>
+ <method name="set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_doppler_tracking">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="Environment">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_keep_aspect_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_orthogonal">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <argument index="1" name="z_near" type="float">
+ </argument>
+ <argument index="2" name="z_far" type="float">
+ </argument>
+ <description>
+ Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
+ </description>
+ </method>
+ <method name="set_perspective">
+ <return type="void">
+ </return>
+ <argument index="0" name="fov" type="float">
+ </argument>
+ <argument index="1" name="z_near" type="float">
+ </argument>
+ <argument index="2" name="z_far" type="float">
+ </argument>
+ <description>
+ Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
+ </description>
+ </method>
+ <method name="set_v_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unproject_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="world_point" type="Vector3">
+ </argument>
+ <description>
+ Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="PROJECTION_PERSPECTIVE" value="0">
+ Perspective Projection (object's size on the screen becomes smaller when far away).
+ </constant>
+ <constant name="PROJECTION_ORTHOGONAL" value="1">
+ Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
+ </constant>
+ <constant name="KEEP_WIDTH" value="0">
+ </constant>
+ <constant name="KEEP_HEIGHT" value="1">
+ </constant>
+ <constant name="DOPPLER_TRACKING_DISABLED" value="0">
+ </constant>
+ <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
+ </constant>
+ <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
new file mode 100644
index 0000000000..659efa860d
--- /dev/null
+++ b/doc/classes/Camera2D.xml
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Camera2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Camera node for 2D scenes.
+ </brief_description>
+ <description>
+ Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes.
+ This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="align">
+ <return type="void">
+ </return>
+ <description>
+ Align the camera to the tracked node
+ </description>
+ </method>
+ <method name="clear_current">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="force_update_scroll">
+ <return type="void">
+ </return>
+ <description>
+ Force the camera to update scroll immediately.
+ </description>
+ </method>
+ <method name="get_anchor_mode" qualifiers="const">
+ <return type="int" enum="Camera2D.AnchorMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_camera_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the camera position.
+ </description>
+ </method>
+ <method name="get_camera_screen_center" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_viewport" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_drag_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the margins needed to drag the camera (see [method set_drag_margin]).
+ </description>
+ </method>
+ <method name="get_follow_smoothing" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_h_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_limit" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the scrolling limit in pixels.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the scroll offset.
+ </description>
+ </method>
+ <method name="get_v_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_zoom" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_current" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true of this is the current camera (see [method make_current]).
+ </description>
+ </method>
+ <method name="is_follow_smoothing_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_h_drag_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_limit_drawing_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_limit_smoothing_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_margin_drawing_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_rotating" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_screen_drawing_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_v_drag_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_current">
+ <return type="void">
+ </return>
+ <description>
+ Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
+ </description>
+ </method>
+ <method name="reset_smoothing">
+ <return type="void">
+ </return>
+ <description>
+ Set the camera's position immediately to its current smoothing destination.
+ This has no effect if smoothing is disabled.
+ </description>
+ </method>
+ <method name="set_anchor_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="anchor_mode" type="int" enum="Camera2D.AnchorMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_viewport">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_drag_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="drag_margin" type="float">
+ </argument>
+ <description>
+ Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges.
+ </description>
+ </method>
+ <method name="set_enable_follow_smoothing">
+ <return type="void">
+ </return>
+ <argument index="0" name="follow_smoothing" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_follow_smoothing">
+ <return type="void">
+ </return>
+ <argument index="0" name="follow_smoothing" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_drag_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_limit">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="limit" type="int">
+ </argument>
+ <description>
+ Set the scrolling limit in pixels.
+ </description>
+ </method>
+ <method name="set_limit_drawing_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="limit_drawing_enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_limit_smoothing_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="limit_smoothing_enabled" type="bool">
+ </argument>
+ <description>
+ Smooth camera when reaching camera limits.
+ This requires camera smoothing being enabled to have a noticeable effect.
+ </description>
+ </method>
+ <method name="set_margin_drawing_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin_drawing_enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the scroll offset. Useful for looking around or camera shake animations.
+ </description>
+ </method>
+ <method name="set_rotating">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotating" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_screen_drawing_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="screen_drawing_enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_drag_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_zoom">
+ <return type="void">
+ </return>
+ <argument index="0" name="zoom" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode">
+ </member>
+ <member name="current" type="bool" setter="_set_current" getter="is_current">
+ </member>
+ <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ </member>
+ <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled">
+ </member>
+ <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ </member>
+ <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ </member>
+ <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin">
+ </member>
+ <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled">
+ </member>
+ <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled">
+ </member>
+ <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled">
+ </member>
+ <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled">
+ </member>
+ <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit">
+ </member>
+ <member name="limit_left" type="int" setter="set_limit" getter="get_limit">
+ </member>
+ <member name="limit_right" type="int" setter="set_limit" getter="get_limit">
+ </member>
+ <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled">
+ </member>
+ <member name="limit_top" type="int" setter="set_limit" getter="get_limit">
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ </member>
+ <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating">
+ </member>
+ <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled">
+ </member>
+ <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing">
+ </member>
+ <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom">
+ </member>
+ </members>
+ <constants>
+ <constant name="ANCHOR_MODE_DRAG_CENTER" value="1">
+ </constant>
+ <constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
new file mode 100644
index 0000000000..26a9e1519b
--- /dev/null
+++ b/doc/classes/CanvasItem.xml
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CanvasItem" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class of anything 2D.
+ </brief_description>
+ <description>
+ Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related.
+ Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though.
+ Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though).
+ Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode.
+ Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_draw" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called (if exists) to draw the canvas item.
+ </description>
+ </method>
+ <method name="draw_char">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="Font">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="char" type="String">
+ </argument>
+ <argument index="3" name="next" type="String">
+ </argument>
+ <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
+ </description>
+ </method>
+ <method name="draw_circle">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="radius" type="float">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <description>
+ Draw a colored circle.
+ </description>
+ </method>
+ <method name="draw_colored_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ </argument>
+ <argument index="3" name="texture" type="Texture" default="null">
+ </argument>
+ <argument index="4" name="normal_map" type="Texture" default="null">
+ </argument>
+ <argument index="5" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ Draw a colored polygon of any amount of points, convex or concave.
+ </description>
+ </method>
+ <method name="draw_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <argument index="1" name="to" type="Vector2">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <argument index="3" name="width" type="float" default="1.0">
+ </argument>
+ <argument index="4" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ Draw a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
+ </description>
+ </method>
+ <method name="draw_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="colors" type="PoolColorArray">
+ </argument>
+ <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ </argument>
+ <argument index="3" name="texture" type="Texture" default="null">
+ </argument>
+ <argument index="4" name="normal_map" type="Texture" default="null">
+ </argument>
+ <argument index="5" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ Draw a polygon of any amount of points, convex or concave.
+ </description>
+ </method>
+ <method name="draw_polyline">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="width" type="float" default="1.0">
+ </argument>
+ <argument index="3" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_polyline_colors">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="colors" type="PoolColorArray">
+ </argument>
+ <argument index="2" name="width" type="float" default="1.0">
+ </argument>
+ <argument index="3" name="antialiased" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_primitive">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="colors" type="PoolColorArray">
+ </argument>
+ <argument index="2" name="uvs" type="PoolVector2Array">
+ </argument>
+ <argument index="3" name="texture" type="Texture" default="null">
+ </argument>
+ <argument index="4" name="width" type="float" default="1.0">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
+ </description>
+ </method>
+ <method name="draw_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="filled" type="bool" default="true">
+ </argument>
+ <description>
+ Draw a colored rectangle.
+ </description>
+ </method>
+ <method name="draw_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="rot" type="float">
+ </argument>
+ <argument index="2" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
+ </description>
+ </method>
+ <method name="draw_set_transform_matrix">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="Font">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="text" type="String">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="clip_w" type="int" default="-1">
+ </argument>
+ <description>
+ Draw a string using a custom font.
+ </description>
+ </method>
+ <method name="draw_style_box">
+ <return type="void">
+ </return>
+ <argument index="0" name="style_box" type="StyleBox">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Draw a styled rectangle.
+ </description>
+ </method>
+ <method name="draw_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="3" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ Draw a texture at a given position.
+ </description>
+ </method>
+ <method name="draw_texture_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="tile" type="bool">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
+ </description>
+ </method>
+ <method name="draw_texture_rect_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture" default="null">
+ </argument>
+ <argument index="6" name="clip_uv" type="bool" default="true">
+ </argument>
+ <description>
+ Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
+ </description>
+ </method>
+ <method name="edit_get_state" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Used for editing, returns an opaque value representing the transform state.
+ </description>
+ </method>
+ <method name="edit_rotate">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ Used for editing, handle rotation.
+ </description>
+ </method>
+ <method name="edit_set_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="edit_set_state">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="Variant">
+ </argument>
+ <description>
+ Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation (radians) and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size.
+ </description>
+ </method>
+ <method name="get_canvas" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return the [RID] of the [World2D] canvas where this item is in.
+ </description>
+ </method>
+ <method name="get_canvas_item" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return the canvas item RID used by [VisualServer] for this item.
+ </description>
+ </method>
+ <method name="get_canvas_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the transform matrix of this item's canvas.
+ </description>
+ </method>
+ <method name="get_global_mouse_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Get the global position of the mouse.
+ </description>
+ </method>
+ <method name="get_global_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the global transform matrix of this item.
+ </description>
+ </method>
+ <method name="get_global_transform_with_canvas" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the global transform matrix of this item in relation to the canvas.
+ </description>
+ </method>
+ <method name="get_item_and_children_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Get a [Rect2] with the boundaries of this item and its children.
+ </description>
+ </method>
+ <method name="get_item_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return a rect containing the editable boundaries of the item.
+ </description>
+ </method>
+ <method name="get_light_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get this item's light mask number.
+ </description>
+ </method>
+ <method name="get_local_mouse_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Get the mouse position relative to this item's position.
+ </description>
+ </method>
+ <method name="get_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ Get the material of this item.
+ </description>
+ </method>
+ <method name="get_modulate" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Get the modulate of the CanvasItem, which affects children items too.
+ </description>
+ </method>
+ <method name="get_self_modulate" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Get the self-modulate of the CanvasItem.
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the transform matrix of this item.
+ </description>
+ </method>
+ <method name="get_use_parent_material" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether this item uses its parent's material.
+ </description>
+ </method>
+ <method name="get_viewport_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Get the viewport's boundaries as a [Rect2].
+ </description>
+ </method>
+ <method name="get_viewport_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get this item's transform in relation to the viewport.
+ </description>
+ </method>
+ <method name="get_world_2d" qualifiers="const">
+ <return type="World2D">
+ </return>
+ <description>
+ Get the [World2D] where this item is in.
+ </description>
+ </method>
+ <method name="hide">
+ <return type="void">
+ </return>
+ <description>
+ Hide the CanvasItem currently visible.
+ </description>
+ </method>
+ <method name="is_draw_behind_parent_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the item is drawn behind its parent.
+ </description>
+ </method>
+ <method name="is_local_transform_notification_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_set_as_toplevel" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return if set as toplevel. See [method set_as_toplevel].
+ </description>
+ </method>
+ <method name="is_transform_notification_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden.
+ </description>
+ </method>
+ <method name="is_visible_in_tree" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_canvas_pos_local" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_input_local" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_as_toplevel">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set as top level. This means that it will not inherit transform from parent canvas items.
+ </description>
+ </method>
+ <method name="set_draw_behind_parent">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the canvas item is drawn behind its parent.
+ </description>
+ </method>
+ <method name="set_light_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="light_mask" type="int">
+ </argument>
+ <description>
+ Set the ligtht mask number of this item.
+ </description>
+ </method>
+ <method name="set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ Set the material of this item.
+ </description>
+ </method>
+ <method name="set_modulate">
+ <return type="void">
+ </return>
+ <argument index="0" name="modulate" type="Color">
+ </argument>
+ <description>
+ Set the modulate of the CanvasItem. This [i]affects[/i] the modulation of children items.
+ </description>
+ </method>
+ <method name="set_notify_local_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_notify_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_self_modulate">
+ <return type="void">
+ </return>
+ <argument index="0" name="self_modulate" type="Color">
+ </argument>
+ <description>
+ Set the self-modulate of the CanvasItem. This does not affect the modulation of children items.
+ </description>
+ </method>
+ <method name="set_use_parent_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether or not this item should use its parent's material.
+ </description>
+ </method>
+ <method name="set_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ Set whether this item should be visible or not.
+ Note that a hidden CanvasItem will make all children hidden too, so no matter what is set here this item won't be shown if its parent or grandparents nodes are hidden.
+ </description>
+ </method>
+ <method name="show">
+ <return type="void">
+ </return>
+ <description>
+ Show the CanvasItem currently hidden.
+ </description>
+ </method>
+ <method name="update">
+ <return type="void">
+ </return>
+ <description>
+ Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask">
+ </member>
+ <member name="material" type="Material" setter="set_material" getter="get_material">
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate">
+ </member>
+ <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate">
+ </member>
+ <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled">
+ </member>
+ <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top">
+ </member>
+ <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material">
+ </member>
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible">
+ </member>
+ </members>
+ <signals>
+ <signal name="draw">
+ <description>
+ Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing.
+ </description>
+ </signal>
+ <signal name="hide">
+ <description>
+ Emitted when becoming hidden.
+ </description>
+ </signal>
+ <signal name="item_rect_changed">
+ <description>
+ Emitted when the item rect has changed.
+ </description>
+ </signal>
+ <signal name="visibility_changed">
+ <description>
+ Emitted when the visibility (hidden/visible) changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="BLEND_MODE_MIX" value="0">
+ Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
+ </constant>
+ <constant name="BLEND_MODE_ADD" value="1">
+ Additive blending mode.
+ </constant>
+ <constant name="BLEND_MODE_SUB" value="2">
+ Subtractive blending mode.
+ </constant>
+ <constant name="BLEND_MODE_MUL" value="3">
+ Multiplicative blending mode.
+ </constant>
+ <constant name="BLEND_MODE_PREMULT_ALPHA" value="4">
+ Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
+ </constant>
+ <constant name="NOTIFICATION_DRAW" value="30" enum="">
+ CanvasItem is requested to draw.
+ </constant>
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31" enum="">
+ Canvas item visibility has changed.
+ </constant>
+ <constant name="NOTIFICATION_ENTER_CANVAS" value="32" enum="">
+ Canvas item has entered the canvas.
+ </constant>
+ <constant name="NOTIFICATION_EXIT_CANVAS" value="33" enum="">
+ Canvas item has exited the canvas.
+ </constant>
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
+ Canvas item transform has changed. Only received if requested.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
new file mode 100644
index 0000000000..2a6553bb6a
--- /dev/null
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_blend_mode" qualifiers="const">
+ <return type="int" enum="CanvasItemMaterial.BlendMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_light_mode" qualifiers="const">
+ <return type="int" enum="CanvasItemMaterial.LightMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="blend_mode" type="int" enum="CanvasItemMaterial.BlendMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_light_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="light_mode" type="int" enum="CanvasItemMaterial.LightMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode">
+ </member>
+ <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode">
+ </member>
+ </members>
+ <constants>
+ <constant name="BLEND_MODE_MIX" value="0">
+ </constant>
+ <constant name="BLEND_MODE_ADD" value="1">
+ </constant>
+ <constant name="BLEND_MODE_SUB" value="2">
+ </constant>
+ <constant name="BLEND_MODE_MUL" value="3">
+ </constant>
+ <constant name="BLEND_MODE_PREMULT_ALPHA" value="4">
+ </constant>
+ <constant name="LIGHT_MODE_NORMAL" value="0">
+ </constant>
+ <constant name="LIGHT_MODE_UNSHADED" value="1">
+ </constant>
+ <constant name="LIGHT_MODE_LIGHT_ONLY" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
new file mode 100644
index 0000000000..3ee1f10536
--- /dev/null
+++ b/doc/classes/CanvasLayer.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CanvasLayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Canvas drawing layer.
+ </brief_description>
+ <description>
+ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_custom_viewport" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the layer index, determines the draw order, a lower value will be below a higher one.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the base offset for this layer (helper).
+ </description>
+ </method>
+ <method name="get_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the base rotation for this layer in radians (helper).
+ </description>
+ </method>
+ <method name="get_rotationd" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the base rotation for this layer in degrees.
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the base scale for this layer (helper).
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Return the base transform for this layer.
+ </description>
+ </method>
+ <method name="get_world_2d" qualifiers="const">
+ <return type="World2D">
+ </return>
+ <description>
+ Return the [World2D] used by this layer.
+ </description>
+ </method>
+ <method name="set_custom_viewport">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the layer index, determines the draw order, a lower value will be below a higher one.
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the base offset for this layer (helper).
+ </description>
+ </method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Set the base rotation for this layer in radians (helper).
+ </description>
+ </method>
+ <method name="set_rotationd">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ Set the base rotation for this layer in degrees (helper).
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set the base scale for this layer (helper).
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Set the base transform for this layer.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="layer" type="int" setter="set_layer" getter="get_layer">
+ Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code].
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ The layer's base offset.
+ </member>
+ <member name="rotation" type="float" setter="set_rotationd" getter="get_rotationd">
+ The layer's rotation in degrees.
+ </member>
+ <member name="scale" type="Vector2" setter="set_scale" getter="get_scale">
+ The layer's scale.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
new file mode 100644
index 0000000000..f0e3132da5
--- /dev/null
+++ b/doc/classes/CanvasModulate.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Tint the entire canvas
+ </brief_description>
+ <description>
+ CanvasModulate tints the canvas elements using its assigned color
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Gets the canvas tint color
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Sets the canvas tint color
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color" type="Color" setter="set_color" getter="get_color">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
new file mode 100644
index 0000000000..13cdfa057d
--- /dev/null
+++ b/doc/classes/CapsuleMesh.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a capsule-shaped [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a capsule-shaped [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_mid_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radial_segments" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rings" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_mid_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="mid_height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radial_segments">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rings">
+ <return type="void">
+ </return>
+ <argument index="0" name="rings" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height">
+ Height of the capsule mesh from the center point. Defaults to 1.0.
+ </member>
+ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments">
+ Number of radial segments on the capsule mesh. Defaults to 64.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ Radius of the capsule mesh. Defaults to 1.0.
+ </member>
+ <member name="rings" type="int" setter="set_rings" getter="get_rings">
+ Number of rings along the height of the capsule. Defaults to 8.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml
new file mode 100644
index 0000000000..db075a504c
--- /dev/null
+++ b/doc/classes/CapsuleShape.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CapsuleShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Capsule shape for collisions.
+ </brief_description>
+ <description>
+ Capsule shape for collisions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the capsule height.
+ </description>
+ </method>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the capsule radius.
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ Set the capsule height.
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ Set the capsule radius.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="height" type="float" setter="set_height" getter="get_height">
+ The capsule's height.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The capsule's radius.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
new file mode 100644
index 0000000000..df833e0582
--- /dev/null
+++ b/doc/classes/CapsuleShape2D.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Capsule shape for 2D collisions.
+ </brief_description>
+ <description>
+ Capsule shape for 2D collisions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the height of the [CapsuleShape2D].
+ </description>
+ </method>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the radius of the [CapsuleShape2D].
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ Set the height of the [CapsuleShape2D].
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ Set the radius of the [CapsuleShape2D].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="height" type="float" setter="set_height" getter="get_height">
+ The capsule's height.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The capsules's radius.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
new file mode 100644
index 0000000000..2f81e7739f
--- /dev/null
+++ b/doc/classes/CenterContainer.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CenterContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Keeps children controls centered.
+ </brief_description>
+ <description>
+ CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_using_top_left" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Should put children to the top left corner instead of center of the container.
+ </description>
+ </method>
+ <method name="set_use_top_left">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
new file mode 100644
index 0000000000..6258eb503f
--- /dev/null
+++ b/doc/classes/CheckBox.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CheckBox" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Binary choice user interface widget
+ </brief_description>
+ <description>
+ A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="check_vadjust" type="int">
+ </theme_item>
+ <theme_item name="checked" type="Texture">
+ </theme_item>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="radio_checked" type="Texture">
+ </theme_item>
+ <theme_item name="radio_unchecked" type="Texture">
+ </theme_item>
+ <theme_item name="unchecked" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
new file mode 100644
index 0000000000..bb4e6fc0cb
--- /dev/null
+++ b/doc/classes/CheckButton.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CheckButton" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Checkable button.
+ </brief_description>
+ <description>
+ CheckButton is a toggle button displayed as a check field.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="check_vadjust" type="int">
+ </theme_item>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="off" type="Texture">
+ </theme_item>
+ <theme_item name="on" type="Texture">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
new file mode 100644
index 0000000000..1ed54f0705
--- /dev/null
+++ b/doc/classes/CircleShape2D.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Circular shape for 2D collisions.
+ </brief_description>
+ <description>
+ Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the radius of the circle shape.
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ Set the radius of the circle shape.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The circle's radius.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
new file mode 100644
index 0000000000..35cf819959
--- /dev/null
+++ b/doc/classes/ClassDB.xml
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ClassDB" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class information repository.
+ </brief_description>
+ <description>
+ Provides access to metadata stored for every available class.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="can_instance" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Returns true if you can instance objects from the specified 'class', false in other case.
+ </description>
+ </method>
+ <method name="class_exists" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Returns whether the specified 'class' is available or not.
+ </description>
+ </method>
+ <method name="class_get_category" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="class_get_integer_constant" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ Returns the value of the integer constant 'name' of 'class' or its ancestry. Always returns 0 when the constant could not be found.
+ </description>
+ </method>
+ <method name="class_get_integer_constant_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="no_inheritance" type="bool" default="false">
+ </argument>
+ <description>
+ Returns an array with the names all the integer constants of 'class' or its ancestry.
+ </description>
+ </method>
+ <method name="class_get_method_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="no_inheritance" type="bool" default="false">
+ </argument>
+ <description>
+ Returns an array with all the methods of 'class' or its ancestry if 'no_inheritance' is false. Every element of the array is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage).
+ </description>
+ </method>
+ <method name="class_get_property" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <description>
+ Returns the value of 'property' of 'class' or its ancestry.
+ </description>
+ </method>
+ <method name="class_get_property_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="no_inheritance" type="bool" default="false">
+ </argument>
+ <description>
+ Returns an array with all the properties of 'class' or its ancestry if 'no_inheritance' is false.
+ </description>
+ </method>
+ <method name="class_get_signal" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="signal" type="String">
+ </argument>
+ <description>
+ Returns the 'signal' data of 'class' or its ancestry. The returned value is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage).
+ </description>
+ </method>
+ <method name="class_get_signal_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="no_inheritance" type="bool" default="false">
+ </argument>
+ <description>
+ Returns an array with all the signals of 'class' or its ancestry if 'no_inheritance' is false. Every element of the array is a [Dictionary] as described in [class_get_signal].
+ </description>
+ </method>
+ <method name="class_has_integer_constant" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ Return whether 'class' or its ancestry has an integer constant called 'name' or not.
+ </description>
+ </method>
+ <method name="class_has_method" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <argument index="2" name="no_inheritance" type="bool" default="false">
+ </argument>
+ <description>
+ Return whether 'class' (or its ancestry if 'no_inheritance' is false) has a method called 'method' or not.
+ </description>
+ </method>
+ <method name="class_has_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="signal" type="String">
+ </argument>
+ <description>
+ Return whether 'class' or its ancestry has a signal called 'signal' or not.
+ </description>
+ </method>
+ <method name="class_set_property" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Sets 'property' value of 'class' to 'value'.
+ </description>
+ </method>
+ <method name="get_class_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Returns the names of all the classes available.
+ </description>
+ </method>
+ <method name="get_inheriters_from_class" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Returns the names of all the classes that directly or indirectly inherit from 'class'.
+ </description>
+ </method>
+ <method name="get_parent_class" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Returns the parent class of 'class'.
+ </description>
+ </method>
+ <method name="instance" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Creates an instance of 'class'.
+ </description>
+ </method>
+ <method name="is_class_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <description>
+ Returns whether this class is enabled or not.
+ </description>
+ </method>
+ <method name="is_parent_class" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="class" type="String">
+ </argument>
+ <argument index="1" name="inherits" type="String">
+ </argument>
+ <description>
+ Returns whether 'inherits' is an ancestor of 'class' or not.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml
new file mode 100644
index 0000000000..791978993c
--- /dev/null
+++ b/doc/classes/CollisionObject.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionObject" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="Object">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <argument index="2" name="click_pos" type="Vector3">
+ </argument>
+ <argument index="3" name="click_normal" type="Vector3">
+ </argument>
+ <argument index="4" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_shape_owner">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner" type="Object">
+ </argument>
+ <description>
+ Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use.
+ </description>
+ </method>
+ <method name="get_capture_input_on_drag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shape_owners">
+ <return type="Array">
+ </return>
+ <description>
+ Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
+ </description>
+ </method>
+ <method name="is_ray_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_owner_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_shape_owner">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_capture_input_on_drag">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ray_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="ray_pickable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_find_owner" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape" type="Shape">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Will remove all the shapes associated with given owner.
+ </description>
+ </method>
+ <method name="shape_owner_get_owner" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_shape" qualifiers="const">
+ <return type="Shape">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
+ </description>
+ </method>
+ <method name="shape_owner_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Returns number of shapes to which given owner is associated to.
+ </description>
+ </method>
+ <method name="shape_owner_get_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Will return [Transform] of an owner node.
+ </description>
+ </method>
+ <method name="shape_owner_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ Removes related shape from the owner.
+ </description>
+ </method>
+ <method name="shape_owner_set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag">
+ </member>
+ <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable">
+ </member>
+ </members>
+ <signals>
+ <signal name="input_event">
+ <argument index="0" name="camera" type="Object">
+ </argument>
+ <argument index="1" name="event" type="Object">
+ </argument>
+ <argument index="2" name="click_pos" type="Vector3">
+ </argument>
+ <argument index="3" name="click_normal" type="Vector3">
+ </argument>
+ <argument index="4" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_entered">
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_exited">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
new file mode 100644
index 0000000000..db1412805f
--- /dev/null
+++ b/doc/classes/CollisionObject2D.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base node for 2D collisionables.
+ </brief_description>
+ <description>
+ CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="Object">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <argument index="2" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_shape_owner">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner" type="Object">
+ </argument>
+ <description>
+ Creates new holder for the shapes. Argument is a [CollisionShape2D] node. It will return owner_id which usually you will want to save for later use.
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return the RID of this object.
+ </description>
+ </method>
+ <method name="get_shape_owners">
+ <return type="Array">
+ </return>
+ <description>
+ Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
+ </description>
+ </method>
+ <method name="is_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this object is pickable.
+ </description>
+ </method>
+ <method name="is_shape_owner_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_shape_owner">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
+ </description>
+ </method>
+ <method name="shape_find_owner" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Will remove all the shapes associated with given owner.
+ </description>
+ </method>
+ <method name="shape_owner_get_owner" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
+ </description>
+ </method>
+ <method name="shape_owner_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Returns number of shapes to which given owner is associated to.
+ </description>
+ </method>
+ <method name="shape_owner_get_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ Will return [Transform2D] of an owner node.
+ </description>
+ </method>
+ <method name="shape_owner_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ Removes related shape from the owner.
+ </description>
+ </method>
+ <method name="shape_owner_set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_set_one_way_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable">
+ </member>
+ </members>
+ <signals>
+ <signal name="input_event">
+ <argument index="0" name="viewport" type="Object">
+ </argument>
+ <argument index="1" name="event" type="Object">
+ </argument>
+ <argument index="2" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_entered">
+ <description>
+ This event fires only once when the mouse pointer enters any shape of this object.
+ </description>
+ </signal>
+ <signal name="mouse_exited">
+ <description>
+ This event fires only once when the mouse pointer exits all shapes of this object.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
new file mode 100644
index 0000000000..c2496424d6
--- /dev/null
+++ b/doc/classes/CollisionPolygon.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Editor-only class for defining a collision polygon in 3D space.
+ </brief_description>
+ <description>
+ Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_depth" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="depth" type="float" setter="set_depth" getter="get_depth">
+ Length that the resulting collision extends in either direction perpendicular to its polygon.
+ </member>
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If true, no collision will be produced.
+ </member>
+ <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ Array of vertices which define the polygon.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
new file mode 100644
index 0000000000..d3dee1e9bb
--- /dev/null
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Editor-only class for defining a collision polygon in 2D space.
+ </brief_description>
+ <description>
+ Allows editing a collision polygon's vertices. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape2D] for gameplay. Properties modified during gameplay will have no effect.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_build_mode" qualifiers="const">
+ <return type="int" enum="CollisionPolygon2D.BuildMode">
+ </return>
+ <description>
+ Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
+ </description>
+ </method>
+ <method name="get_polygon" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Return the list of points that define the polygon.
+ </description>
+ </method>
+ <method name="is_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_one_way_collision_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_build_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="build_mode" type="int" enum="CollisionPolygon2D.BuildMode">
+ </argument>
+ <description>
+ Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
+ </description>
+ </method>
+ <method name="set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_one_way_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolVector2Array">
+ </argument>
+ <description>
+ Set the array of points forming the polygon.
+ When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode">
+ If BUILD_SOLIDS, the polygon and the area within it will have collision. If BUILD_SEGMENTS, only the edges of the polygon will have collision.
+ </member>
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If true, no collision will be produced.
+ </member>
+ <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled">
+ If true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
+ </member>
+ <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ Array of vertices which define the polygon.
+ </member>
+ </members>
+ <constants>
+ <constant name="BUILD_SOLIDS" value="0">
+ </constant>
+ <constant name="BUILD_SEGMENTS" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml
new file mode 100644
index 0000000000..6e98d2f979
--- /dev/null
+++ b/doc/classes/CollisionShape.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionShape" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node that represents collision shape data in 3D space.
+ </brief_description>
+ <description>
+ Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_shape" qualifiers="const">
+ <return type="Shape">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_convex_from_brothers">
+ <return type="void">
+ </return>
+ <description>
+ Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
+ </description>
+ </method>
+ <method name="resource_changed">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ If this method exists within a script it will be called whenever the shape resource has been modified.
+ </description>
+ </method>
+ <method name="set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ A disabled collision shape has no effect in the world.
+ </member>
+ <member name="shape" type="Shape" setter="set_shape" getter="get_shape">
+ The actual shape owned by this collision shape.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
new file mode 100644
index 0000000000..cefa0c1c81
--- /dev/null
+++ b/doc/classes/CollisionShape2D.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node that represents collision shape data in 2D space.
+ </brief_description>
+ <description>
+ Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_one_way_collision_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_one_way_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ A disabled collision shape has no effect in the world.
+ </member>
+ <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled">
+ Sets whether this collision shape should only detect collision on one side (top or bottom).
+ </member>
+ <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
+ The actual shape owned by this collision shape.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
new file mode 100644
index 0000000000..4547771b63
--- /dev/null
+++ b/doc/classes/Color.xml
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Color" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Color in RGBA format with some support for ARGB format.
+ </brief_description>
+ <description>
+ A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values &gt; 1.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="r" type="float">
+ </argument>
+ <argument index="1" name="g" type="float">
+ </argument>
+ <argument index="2" name="b" type="float">
+ </argument>
+ <argument index="3" name="a" type="float">
+ </argument>
+ <description>
+ Constructs a color from an RGBA profile using values between 0 and 1 (float).
+ [codeblock]
+ var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="Color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="r" type="float">
+ </argument>
+ <argument index="1" name="g" type="float">
+ </argument>
+ <argument index="2" name="b" type="float">
+ </argument>
+ <description>
+ Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1.
+ [codeblock]
+ var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="Color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <description>
+ Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile).
+ [codeblock]
+ var c = Color(274) # a color of an RGBA(0, 0, 1, 18)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="Color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format.
+ The following string formats are supported:
+ [code]"#ff00ff00"[/code] - ARGB format with '#'
+ [code]"ff00ff00"[/code] - ARGB format
+ [code]"#ff00ff"[/code] - RGB format with '#'
+ [code]"ff00ff"[/code] - RGB format
+ [codeblock]
+ # The following code creates the same color of an RGBA(178, 217, 10, 255)
+ var c1 = Color("#ffb2d90a") # ARGB format with '#'
+ var c2 = Color("ffb2d90a") # ARGB format
+ var c3 = Color("#b2d90a") # RGB format with '#'
+ var c4 = Color("b2d90a") # RGB format
+ [/codeblock]
+ </description>
+ </method>
+ <method name="blend">
+ <return type="Color">
+ </return>
+ <argument index="0" name="over" type="Color">
+ </argument>
+ <description>
+ Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values.
+ [codeblock]
+ var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
+ var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50%
+ var blendedColor = bg.blend(fg) # Brown with alpha of 75%
+ [/codeblock]
+ </description>
+ </method>
+ <method name="contrasted">
+ <return type="Color">
+ </return>
+ <description>
+ Returns the most contrasting color.
+ [codeblock]
+ var c = Color(.3, .4, .9)
+ var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="gray">
+ <return type="float">
+ </return>
+ <description>
+ Returns the color's grayscale.
+ The gray is calculated by (r + g + b) / 3.
+ [codeblock]
+ var c = Color(0.2, 0.45, 0.82)
+ var gray = c.gray() # a value of 0.466667
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inverted">
+ <return type="Color">
+ </return>
+ <description>
+ Returns the inverted color (1-r, 1-g, 1-b, 1-a).
+ [codeblock]
+ var c = Color(.3, .4, .9)
+ var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="linear_interpolate">
+ <return type="Color">
+ </return>
+ <argument index="0" name="b" type="Color">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float).
+ [codeblock]
+ var c1 = Color(1.0, 0.0, 0.0)
+ var c2 = Color(0.0, 1.0, 0.0)
+ var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_argb32">
+ <return type="int">
+ </return>
+ <description>
+ Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX.
+ [codeblock]
+ var c = Color(1, .5, .2)
+ print(str(c.to_32())) # prints 4294934323
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_html">
+ <return type="String">
+ </return>
+ <argument index="0" name="with_alpha" type="bool" default="True">
+ </argument>
+ <description>
+ Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]).
+ Optionally flag 'false' to not include alpha in hexadecimal string.
+ [codeblock]
+ var c = Color(1, 1, 1, .5)
+ var s1 = c.to_html() # Results "7fffffff"
+ var s2 = c.to_html(false) # Results 'ffffff'
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_rgba32">
+ <return type="int">
+ </return>
+ <description>
+ Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile).
+ [codeblock]
+ var c = Color(1, .5, .2)
+ print(str(c.to_32())) # prints 4294934323
+ [/codeblock]
+
+ [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="a" type="float" setter="" getter="">
+ Alpha (0 to 1)
+ </member>
+ <member name="a8" type="int" setter="" getter="">
+ Alpha (0 to 255)
+ </member>
+ <member name="b" type="float" setter="" getter="">
+ Blue (0 to 1)
+ </member>
+ <member name="b8" type="int" setter="" getter="">
+ Blue (0 to 255)
+ </member>
+ <member name="g" type="float" setter="" getter="">
+ Green (0 to 1)
+ </member>
+ <member name="g8" type="int" setter="" getter="">
+ Green (0 to 255)
+ </member>
+ <member name="h" type="float" setter="" getter="">
+ Hue (0 to 1)
+ </member>
+ <member name="r" type="float" setter="" getter="">
+ Red (0 to 1)
+ </member>
+ <member name="r8" type="int" setter="" getter="">
+ Red (0 to 255)
+ </member>
+ <member name="s" type="float" setter="" getter="">
+ Saturation (0 to 1)
+ </member>
+ <member name="v" type="float" setter="" getter="">
+ Value (0 to 1)
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
new file mode 100644
index 0000000000..87414eb03a
--- /dev/null
+++ b/doc/classes/ColorPicker.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Color picker control.
+ </brief_description>
+ <description>
+ This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_preset">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.
+ </description>
+ </method>
+ <method name="get_pick_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Gets the current color.
+ </description>
+ </method>
+ <method name="is_editing_alpha" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the color has transparency or not.
+ </description>
+ </method>
+ <method name="is_raw_mode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR).
+ </description>
+ </method>
+ <method name="set_edit_alpha">
+ <return type="void">
+ </return>
+ <argument index="0" name="show" type="bool">
+ </argument>
+ <description>
+ Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color.
+ </description>
+ </method>
+ <method name="set_pick_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Select the current color.
+ </description>
+ </method>
+ <method name="set_raw_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="bool">
+ </argument>
+ <description>
+ Set whether this color picker is using raw mode or not, see [method is_raw_mode].
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="color_changed">
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Emitted when the color is changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="add_preset" type="Texture">
+ </theme_item>
+ <theme_item name="color_hue" type="Texture">
+ </theme_item>
+ <theme_item name="color_sample" type="Texture">
+ </theme_item>
+ <theme_item name="h_width" type="int">
+ </theme_item>
+ <theme_item name="label_width" type="int">
+ </theme_item>
+ <theme_item name="margin" type="int">
+ </theme_item>
+ <theme_item name="screen_picker" type="Texture">
+ </theme_item>
+ <theme_item name="sv_height" type="int">
+ </theme_item>
+ <theme_item name="sv_width" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
new file mode 100644
index 0000000000..59b74edd77
--- /dev/null
+++ b/doc/classes/ColorPickerButton.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ColorPickerButton" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Button that pops out a [ColorPicker]
+ </brief_description>
+ <description>
+ Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_pick_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_picker">
+ <return type="ColorPicker">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_editing_alpha" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ See [method ColorPicker.is_edit_alpha]
+ </description>
+ </method>
+ <method name="set_edit_alpha">
+ <return type="void">
+ </return>
+ <argument index="0" name="show" type="bool">
+ </argument>
+ <description>
+ See [method ColorPicker.set_edit_alpha]
+ </description>
+ </method>
+ <method name="set_pick_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set new color to ColorRect.
+
+ [codeblock]
+ var cr = get_node("colorrect_node")
+ cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color">
+ </member>
+ <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha">
+ </member>
+ </members>
+ <signals>
+ <signal name="color_changed">
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Emitted when the color is changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
new file mode 100644
index 0000000000..90e88603b0
--- /dev/null
+++ b/doc/classes/ColorRect.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ColorRect" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Colored rect for canvas.
+ </brief_description>
+ <description>
+ An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_frame_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Return the color in RGBA format.
+ [codeblock]
+ var cr = get_node("colorrect_node")
+ var c = cr.get_frame_color() # Default color is white
+ [/codeblock]
+ </description>
+ </method>
+ <method name="set_frame_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set new color to ColorRect.
+ [codeblock]
+ var cr = get_node("colorrect_node")
+ cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml
new file mode 100644
index 0000000000..0b1cbf9c21
--- /dev/null
+++ b/doc/classes/ConcavePolygonShape.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Concave polygon shape.
+ </brief_description>
+ <description>
+ Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_faces" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ Return the faces (an array of triangles).
+ </description>
+ </method>
+ <method name="set_faces">
+ <return type="void">
+ </return>
+ <argument index="0" name="faces" type="PoolVector3Array">
+ </argument>
+ <description>
+ Set the faces (an array of triangles).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
new file mode 100644
index 0000000000..018d64b643
--- /dev/null
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Concave polygon 2D shape resource for physics.
+ </brief_description>
+ <description>
+ Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_segments" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Return the array of segments.
+ </description>
+ </method>
+ <method name="set_segments">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="PoolVector2Array">
+ </argument>
+ <description>
+ Set the array of segments.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml
new file mode 100644
index 0000000000..67c7cc4cfe
--- /dev/null
+++ b/doc/classes/ConeTwistJoint.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="relaxation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span">
+ </member>
+ <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_SWING_SPAN" value="0">
+ </constant>
+ <constant name="PARAM_TWIST_SPAN" value="1">
+ </constant>
+ <constant name="PARAM_BIAS" value="2">
+ </constant>
+ <constant name="PARAM_SOFTNESS" value="3">
+ </constant>
+ <constant name="PARAM_RELAXATION" value="4">
+ </constant>
+ <constant name="PARAM_MAX" value="5">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
new file mode 100644
index 0000000000..c2d1ec1355
--- /dev/null
+++ b/doc/classes/ConfigFile.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConfigFile" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Helper class to handle INI-style files.
+ </brief_description>
+ <description>
+ This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem.
+ The following example shows how to parse a INI-style file from the system, read its contents and store new values in it:
+ [codeblock]
+ var config = ConfigFile.new()
+ var err = config.load("user://settings.cfg")
+ if err == OK: # if not, something went wrong with the file loading
+ # Look for the display/width pair, and default to 1024 if missing
+ var screen_width = get_value("display", "width", 1024)
+ # Store a variable if and only it hasn't been defined yet
+ if not config.has_section_key("audio", "mute"):
+ config.set_value("audio", "mute", false)
+ # Save the changes by overwriting the previous file
+ config.save("user://settings.cfg")
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="erase_section">
+ <return type="void">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_section_keys" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <description>
+ Return an array of all defined key identifiers in the specified section.
+ </description>
+ </method>
+ <method name="get_sections" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return an array of all defined section identifiers.
+ </description>
+ </method>
+ <method name="get_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <argument index="2" name="default" type="Variant" default="null">
+ </argument>
+ <description>
+ Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified).
+ </description>
+ </method>
+ <method name="has_section" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <description>
+ Check if the specified section exists.
+ </description>
+ </method>
+ <method name="has_section_key" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <description>
+ Check if the specified section-key pair exists.
+ </description>
+ </method>
+ <method name="load">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK).
+ </description>
+ </method>
+ <method name="save">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure.
+ The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK).
+ </description>
+ </method>
+ <method name="set_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="section" type="String">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
new file mode 100644
index 0000000000..84de287519
--- /dev/null
+++ b/doc/classes/ConfirmationDialog.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Dialog for confirmation of actions.
+ </brief_description>
+ <description>
+ Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cancel">
+ <return type="Button">
+ </return>
+ <description>
+ Return the cancel button.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
new file mode 100644
index 0000000000..844c17a1d9
--- /dev/null
+++ b/doc/classes/Container.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Container" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base node for containers.
+ </brief_description>
+ <description>
+ Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way.
+ A Control can inherit this to create custom container classes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="fit_child_in_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="child" type="Control">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
+ </description>
+ </method>
+ <method name="queue_sort">
+ <return type="void">
+ </return>
+ <description>
+ Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="sort_children">
+ <description>
+ Emitted when sorting the children is needed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_SORT_CHILDREN" value="50" enum="">
+ Notification for when sorting the children, it must be obeyed immediately.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
new file mode 100644
index 0000000000..5d77f3a450
--- /dev/null
+++ b/doc/classes/Control.xml
@@ -0,0 +1,1062 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Control" inherits="CanvasItem" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base node for all User Interface components.
+ </brief_description>
+ <description>
+ The base class Node for all User Interface components. Every UI node inherits from it. Any scene or portion of a scene tree composed of Control nodes is a User Interface.
+ Controls use anchors and margins to place themselves relative to their parent. They adapt automatically when their parent or the screen size changes. To build flexible UIs, use built-in [Container] nodes or create your own.
+ Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range.
+ Godot sends Input events to the root node first, via [method Node._input]. The method distributes it through the node tree and delivers the input events to the node under the mouse cursor or on focus with the keyboard. To do so, it calls [method MainLoop._input_event]. No need to enable [method Node.set_process_input] on Controls to receive input events. Call [method accept_event] to ensure no other node receives the event, not even [method Node._unhandled_input].
+ Only the one Control node in focus receives keyboard events. To do so, the Control must get the focus mode with [method set_focus_mode]. It loses focus when another Control gets it, or if the current Control in focus is hidden.
+ You'll sometimes want Controls to ignore mouse or touch events. For example, if you place an icon on top of a button. Call [method set_ignore_mouse] for that.
+ [Theme] resources change the Control's appearance. If you change the [Theme] on a parent Control node, it will propagate to all of its children. You can override parts of the theme on each Control with the add_*_override methods, like [method add_font_override]. You can also override the theme from the editor.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_get_minimum_size" qualifiers="virtual">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
+ </description>
+ </method>
+ <method name="_gui_input" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="accept_event">
+ <return type="void">
+ </return>
+ <description>
+ Marks the input event as handled. No other Control will receive it, and the input event will not propagate. Not even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
+ </description>
+ </method>
+ <method name="add_color_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_constant_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="constant" type="int">
+ </argument>
+ <description>
+ Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
+ </description>
+ </method>
+ <method name="add_font_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="font" type="Font">
+ </argument>
+ <description>
+ Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
+ </description>
+ </method>
+ <method name="add_icon_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared.
+ </description>
+ </method>
+ <method name="add_shader_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="shader" type="Shader">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_style_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="stylebox" type="StyleBox">
+ </argument>
+ <description>
+ Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared.
+ </description>
+ </method>
+ <method name="can_drop_data" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="drop_data" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="force_drag">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="Variant">
+ </argument>
+ <argument index="1" name="preview" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_anchor" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
+ </description>
+ </method>
+ <method name="get_begin" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_combined_minimum_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_constant" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_cursor_shape" qualifiers="const">
+ <return type="int" enum="Control.CursorShape">
+ </return>
+ <argument index="0" name="pos" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ Return the cursor shape at a certain position in the control.
+ </description>
+ </method>
+ <method name="get_custom_minimum_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_default_cursor_shape" qualifiers="const">
+ <return type="int" enum="Control.CursorShape">
+ </return>
+ <description>
+ Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
+ </description>
+ </method>
+ <method name="get_drag_data" qualifiers="virtual">
+ <return type="Object">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_end" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
+ </description>
+ </method>
+ <method name="get_focus_mode" qualifiers="const">
+ <return type="int" enum="Control.FocusMode">
+ </return>
+ <description>
+ Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]).
+ </description>
+ </method>
+ <method name="get_focus_neighbour" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
+ </description>
+ </method>
+ <method name="get_focus_owner" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Return which control is owning the keyboard focus, or null if no one.
+ </description>
+ </method>
+ <method name="get_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_global_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
+ </description>
+ </method>
+ <method name="get_global_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_position], [method get_size]).
+ </description>
+ </method>
+ <method name="get_h_grow_direction" qualifiers="const">
+ <return type="int" enum="Control.GrowDirection">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_h_size_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Hint for containers, return horizontal positioning flags.
+ </description>
+ </method>
+ <method name="get_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
+ </description>
+ </method>
+ <method name="get_minimum_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
+ </description>
+ </method>
+ <method name="get_mouse_filter" qualifiers="const">
+ <return type="int" enum="Control.MouseFilter">
+ </return>
+ <description>
+ Return when the control is ignoring mouse events (even touchpad events send mouse events).
+ </description>
+ </method>
+ <method name="get_parent_area_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_parent_control" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pivot_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
+ </description>
+ </method>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_position], [method get_size]).
+ </description>
+ </method>
+ <method name="get_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the rotation (in radians)
+ </description>
+ </method>
+ <method name="get_rotation_deg" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the rotation (in degrees)
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by[/b] [method get_minimum_size]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
+ </description>
+ </method>
+ <method name="get_stretch_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
+ </description>
+ </method>
+ <method name="get_stylebox" qualifiers="const">
+ <return type="StyleBox">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme" qualifiers="const">
+ <return type="Theme">
+ </return>
+ <description>
+ Return a [Theme] override, if one exists (see [method set_theme]).
+ </description>
+ </method>
+ <method name="get_tooltip" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="atpos" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ Return the tooltip, which will appear when the cursor is resting over this control.
+ </description>
+ </method>
+ <method name="get_v_grow_direction" qualifiers="const">
+ <return type="int" enum="Control.GrowDirection">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_size_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Hint for containers, return vertical positioning flags.
+ </description>
+ </method>
+ <method name="grab_click_focus">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="grab_focus">
+ <return type="void">
+ </return>
+ <description>
+ Steal the focus from another control and become the focused control (see [method set_focus_mode]).
+ </description>
+ </method>
+ <method name="has_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_color_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_constant" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_constant_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_focus" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the Control is the current focused control (see [method set_focus_mode]).
+ </description>
+ </method>
+ <method name="has_font" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_font_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_icon" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_icon_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_point" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_stylebox" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_stylebox_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_clipping_contents">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="minimum_size_changed">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="release_focus">
+ <return type="void">
+ </return>
+ <description>
+ Give up the focus, no other control will be able to receive keyboard input.
+ </description>
+ </method>
+ <method name="set_anchor">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="anchor" type="float">
+ </argument>
+ <argument index="2" name="keep_margin" type="bool" default="false">
+ </argument>
+ <argument index="3" name="push_opposite_anchor" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anchor_and_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="anchor" type="float">
+ </argument>
+ <argument index="2" name="offset" type="float">
+ </argument>
+ <argument index="3" name="push_opposite_anchor" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anchors_preset">
+ <return type="void">
+ </return>
+ <argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
+ </argument>
+ <argument index="1" name="keep_margin" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_area_as_parent_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" default="0">
+ </argument>
+ <description>
+ Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]).
+ </description>
+ </method>
+ <method name="set_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
+ </description>
+ </method>
+ <method name="set_clip_contents">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_minimum_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_default_cursor_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="int" enum="Control.CursorShape">
+ </argument>
+ <description>
+ Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
+ </description>
+ </method>
+ <method name="set_drag_forwarding">
+ <return type="void">
+ </return>
+ <argument index="0" name="target" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_drag_preview">
+ <return type="void">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_end">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]).
+ </description>
+ </method>
+ <method name="set_focus_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Control.FocusMode">
+ </argument>
+ <description>
+ Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
+ </description>
+ </method>
+ <method name="set_focus_neighbour">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="neighbour" type="NodePath">
+ </argument>
+ <description>
+ Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
+ </description>
+ </method>
+ <method name="set_global_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]).
+ </description>
+ </method>
+ <method name="set_h_grow_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_size_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ Hint for containers, set horizontal positioning flags.
+ </description>
+ </method>
+ <method name="set_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="offset" type="float">
+ </argument>
+ <description>
+ Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode.
+ </description>
+ </method>
+ <method name="set_mouse_filter">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="int" enum="Control.MouseFilter">
+ </argument>
+ <description>
+ Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants)
+ </description>
+ </method>
+ <method name="set_pivot_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="pivot_offset" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]).
+ </description>
+ </method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Set the rotation (in radians).
+ </description>
+ </method>
+ <method name="set_rotation_deg">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ Set the rotation (in degrees).
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]).
+ </description>
+ </method>
+ <method name="set_stretch_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big.
+ </description>
+ </method>
+ <method name="set_theme">
+ <return type="void">
+ </return>
+ <argument index="0" name="theme" type="Theme">
+ </argument>
+ <description>
+ Override whole the [Theme] for this Control and all its children controls.
+ </description>
+ </method>
+ <method name="set_tooltip">
+ <return type="void">
+ </return>
+ <argument index="0" name="tooltip" type="String">
+ </argument>
+ <description>
+ Set a tooltip, which will appear when the cursor is resting over this control.
+ </description>
+ </method>
+ <method name="set_v_grow_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_size_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ Hint for containers, set vertical positioning flags.
+ </description>
+ </method>
+ <method name="show_modal">
+ <return type="void">
+ </return>
+ <argument index="0" name="exclusive" type="bool" default="false">
+ </argument>
+ <description>
+ Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.
+ </description>
+ </method>
+ <method name="warp_mouse">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor">
+ </member>
+ <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor">
+ </member>
+ <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor">
+ </member>
+ <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor">
+ </member>
+ <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour">
+ </member>
+ <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour">
+ </member>
+ <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour">
+ </member>
+ <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour">
+ </member>
+ <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection">
+ </member>
+ <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection">
+ </member>
+ <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip">
+ </member>
+ <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin">
+ </member>
+ <member name="margin_left" type="float" setter="set_margin" getter="get_margin">
+ </member>
+ <member name="margin_right" type="float" setter="set_margin" getter="get_margin">
+ </member>
+ <member name="margin_top" type="float" setter="set_margin" getter="get_margin">
+ </member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter">
+ </member>
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents">
+ </member>
+ <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size">
+ </member>
+ <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset">
+ </member>
+ <member name="rect_position" type="Vector2" setter="set_position" getter="get_position">
+ </member>
+ <member name="rect_rotation" type="float" setter="set_rotation_deg" getter="get_rotation_deg">
+ </member>
+ <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale">
+ </member>
+ <member name="rect_size" type="Vector2" setter="set_size" getter="get_size">
+ </member>
+ <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags">
+ </member>
+ <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio">
+ </member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags">
+ </member>
+ <member name="theme" type="Theme" setter="set_theme" getter="get_theme">
+ </member>
+ </members>
+ <signals>
+ <signal name="focus_entered">
+ <description>
+ Emitted when the node gains keyboard focus.
+ </description>
+ </signal>
+ <signal name="focus_exited">
+ <description>
+ Emitted when the node loses keyboard focus.
+ </description>
+ </signal>
+ <signal name="gui_input">
+ <argument index="0" name="ev" type="Object">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="minimum_size_changed">
+ <description>
+ Emitted when the node's minimum size changes.
+ </description>
+ </signal>
+ <signal name="modal_closed">
+ <description>
+ </description>
+ </signal>
+ <signal name="mouse_entered">
+ <description>
+ Emitted when the mouse enters the control's area.
+ </description>
+ </signal>
+ <signal name="mouse_exited">
+ <description>
+ Emitted when the mouse leaves the control's area.
+ </description>
+ </signal>
+ <signal name="resized">
+ <description>
+ Emitted when the control changes size.
+ </description>
+ </signal>
+ <signal name="size_flags_changed">
+ <description>
+ Emitted when the size flags change.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="FOCUS_NONE" value="0">
+ Control can't acquire focus.
+ </constant>
+ <constant name="FOCUS_CLICK" value="1">
+ Control can acquire focus only if clicked.
+ </constant>
+ <constant name="FOCUS_ALL" value="2">
+ Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control.
+ </constant>
+ <constant name="NOTIFICATION_RESIZED" value="40" enum="">
+ Control changed size (get_size() reports the new size).
+ </constant>
+ <constant name="NOTIFICATION_MOUSE_ENTER" value="41" enum="">
+ Mouse pointer entered the area of the Control.
+ </constant>
+ <constant name="NOTIFICATION_MOUSE_EXIT" value="42" enum="">
+ Mouse pointer exited the area of the Control.
+ </constant>
+ <constant name="NOTIFICATION_FOCUS_ENTER" value="43" enum="">
+ Control gained focus.
+ </constant>
+ <constant name="NOTIFICATION_FOCUS_EXIT" value="44" enum="">
+ Control lost focus.
+ </constant>
+ <constant name="NOTIFICATION_THEME_CHANGED" value="45" enum="">
+ Theme changed. Redrawing is desired.
+ </constant>
+ <constant name="NOTIFICATION_MODAL_CLOSE" value="46" enum="">
+ Modal control was closed.
+ </constant>
+ <constant name="CURSOR_ARROW" value="0">
+ </constant>
+ <constant name="CURSOR_IBEAM" value="1">
+ </constant>
+ <constant name="CURSOR_POINTING_HAND" value="2">
+ </constant>
+ <constant name="CURSOR_CROSS" value="3">
+ </constant>
+ <constant name="CURSOR_WAIT" value="4">
+ </constant>
+ <constant name="CURSOR_BUSY" value="5">
+ </constant>
+ <constant name="CURSOR_DRAG" value="6">
+ </constant>
+ <constant name="CURSOR_CAN_DROP" value="7">
+ </constant>
+ <constant name="CURSOR_FORBIDDEN" value="8">
+ </constant>
+ <constant name="CURSOR_VSIZE" value="9">
+ </constant>
+ <constant name="CURSOR_HSIZE" value="10">
+ </constant>
+ <constant name="CURSOR_BDIAGSIZE" value="11">
+ </constant>
+ <constant name="CURSOR_FDIAGSIZE" value="12">
+ </constant>
+ <constant name="CURSOR_MOVE" value="13">
+ </constant>
+ <constant name="CURSOR_VSPLIT" value="14">
+ </constant>
+ <constant name="CURSOR_HSPLIT" value="15">
+ </constant>
+ <constant name="CURSOR_HELP" value="16">
+ </constant>
+ <constant name="PRESET_TOP_LEFT" value="0">
+ </constant>
+ <constant name="PRESET_TOP_RIGHT" value="1">
+ </constant>
+ <constant name="PRESET_BOTTOM_LEFT" value="2">
+ </constant>
+ <constant name="PRESET_BOTTOM_RIGHT" value="3">
+ </constant>
+ <constant name="PRESET_CENTER_LEFT" value="4">
+ </constant>
+ <constant name="PRESET_CENTER_TOP" value="5">
+ </constant>
+ <constant name="PRESET_CENTER_RIGHT" value="6">
+ </constant>
+ <constant name="PRESET_CENTER_BOTTOM" value="7">
+ </constant>
+ <constant name="PRESET_CENTER" value="8">
+ </constant>
+ <constant name="PRESET_LEFT_WIDE" value="9">
+ </constant>
+ <constant name="PRESET_TOP_WIDE" value="10">
+ </constant>
+ <constant name="PRESET_RIGHT_WIDE" value="11">
+ </constant>
+ <constant name="PRESET_BOTTOM_WIDE" value="12">
+ </constant>
+ <constant name="PRESET_VCENTER_WIDE" value="13">
+ </constant>
+ <constant name="PRESET_HCENTER_WIDE" value="14">
+ </constant>
+ <constant name="PRESET_WIDE" value="15">
+ </constant>
+ <constant name="SIZE_EXPAND" value="2">
+ </constant>
+ <constant name="SIZE_FILL" value="1">
+ </constant>
+ <constant name="SIZE_EXPAND_FILL" value="3">
+ </constant>
+ <constant name="SIZE_SHRINK_CENTER" value="4">
+ </constant>
+ <constant name="SIZE_SHRINK_END" value="8">
+ </constant>
+ <constant name="MOUSE_FILTER_STOP" value="0">
+ </constant>
+ <constant name="MOUSE_FILTER_PASS" value="1">
+ </constant>
+ <constant name="MOUSE_FILTER_IGNORE" value="2">
+ </constant>
+ <constant name="GROW_DIRECTION_BEGIN" value="0">
+ </constant>
+ <constant name="GROW_DIRECTION_END" value="1">
+ </constant>
+ <constant name="ANCHOR_BEGIN" value="0">
+ X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP.
+ </constant>
+ <constant name="ANCHOR_END" value="1">
+ X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml
new file mode 100644
index 0000000000..9a7cb0d475
--- /dev/null
+++ b/doc/classes/ConvexPolygonShape.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Convex Polygon Shape.
+ </brief_description>
+ <description>
+ Convex polygon shape resource, which can be set into a [PhysicsBody] or area.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_points" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector3Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
new file mode 100644
index 0000000000..c5b6d90041
--- /dev/null
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Convex Polygon Shape for 2D physics.
+ </brief_description>
+ <description>
+ Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_points" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
+ </description>
+ </method>
+ <method name="set_point_cloud">
+ <return type="void">
+ </return>
+ <argument index="0" name="point_cloud" type="PoolVector2Array">
+ </argument>
+ <description>
+ Currently, this method does nothing.
+ </description>
+ </method>
+ <method name="set_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <description>
+ Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
new file mode 100644
index 0000000000..ac2ff3fc57
--- /dev/null
+++ b/doc/classes/CubeMap.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CubeMap" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lossy_storage_quality" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_side" qualifiers="const">
+ <return type="Image">
+ </return>
+ <argument index="0" name="side" type="int" enum="CubeMap.Side">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_storage" qualifiers="const">
+ <return type="int" enum="CubeMap.Storage">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lossy_storage_quality">
+ <return type="void">
+ </return>
+ <argument index="0" name="quality" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_side">
+ <return type="void">
+ </return>
+ <argument index="0" name="side" type="int" enum="CubeMap.Side">
+ </argument>
+ <argument index="1" name="image" type="Image">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_storage">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="CubeMap.Storage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STORAGE_RAW" value="0">
+ </constant>
+ <constant name="STORAGE_COMPRESS_LOSSY" value="1">
+ </constant>
+ <constant name="STORAGE_COMPRESS_LOSSLESS" value="2">
+ </constant>
+ <constant name="SIDE_LEFT" value="0">
+ </constant>
+ <constant name="SIDE_RIGHT" value="1">
+ </constant>
+ <constant name="SIDE_BOTTOM" value="2">
+ </constant>
+ <constant name="SIDE_TOP" value="3">
+ </constant>
+ <constant name="SIDE_FRONT" value="4">
+ </constant>
+ <constant name="SIDE_BACK" value="5">
+ </constant>
+ <constant name="FLAG_MIPMAPS" value="1">
+ </constant>
+ <constant name="FLAG_REPEAT" value="2">
+ </constant>
+ <constant name="FLAG_FILTER" value="4">
+ </constant>
+ <constant name="FLAGS_DEFAULT" value="7">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml
new file mode 100644
index 0000000000..642f37c393
--- /dev/null
+++ b/doc/classes/CubeMesh.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generate an axis-aligned cuboid [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Generate an axis-aligned cuboid [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_depth" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="divisions" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="divisions" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="subdivide" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="size" type="Vector3" setter="set_size" getter="get_size">
+ Size of the cuboid mesh. Defaults to (2, 2, 2).
+ </member>
+ <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth">
+ Number of extra edge loops inserted along the z-axis. Defaults to 0.
+ </member>
+ <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height">
+ Number of extra edge loops inserted along the y-axis. Defaults to 0.
+ </member>
+ <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width">
+ Number of extra edge loops inserted along the x-axis. Defaults to 0.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
new file mode 100644
index 0000000000..d676f635c9
--- /dev/null
+++ b/doc/classes/Curve.xml
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Curve" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_point">
+ <return type="int">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="left_tangent" type="float" default="0">
+ </argument>
+ <argument index="2" name="right_tangent" type="float" default="0">
+ </argument>
+ <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0">
+ </argument>
+ <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="bake">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clean_dupes">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_points">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bake_resolution" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_value" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_min_value" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_left_mode" qualifiers="const">
+ <return type="int" enum="Curve.TangentMode">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_left_tangent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_right_mode" qualifiers="const">
+ <return type="int" enum="Curve.TangentMode">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_right_tangent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="interpolate" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="interpolate_baked">
+ <return type="float">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bake_resolution">
+ <return type="void">
+ </return>
+ <argument index="0" name="resolution" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_min_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="min" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_left_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_left_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="tangent" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="offset" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_right_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_right_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="tangent" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Array" setter="_set_data" getter="_get_data">
+ </member>
+ <member name="bake_resolution" type="int" setter="set_bake_resolution" getter="get_bake_resolution">
+ </member>
+ <member name="max_value" type="float" setter="set_max_value" getter="get_max_value">
+ </member>
+ <member name="min_value" type="float" setter="set_min_value" getter="get_min_value">
+ </member>
+ </members>
+ <signals>
+ <signal name="range_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TANGENT_FREE" value="0">
+ </constant>
+ <constant name="TANGENT_LINEAR" value="1">
+ </constant>
+ <constant name="TANGENT_MODE_COUNT" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
new file mode 100644
index 0000000000..ccf6101829
--- /dev/null
+++ b/doc/classes/Curve2D.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Curve2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Describes a Bezier curve in 2D space.
+ </brief_description>
+ <description>
+ This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes.
+ It keeps a cache of precalculated points along the curve, to speed further calculations up.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <argument index="3" name="atpos" type="int" default="-1">
+ </argument>
+ <description>
+ Adds a point to a curve, at position "pos", with control points "in" and "out".
+ If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
+ </description>
+ </method>
+ <method name="clear_points">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bake_interval" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance between two adjacent cached points.
+ </description>
+ </method>
+ <method name="get_baked_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
+ </description>
+ </method>
+ <method name="get_baked_points" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Returns the cache of points as a [PoolVector2Array].
+ </description>
+ </method>
+ <method name="get_point_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of points describing the curve.
+ </description>
+ </method>
+ <method name="get_point_in" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ </description>
+ </method>
+ <method name="get_point_out" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ </description>
+ </method>
+ <method name="get_point_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
+ </description>
+ </method>
+ <method name="interpolate" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
+ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
+ </description>
+ </method>
+ <method name="interpolate_baked" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <argument index="1" name="cubic" type="bool" default="false">
+ </argument>
+ <description>
+ Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
+ To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
+ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
+ </description>
+ </method>
+ <method name="interpolatef" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="fofs" type="float">
+ </argument>
+ <description>
+ Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
+ </description>
+ </method>
+ <method name="set_bake_interval">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
+ </description>
+ </method>
+ <method name="set_point_in">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="set_point_out">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="set_point_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="tessellate" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="max_stages" type="int" default="5">
+ </argument>
+ <argument index="1" name="tolerance_degrees" type="float" default="4">
+ </argument>
+ <description>
+ Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
+ This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
+ "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
new file mode 100644
index 0000000000..8ea0e04b14
--- /dev/null
+++ b/doc/classes/Curve3D.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Curve3D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Describes a Bezier curve in 3D space.
+ </brief_description>
+ <description>
+ This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes.
+ It keeps a cache of precalculated points along the curve, to speed further calculations up.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )">
+ </argument>
+ <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )">
+ </argument>
+ <argument index="3" name="atpos" type="int" default="-1">
+ </argument>
+ <description>
+ Adds a point to a curve, at position "pos", with control points "in" and "out".
+ If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos &lt;0 or atpos &gt;= [method get_point_count]), the point will be appended at the end of the point list.
+ </description>
+ </method>
+ <method name="clear_points">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bake_interval" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance between two adjacent cached points.
+ </description>
+ </method>
+ <method name="get_baked_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
+ </description>
+ </method>
+ <method name="get_baked_points" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ Returns the cache of points as a [PoolVector3Array].
+ </description>
+ </method>
+ <method name="get_baked_tilts" qualifiers="const">
+ <return type="PoolRealArray">
+ </return>
+ <description>
+ Returns the cache of tilts as a [RealArray].
+ </description>
+ </method>
+ <method name="get_point_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of points describing the curve.
+ </description>
+ </method>
+ <method name="get_point_in" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ </description>
+ </method>
+ <method name="get_point_out" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ </description>
+ </method>
+ <method name="get_point_pos" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
+ </description>
+ </method>
+ <method name="get_point_tilt" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
+ </description>
+ </method>
+ <method name="interpolate" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 &gt;= t &lt;=1) give strange, but predictable results.
+ If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
+ </description>
+ </method>
+ <method name="interpolate_baked" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <argument index="1" name="cubic" type="bool" default="false">
+ </argument>
+ <description>
+ Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
+ To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
+ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
+ </description>
+ </method>
+ <method name="interpolatef" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="fofs" type="float">
+ </argument>
+ <description>
+ Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
+ </description>
+ </method>
+ <method name="set_bake_interval">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care.
+ </description>
+ </method>
+ <method name="set_point_in">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <description>
+ Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="set_point_out">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <description>
+ Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="set_point_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <description>
+ Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
+ </description>
+ </method>
+ <method name="set_point_tilt">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tilt" type="float">
+ </argument>
+ <description>
+ Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
+ The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
+ </description>
+ </method>
+ <method name="tessellate" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="max_stages" type="int" default="5">
+ </argument>
+ <argument index="1" name="tolerance_degrees" type="float" default="4">
+ </argument>
+ <description>
+ Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
+ This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
+ "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
new file mode 100644
index 0000000000..8f8f60968a
--- /dev/null
+++ b/doc/classes/CurveTexture.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CurveTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_curve" qualifiers="const">
+ <return type="Curve">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="Curve">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="curve" type="Curve" setter="set_curve" getter="get_curve">
+ </member>
+ <member name="width" type="int" setter="set_width" getter="get_width">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
new file mode 100644
index 0000000000..8399312dac
--- /dev/null
+++ b/doc/classes/CylinderMesh.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a cylindrical [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a cylindrical [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bottom_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radial_segments" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rings" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_top_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bottom_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radial_segments">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rings">
+ <return type="void">
+ </return>
+ <argument index="0" name="rings" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_top_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius">
+ Bottom radius of the cylinder. Defaults to 1.0.
+ </member>
+ <member name="height" type="float" setter="set_height" getter="get_height">
+ Full height of the cylinder. Defaults to 2.0.
+ </member>
+ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments">
+ Number of radial segments on the cylinder. Defaults to 64.
+ </member>
+ <member name="rings" type="int" setter="set_rings" getter="get_rings">
+ Number of edge rings along the height of the cylinder. Defaults to 4.
+ </member>
+ <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius">
+ Top radius of the cylinder. Defaults to 1.0.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
new file mode 100644
index 0000000000..18554820fa
--- /dev/null
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Damped spring constraint for 2D physics.
+ </brief_description>
+ <description>
+ Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_damping" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
+ </description>
+ </method>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the maximum length of the spring joint.
+ </description>
+ </method>
+ <method name="get_rest_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
+ </description>
+ </method>
+ <method name="get_stiffness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
+ </description>
+ </method>
+ <method name="set_damping">
+ <return type="void">
+ </return>
+ <argument index="0" name="damping" type="float">
+ </argument>
+ <description>
+ Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Set the maximum length of the spring joint.
+ </description>
+ </method>
+ <method name="set_rest_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="rest_length" type="float">
+ </argument>
+ <description>
+ Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
+ </description>
+ </method>
+ <method name="set_stiffness">
+ <return type="void">
+ </return>
+ <argument index="0" name="stiffness" type="float">
+ </argument>
+ <description>
+ Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping" type="float" setter="set_damping" getter="get_damping">
+ </member>
+ <member name="length" type="float" setter="set_length" getter="get_length">
+ </member>
+ <member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length">
+ </member>
+ <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
new file mode 100644
index 0000000000..447c0d7ed3
--- /dev/null
+++ b/doc/classes/Dictionary.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Dictionary" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Dictionary type.
+ </brief_description>
+ <description>
+ Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <description>
+ Clear the dictionary, removing all key/value pairs.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the dictionary is empty.
+ </description>
+ </method>
+ <method name="erase">
+ <argument index="0" name="key" type="var">
+ </argument>
+ <description>
+ Erase a dictionary key/value pair by key.
+ </description>
+ </method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="key" type="var">
+ </argument>
+ <description>
+ Return true if the dictionary has a given key.
+ </description>
+ </method>
+ <method name="has_all">
+ <return type="bool">
+ </return>
+ <argument index="0" name="keys" type="Array">
+ </argument>
+ <description>
+ Return true if the dictionary has all of the keys in the given array.
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <description>
+ Return a hashed integer value representing the dictionary contents.
+ </description>
+ </method>
+ <method name="keys">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of keys in the [Dictionary].
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the dictionary (in pairs).
+ </description>
+ </method>
+ <method name="values">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of values in the [Dictionary].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml
new file mode 100644
index 0000000000..7de1791519
--- /dev/null
+++ b/doc/classes/DirectionalLight.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DirectionalLight" inherits="Light" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Directional Light, such as the Sun or the Moon.
+ </brief_description>
+ <description>
+ A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_shadow_depth_range" qualifiers="const">
+ <return type="int" enum="DirectionalLight.ShadowDepthRange">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_mode" qualifiers="const">
+ <return type="int" enum="DirectionalLight.ShadowMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_blend_splits_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_splits">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_depth_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="DirectionalLight.ShadowDepthRange">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="DirectionalLight.ShadowMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled">
+ </member>
+ <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange">
+ </member>
+ <member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode">
+ </member>
+ <member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param">
+ </member>
+ </members>
+ <constants>
+ <constant name="SHADOW_ORTHOGONAL" value="0">
+ </constant>
+ <constant name="SHADOW_PARALLEL_2_SPLITS" value="1">
+ </constant>
+ <constant name="SHADOW_PARALLEL_4_SPLITS" value="2">
+ </constant>
+ <constant name="SHADOW_DEPTH_RANGE_STABLE" value="0">
+ </constant>
+ <constant name="SHADOW_DEPTH_RANGE_OPTIMIZED" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
new file mode 100644
index 0000000000..ee0b873084
--- /dev/null
+++ b/doc/classes/Directory.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Directory" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Type used to handle the filesystem.
+ </brief_description>
+ <description>
+ Directory type. It is used to manage directories and their content (not restricted to the project folder).
+ Here is an example on how to iterate through the files of a directory:
+ [codeblock]
+ func dir_contents(path):
+ var dir = Directory.new()
+ if dir.open(path) == OK:
+ dir.list_dir_begin()
+ var file_name = dir.get_next()
+ while (file_name != ""):
+ if dir.current_is_dir():
+ print("Found directory: " + file_name)
+ else:
+ print("Found file: " + file_name)
+ file_name = dir.get_next()
+ else:
+ print("An error occurred when trying to access the path.")
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="change_dir">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="todir" type="String">
+ </argument>
+ <description>
+ Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
+ </description>
+ </method>
+ <method name="copy">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="to" type="String">
+ </argument>
+ <description>
+ Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
+ Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ </description>
+ </method>
+ <method name="current_is_dir" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories).
+ </description>
+ </method>
+ <method name="dir_exists">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
+ </description>
+ </method>
+ <method name="file_exists">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Return whether the target file exists. The argument can be relative to the current directory, or an absolute path.
+ </description>
+ </method>
+ <method name="get_current_dir">
+ <return type="String">
+ </return>
+ <description>
+ Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
+ </description>
+ </method>
+ <method name="get_current_drive">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_drive">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String.
+ </description>
+ </method>
+ <method name="get_drive_count">
+ <return type="int">
+ </return>
+ <description>
+ On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
+ </description>
+ </method>
+ <method name="get_next">
+ <return type="String">
+ </return>
+ <description>
+ Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]).
+ The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
+ </description>
+ </method>
+ <method name="get_space_left">
+ <return type="int">
+ </return>
+ <description>
+ On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1.
+ </description>
+ </method>
+ <method name="list_dir_begin">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="skip_navigational" type="bool" default="false">
+ </argument>
+ <argument index="1" name="skip_hidden" type="bool" default="false">
+ </argument>
+ <description>
+ Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
+ If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out.
+ If you pass [code]skip_hidden[/code], then hidden files would be filtered out.
+ </description>
+ </method>
+ <method name="list_dir_end">
+ <return type="void">
+ </return>
+ <description>
+ Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
+ </description>
+ </method>
+ <method name="make_dir">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ </description>
+ </method>
+ <method name="make_dir_recursive">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
+ Return one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*).
+ </description>
+ </method>
+ <method name="open">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
+ The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*).
+ </description>
+ </method>
+ <method name="remove">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
+ Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
+ </description>
+ </method>
+ <method name="rename">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="to" type="String">
+ </argument>
+ <description>
+ Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
+ Return one of the error code constants defined in [@Global Scope] (OK or FAILED).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
new file mode 100644
index 0000000000..e4ce2ff3f0
--- /dev/null
+++ b/doc/classes/DynamicFont.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DynamicFont" inherits="Font" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_fallback">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="DynamicFontData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_fallback" qualifiers="const">
+ <return type="DynamicFontData">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_fallback_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_font_data" qualifiers="const">
+ <return type="DynamicFontData">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_spacing" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_filter" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_mipmaps" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_fallback">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fallback">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="data" type="DynamicFontData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_font_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="DynamicFontData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_spacing">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_filter">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_mipmaps">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing">
+ </member>
+ <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing">
+ </member>
+ <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing">
+ </member>
+ <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing">
+ </member>
+ <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data">
+ </member>
+ <member name="size" type="int" setter="set_size" getter="get_size">
+ </member>
+ <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter">
+ </member>
+ <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps">
+ </member>
+ </members>
+ <constants>
+ <constant name="SPACING_TOP" value="0">
+ </constant>
+ <constant name="SPACING_BOTTOM" value="1">
+ </constant>
+ <constant name="SPACING_CHAR" value="2">
+ </constant>
+ <constant name="SPACING_SPACE" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
new file mode 100644
index 0000000000..51e4e0d231
--- /dev/null
+++ b/doc/classes/DynamicFontData.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="DynamicFontData" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_font_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_font_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="font_path" type="String" setter="set_font_path" getter="get_font_path">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
new file mode 100644
index 0000000000..b0ed24b767
--- /dev/null
+++ b/doc/classes/EditorExportPlugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_export_begin" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="features" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_export_file" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="features" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="file" type="PoolByteArray">
+ </argument>
+ <argument index="2" name="remap" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_shared_object">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skip">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
new file mode 100644
index 0000000000..6ae893f189
--- /dev/null
+++ b/doc/classes/EditorFileDialog.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_filter">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_filters">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_access" qualifiers="const">
+ <return type="int" enum="EditorFileDialog.Access">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_current_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_current_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_current_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_display_mode" qualifiers="const">
+ <return type="int" enum="EditorFileDialog.DisplayMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="EditorFileDialog.Mode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vbox">
+ <return type="VBoxContainer">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="invalidate">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_overwrite_warning_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_showing_hidden_files" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_access">
+ <return type="void">
+ </return>
+ <argument index="0" name="access" type="int" enum="EditorFileDialog.Access">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_current_dir">
+ <return type="void">
+ </return>
+ <argument index="0" name="dir" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_current_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_current_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disable_overwrite_warning">
+ <return type="void">
+ </return>
+ <argument index="0" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_display_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="EditorFileDialog.DisplayMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="EditorFileDialog.Mode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_show_hidden_files">
+ <return type="void">
+ </return>
+ <argument index="0" name="show" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="dir_selected">
+ <argument index="0" name="dir" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="file_selected">
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="files_selected">
+ <argument index="0" name="paths" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MODE_OPEN_FILE" value="0">
+ </constant>
+ <constant name="MODE_OPEN_FILES" value="1">
+ </constant>
+ <constant name="MODE_OPEN_DIR" value="2">
+ </constant>
+ <constant name="MODE_OPEN_ANY" value="3">
+ </constant>
+ <constant name="MODE_SAVE_FILE" value="4">
+ </constant>
+ <constant name="ACCESS_RESOURCES" value="0">
+ </constant>
+ <constant name="ACCESS_USERDATA" value="1">
+ </constant>
+ <constant name="ACCESS_FILESYSTEM" value="2">
+ </constant>
+ <constant name="DISPLAY_THUMBNAILS" value="0">
+ </constant>
+ <constant name="DISPLAY_LIST" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
new file mode 100644
index 0000000000..6a2f811425
--- /dev/null
+++ b/doc/classes/EditorFileSystem.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorFileSystem" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Resource filesystem, as the editor sees it.
+ </brief_description>
+ <description>
+ This object holds information of all resources in the filesystem, their types, etc.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_file_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Get the type of the file, given the full path.
+ </description>
+ </method>
+ <method name="get_filesystem">
+ <return type="EditorFileSystemDirectory">
+ </return>
+ <description>
+ Get the root directory object.
+ </description>
+ </method>
+ <method name="get_filesystem_path">
+ <return type="EditorFileSystemDirectory">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_scanning_progress" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the scan progress for 0 to 1 if the FS is being scanned.
+ </description>
+ </method>
+ <method name="is_scanning" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true of the filesystem is being scanned.
+ </description>
+ </method>
+ <method name="scan">
+ <return type="void">
+ </return>
+ <description>
+ Scan the filesystem for changes.
+ </description>
+ </method>
+ <method name="scan_sources">
+ <return type="void">
+ </return>
+ <description>
+ Check if the source of any imported resource changed.
+ </description>
+ </method>
+ <method name="update_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Update a file information. Call this if an external program (not Godot) modified the file.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="filesystem_changed">
+ <description>
+ Emitted if the filesystem changed.
+ </description>
+ </signal>
+ <signal name="resources_reimported">
+ <argument index="0" name="resources" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="sources_changed">
+ <argument index="0" name="exist" type="bool">
+ </argument>
+ <description>
+ Emitted if the source of any imported file changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
new file mode 100644
index 0000000000..7d284f864e
--- /dev/null
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A diretory for the resource filesystem.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="find_dir_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="find_file_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_file_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_file_import_is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_file_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_file_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_name">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_parent">
+ <return type="EditorFileSystemDirectory">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdir">
+ <return type="EditorFileSystemDirectory">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdir_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
new file mode 100644
index 0000000000..0ced30bda6
--- /dev/null
+++ b/doc/classes/EditorImportPlugin.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_import_options" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <argument index="0" name="preset" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_importer_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_option_visibility" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="option" type="String">
+ </argument>
+ <argument index="1" name="options" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_preset_count" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_preset_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="preset" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_recognized_extensions" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource_type" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_save_extension" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_visible_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="import" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <argument index="0" name="source_file" type="String">
+ </argument>
+ <argument index="1" name="save_path" type="String">
+ </argument>
+ <argument index="2" name="options" type="Dictionary">
+ </argument>
+ <argument index="3" name="r_platform_variants" type="Array">
+ </argument>
+ <argument index="4" name="r_gen_files" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
new file mode 100644
index 0000000000..0422e9a64e
--- /dev/null
+++ b/doc/classes/EditorInterface.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorInterface" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="edit_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_control">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edited_scene_root">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_editor_settings">
+ <return type="EditorSettings">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_editor_viewport">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_open_scenes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource_filesystem">
+ <return type="EditorFileSystem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource_previewer">
+ <return type="EditorResourcePreview">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_script_editor">
+ <return type="ScriptEditor">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_selection">
+ <return type="EditorSelection">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="inspect_object">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="for_property" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_mesh_previews">
+ <return type="Array">
+ </return>
+ <argument index="0" name="arg0" type="Array">
+ </argument>
+ <argument index="1" name="arg1" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="open_scene_from_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reload_scene_from_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save_scene">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="save_scene_as">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="with_preview" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
new file mode 100644
index 0000000000..2831555d41
--- /dev/null
+++ b/doc/classes/EditorPlugin.xml
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorPlugin" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Used by the editor to extend its functionality.
+ </brief_description>
+ <description>
+ Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_control_to_bottom_panel">
+ <return type="ToolButton">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
+ <description>
+ Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_bottom_panel].
+ </description>
+ </method>
+ <method name="add_control_to_container">
+ <return type="void">
+ </return>
+ <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
+ </argument>
+ <argument index="1" name="control" type="Control">
+ </argument>
+ <description>
+ Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI.
+ Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
+ If your plugin is being removed, also make sure to remove your custom controls too.
+ </description>
+ </method>
+ <method name="add_control_to_dock">
+ <return type="void">
+ </return>
+ <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
+ </argument>
+ <argument index="1" name="control" type="Control">
+ </argument>
+ <description>
+ Add the control to a specific dock slot (see DOCK_* enum for options).
+ If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
+ If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_docks].
+ </description>
+ </method>
+ <method name="add_custom_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <argument index="1" name="base" type="String">
+ </argument>
+ <argument index="2" name="script" type="Script">
+ </argument>
+ <argument index="3" name="icon" type="Texture">
+ </argument>
+ <description>
+ Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
+ When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
+ You can use the [method EditorPlugin.handles] to check if your custom object is being edited by checking the script or using 'is' keyword.
+ During run-time, this will be a simple object with a script so this function does not need to be called then.
+ </description>
+ </method>
+ <method name="add_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="exporter" type="EditorExportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_tool_submenu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="submenu" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="apply_changes" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
+ This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
+ </description>
+ </method>
+ <method name="clear" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
+ </description>
+ </method>
+ <method name="create_spatial_gizmo" qualifiers="virtual">
+ <return type="EditorSpatialGizmo">
+ </return>
+ <argument index="0" name="for_spatial" type="Spatial">
+ </argument>
+ <description>
+ This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin.
+ </description>
+ </method>
+ <method name="edit" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <description>
+ This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
+ </description>
+ </method>
+ <method name="forward_canvas_gui_input" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="canvas_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="forward_draw_over_canvas" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="canvas" type="Control">
+ </argument>
+ <description>
+ This function is called every time the 2D canvas editor draws (which overlays over the edited scene). Drawing over the supplied control will draw over the edited scene. To convert from control coordinates to edited scene coordinates (including zoom and offset), a transform is also provided. If you require this control to be redraw, call [method update_canvas].
+ </description>
+ </method>
+ <method name="forward_spatial_gui_input" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="camera" type="Camera">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin.
+ If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled].
+ </description>
+ </method>
+ <method name="get_breakpoints" qualifiers="virtual">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25
+ </description>
+ </method>
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_plugin_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_state" qualifiers="virtual">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
+ </description>
+ </method>
+ <method name="get_undo_redo">
+ <return type="UndoRedo">
+ </return>
+ <description>
+ Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
+ </description>
+ </method>
+ <method name="get_window_layout" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="layout" type="ConfigFile">
+ </argument>
+ <description>
+ Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
+ </description>
+ </method>
+ <method name="handles" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <description>
+ Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them.
+ </description>
+ </method>
+ <method name="has_main_screen" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script).
+ </description>
+ </method>
+ <method name="hide_bottom_panel">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_bottom_panel_item_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="item" type="Control">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_visible" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
+ Remember that you have to manage the visibility of all your editor controls manually.
+ </description>
+ </method>
+ <method name="queue_save_layout" qualifiers="const">
+ <return type="void">
+ </return>
+ <description>
+ Queue save the project's editor layout.
+ </description>
+ </method>
+ <method name="remove_control_from_bottom_panel">
+ <return type="void">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <description>
+ Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly.
+ </description>
+ </method>
+ <method name="remove_control_from_docks">
+ <return type="void">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <description>
+ Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly.
+ </description>
+ </method>
+ <method name="remove_custom_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Remove a custom type added by [method EditorPlugin.add_custom_type]
+ </description>
+ </method>
+ <method name="remove_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="exporter" type="EditorExportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save_external_data" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
+ </description>
+ </method>
+ <method name="set_input_event_forwarding_always_enabled">
+ <return type="void">
+ </return>
+ <description>
+ Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
+ </description>
+ </method>
+ <method name="set_state" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="Dictionary">
+ </argument>
+ <description>
+ Restore the state saved by [method EditorPlugin.get_state].
+ </description>
+ </method>
+ <method name="set_window_layout" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="layout" type="ConfigFile">
+ </argument>
+ <description>
+ Restore the plugin GUI layout saved by [method EditorPlugin.get_window_layout].
+ </description>
+ </method>
+ <method name="update_canvas">
+ <return type="void">
+ </return>
+ <description>
+ Updates the control used to draw the edited scene over the 2D canvas. This is used together with [method forward_canvas_input_event].
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="main_screen_changed">
+ <argument index="0" name="screen_name" type="String">
+ </argument>
+ <description>
+ Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
+ </description>
+ </signal>
+ <signal name="scene_changed">
+ <argument index="0" name="scene_root" type="Object">
+ </argument>
+ <description>
+ Emitted when user change scene. The argument is a root node of freshly opened scene.
+ </description>
+ </signal>
+ <signal name="scene_closed">
+ <argument index="0" name="filepath" type="String">
+ </argument>
+ <description>
+ Emitted when user close scene. The argument is file path to a closed scene.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="CONTAINER_TOOLBAR" value="0">
+ </constant>
+ <constant name="CONTAINER_SPATIAL_EDITOR_MENU" value="1">
+ </constant>
+ <constant name="CONTAINER_SPATIAL_EDITOR_SIDE" value="2">
+ </constant>
+ <constant name="CONTAINER_SPATIAL_EDITOR_BOTTOM" value="3">
+ </constant>
+ <constant name="CONTAINER_CANVAS_EDITOR_MENU" value="4">
+ </constant>
+ <constant name="CONTAINER_CANVAS_EDITOR_SIDE" value="5">
+ </constant>
+ <constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="7">
+ </constant>
+ <constant name="DOCK_SLOT_LEFT_UL" value="0">
+ </constant>
+ <constant name="DOCK_SLOT_LEFT_BL" value="1">
+ </constant>
+ <constant name="DOCK_SLOT_LEFT_UR" value="2">
+ </constant>
+ <constant name="DOCK_SLOT_LEFT_BR" value="3">
+ </constant>
+ <constant name="DOCK_SLOT_RIGHT_UL" value="4">
+ </constant>
+ <constant name="DOCK_SLOT_RIGHT_BL" value="5">
+ </constant>
+ <constant name="DOCK_SLOT_RIGHT_UR" value="6">
+ </constant>
+ <constant name="DOCK_SLOT_RIGHT_BR" value="7">
+ </constant>
+ <constant name="DOCK_SLOT_MAX" value="8">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
new file mode 100644
index 0000000000..e530557a23
--- /dev/null
+++ b/doc/classes/EditorResourcePreview.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Helper to generate previews of reources or files.
+ </brief_description>
+ <description>
+ This object is used to generate previews for resources of files.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_preview_generator">
+ <return type="void">
+ </return>
+ <argument index="0" name="generator" type="EditorResourcePreviewGenerator">
+ </argument>
+ <description>
+ Create an own, custom preview generator.
+ </description>
+ </method>
+ <method name="check_for_invalidation">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Check if the resource changed, if so it will be invalidated and the corresponding signal emitted.
+ </description>
+ </method>
+ <method name="queue_edited_resource_preview">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="receiver_func" type="String">
+ </argument>
+ <argument index="3" name="userdata" type="Variant">
+ </argument>
+ <description>
+ Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+ </description>
+ </method>
+ <method name="queue_resource_preview">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="receiver_func" type="String">
+ </argument>
+ <argument index="3" name="userdata" type="Variant">
+ </argument>
+ <description>
+ Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.
+ </description>
+ </method>
+ <method name="remove_preview_generator">
+ <return type="void">
+ </return>
+ <argument index="0" name="generator" type="EditorResourcePreviewGenerator">
+ </argument>
+ <description>
+ Remove a custom preview generator.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="preview_invalidated">
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ If a preview was invalidated (changed) this signal will emit (using the path of the preview)
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
new file mode 100644
index 0000000000..231198516e
--- /dev/null
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Custom generator of previews.
+ </brief_description>
+ <description>
+ Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="generate" qualifiers="virtual">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="from" type="Resource">
+ </argument>
+ <description>
+ Generate a preview from a given resource. This must be always implemented.
+ Returning an empty texture is an OK way to fail and let another generator take care.
+ Care must be taken because this function is always called from a thread (not the main thread).
+ </description>
+ </method>
+ <method name="generate_from_path" qualifiers="virtual">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Generate a preview directly from a path, implementing this is optional, as default code will load and call generate()
+ Returning an empty texture is an OK way to fail and let another generator take care.
+ Care must be taken because this function is always called from a thread (not the main thread).
+ </description>
+ </method>
+ <method name="handles" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Return if your generator supports this resource type.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
new file mode 100644
index 0000000000..48cf3e9843
--- /dev/null
+++ b/doc/classes/EditorScript.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorScript" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Simple script to perform changes in the currently edited scene.
+ </brief_description>
+ <description>
+ This script can be run from the Scene -&gt; Run Script menu option.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_run" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="add_root_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
new file mode 100644
index 0000000000..8d9bdd2c05
--- /dev/null
+++ b/doc/classes/EditorSelection.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSelection" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Manages the SceneTree selection in the editor.
+ </brief_description>
+ <description>
+ This object manages the SceneTree selection in the editor.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Add a node to the selection.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the selection.
+ </description>
+ </method>
+ <method name="get_selected_nodes">
+ <return type="Array">
+ </return>
+ <description>
+ Get the list of selectes nodes.
+ </description>
+ </method>
+ <method name="get_transformable_selected_nodes">
+ <return type="Array">
+ </return>
+ <description>
+ Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild.
+ </description>
+ </method>
+ <method name="remove_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Remove a node from the selection.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="selection_changed">
+ <description>
+ Emitted when the selection changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
new file mode 100644
index 0000000000..37c7a47a51
--- /dev/null
+++ b/doc/classes/EditorSettings.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSettings" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Object that holds the project-independent editor settings.
+ </brief_description>
+ <description>
+ Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
+ Accessing the settings is done by using the regular [Object] API, such as:
+ [codeblock]
+ settings.set(prop,value)
+ settings.get(prop)
+ list_of_settings = settings.get_property_list()
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_property_info">
+ <return type="void">
+ </return>
+ <argument index="0" name="info" type="Dictionary">
+ </argument>
+ <description>
+ Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
+ Example:
+ [codeblock]
+ editor_settings.set("category/property_name", 0)
+
+ var property_info = {
+ "name": "category/property_name",
+ "type": TYPE_INT,
+ "hint": PROPERTY_HINT_ENUM,
+ "hint_string": "one,two,three"
+ }
+
+ editor_settings.add_property_info(property_info)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="erase">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ Erase a given setting (pass full property path).
+ </description>
+ </method>
+ <method name="get_favorite_dirs" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Get the list of favorite directories for this project.
+ </description>
+ </method>
+ <method name="get_project_settings_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
+ </description>
+ </method>
+ <method name="get_recent_dirs" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Get the list of recently visited folders in the file dialog for this project.
+ </description>
+ </method>
+ <method name="get_settings_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the global settings path for the engine. Inside this path you can find some standard paths such as:
+ settings/tmp - used for temporary storage of files
+ settings/templates - where export templates are located
+ </description>
+ </method>
+ <method name="set_favorite_dirs">
+ <return type="void">
+ </return>
+ <argument index="0" name="dirs" type="PoolStringArray">
+ </argument>
+ <description>
+ Set the list of favorite directories for this project.
+ </description>
+ </method>
+ <method name="set_recent_dirs">
+ <return type="void">
+ </return>
+ <argument index="0" name="dirs" type="PoolStringArray">
+ </argument>
+ <description>
+ Set the list of recently visited folders in the file dialog for this project.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="settings_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
new file mode 100644
index 0000000000..de9ea5282a
--- /dev/null
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Custom gizmo for editing Spatial objects.
+ </brief_description>
+ <description>
+ Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_collision_segments">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="PoolVector3Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_collision_triangles">
+ <return type="void">
+ </return>
+ <argument index="0" name="triangles" type="TriangleMesh">
+ </argument>
+ <description>
+ Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
+ </description>
+ </method>
+ <method name="add_handles">
+ <return type="void">
+ </return>
+ <argument index="0" name="handles" type="PoolVector3Array">
+ </argument>
+ <argument index="1" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="2" name="secondary" type="bool" default="false">
+ </argument>
+ <description>
+ Add a list of handles (points) which can be used to deform the object being edited.
+ There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].
+ </description>
+ </method>
+ <method name="add_lines">
+ <return type="void">
+ </return>
+ <argument index="0" name="lines" type="PoolVector3Array">
+ </argument>
+ <argument index="1" name="material" type="Material">
+ </argument>
+ <argument index="2" name="billboard" type="bool" default="false">
+ </argument>
+ <description>
+ Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
+ </description>
+ </method>
+ <method name="add_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="ArrayMesh">
+ </argument>
+ <argument index="1" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="2" name="skeleton" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_unscaled_billboard">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <argument index="1" name="default_scale" type="float" default="1">
+ </argument>
+ <description>
+ Add an unscaled billboard for visualization. Call this function during [method redraw].
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="commit_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="restore" type="Variant">
+ </argument>
+ <argument index="2" name="cancel" type="bool" default="false">
+ </argument>
+ <description>
+ Commit a handle being edited (handles must have been prevously added by [method add_handles]).
+ If the cancel parameter is true, an option to restore the edited value to the original is provided.
+ </description>
+ </method>
+ <method name="get_handle_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Get the name of an edited handle (handles must have been previously added by [method add_handles]).
+ Handles can be named for reference to the user when editing.
+ </description>
+ </method>
+ <method name="get_handle_value" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]
+ </description>
+ </method>
+ <method name="redraw" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called).
+ </description>
+ </method>
+ <method name="set_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="camera" type="Camera">
+ </argument>
+ <argument index="2" name="point" type="Vector2">
+ </argument>
+ <description>
+ This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
+ The [Camera] is also provided so screen coordinates can be converted to raycasts.
+ </description>
+ </method>
+ <method name="set_spatial_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
new file mode 100644
index 0000000000..412e60bf99
--- /dev/null
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_object_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_object_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
new file mode 100644
index 0000000000..2372c619f5
--- /dev/null
+++ b/doc/classes/Engine.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Engine" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_frames_drawn">
+ <return type="int">
+ </return>
+ <description>
+ Return the total amount of frames drawn.
+ </description>
+ </method>
+ <method name="get_frames_per_second" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the frames per second of the running game.
+ </description>
+ </method>
+ <method name="get_iterations_per_second" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of fixed iterations per second (for fixed process and physics).
+ </description>
+ </method>
+ <method name="get_main_loop" qualifiers="const">
+ <return type="MainLoop">
+ </return>
+ <description>
+ Return the main loop object (see [MainLoop] and [SceneTree]).
+ </description>
+ </method>
+ <method name="get_target_fps" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_time_scale">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_version_info" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Returns the current engine version information in a Dictionary.
+
+ "major" - Holds the major version number as a String
+ "minor" - Holds the minor version number as a String
+ "patch" - Holds the patch version number as a String
+ "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
+ "revision" - Holds the revision (e.g. "custom-build") as a String
+ "string" - major + minor + patch + status + revision in a single String
+ </description>
+ </method>
+ <method name="is_editor_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_in_fixed_frame" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_editor_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_iterations_per_second">
+ <return type="void">
+ </return>
+ <argument index="0" name="iterations_per_second" type="int">
+ </argument>
+ <description>
+ Set the amount of fixed iterations per second (for fixed process and physics).
+ </description>
+ </method>
+ <method name="set_target_fps">
+ <return type="void">
+ </return>
+ <argument index="0" name="target_fps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_time_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="time_scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
new file mode 100644
index 0000000000..4338b188a6
--- /dev/null
+++ b/doc/classes/Environment.xml
@@ -0,0 +1,1173 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Environment" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_adjustment_brightness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_adjustment_color_correction" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_adjustment_contrast" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_adjustment_saturation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ambient_light_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ambient_light_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ambient_light_sky_contribution" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_background" qualifiers="const">
+ <return type="int" enum="Environment.BGMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bg_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bg_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_canvas_max_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_far_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_far_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_far_quality" qualifiers="const">
+ <return type="int" enum="Environment.DOFBlurQuality">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_far_transition" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_near_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_near_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_near_quality" qualifiers="const">
+ <return type="int" enum="Environment.DOFBlurQuality">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dof_blur_near_transition" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_depth_begin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_depth_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_height_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_height_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_height_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_sun_amount" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_sun_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fog_transmit_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_blend_mode" qualifiers="const">
+ <return type="int" enum="Environment.GlowBlendMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_bloom" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_hdr_bleed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_hdr_bleed_threshold" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_intensity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_glow_strength" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky" qualifiers="const">
+ <return type="Sky">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_direct_light_affect" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_intensity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_intensity2" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssao_radius2" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssr_depth_tolerance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssr_fade_in" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssr_fade_out" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ssr_max_steps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_auto_exposure" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_auto_exposure_grey" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_auto_exposure_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_auto_exposure_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_auto_exposure_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_exposure" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemap_white" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tonemapper" qualifiers="const">
+ <return type="int" enum="Environment.ToneMapper">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_adjustment_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_dof_blur_far_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_dof_blur_near_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_fog_depth_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_fog_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_fog_height_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_fog_transmit_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_glow_bicubic_upscale_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_glow_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_glow_level_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_ssao_blur_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_ssao_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_ssr_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_ssr_rough" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_adjustment_brightness">
+ <return type="void">
+ </return>
+ <argument index="0" name="brightness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_adjustment_color_correction">
+ <return type="void">
+ </return>
+ <argument index="0" name="color_correction" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_adjustment_contrast">
+ <return type="void">
+ </return>
+ <argument index="0" name="contrast" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_adjustment_enable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_adjustment_saturation">
+ <return type="void">
+ </return>
+ <argument index="0" name="saturation" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ambient_light_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ambient_light_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ambient_light_sky_contribution">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_background">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.BGMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bg_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_canvas_max_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_far_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_far_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_far_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_far_quality">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="int" enum="Environment.DOFBlurQuality">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_far_transition">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_near_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_near_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_near_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_near_quality">
+ <return type="void">
+ </return>
+ <argument index="0" name="level" type="int" enum="Environment.DOFBlurQuality">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dof_blur_near_transition">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_depth_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_depth_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_depth_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_height_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_height_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_height_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_height_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_sun_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_sun_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_transmit_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fog_transmit_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_bicubic_upscale">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_blend_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.GlowBlendMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_bloom">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_hdr_bleed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_hdr_bleed_threshold">
+ <return type="void">
+ </return>
+ <argument index="0" name="threshold" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_intensity">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_level">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_glow_strength">
+ <return type="void">
+ </return>
+ <argument index="0" name="strength" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky">
+ <return type="void">
+ </return>
+ <argument index="0" name="sky" type="Sky">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_blur">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_direct_light_affect">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_intensity">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_intensity2">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssao_radius2">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_depth_tolerance">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth_tolerance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_fade_in">
+ <return type="void">
+ </return>
+ <argument index="0" name="fade_in" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_fade_out">
+ <return type="void">
+ </return>
+ <argument index="0" name="fade_out" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_max_steps">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_steps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ssr_rough">
+ <return type="void">
+ </return>
+ <argument index="0" name="rough" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_auto_exposure">
+ <return type="void">
+ </return>
+ <argument index="0" name="auto_exposure" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_auto_exposure_grey">
+ <return type="void">
+ </return>
+ <argument index="0" name="exposure_grey" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_auto_exposure_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="exposure_max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_auto_exposure_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="exposure_min" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_auto_exposure_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="exposure_speed" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_exposure">
+ <return type="void">
+ </return>
+ <argument index="0" name="exposure" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemap_white">
+ <return type="void">
+ </return>
+ <argument index="0" name="white" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tonemapper">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.ToneMapper">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness">
+ </member>
+ <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
+ </member>
+ <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast">
+ </member>
+ <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled">
+ </member>
+ <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation">
+ </member>
+ <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color">
+ </member>
+ <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy">
+ </member>
+ <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution">
+ </member>
+ <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure">
+ </member>
+ <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max">
+ </member>
+ <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min">
+ </member>
+ <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey">
+ </member>
+ <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed">
+ </member>
+ <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer">
+ </member>
+ <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color">
+ </member>
+ <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy">
+ </member>
+ <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode">
+ </member>
+ <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky">
+ </member>
+ <member name="background_sky_scale" type="float" setter="set_sky_scale" getter="get_sky_scale">
+ </member>
+ <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount">
+ </member>
+ <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance">
+ </member>
+ <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled">
+ </member>
+ <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality">
+ </member>
+ <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition">
+ </member>
+ <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount">
+ </member>
+ <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance">
+ </member>
+ <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled">
+ </member>
+ <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality">
+ </member>
+ <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition">
+ </member>
+ <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color">
+ </member>
+ <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin">
+ </member>
+ <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve">
+ </member>
+ <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled">
+ </member>
+ <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled">
+ </member>
+ <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve">
+ </member>
+ <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled">
+ </member>
+ <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max">
+ </member>
+ <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min">
+ </member>
+ <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount">
+ </member>
+ <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color">
+ </member>
+ <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve">
+ </member>
+ <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled">
+ </member>
+ <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled">
+ </member>
+ <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode">
+ </member>
+ <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom">
+ </member>
+ <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled">
+ </member>
+ <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale">
+ </member>
+ <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold">
+ </member>
+ <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity">
+ </member>
+ <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ </member>
+ <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength">
+ </member>
+ <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance">
+ </member>
+ <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled">
+ </member>
+ <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in">
+ </member>
+ <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out">
+ </member>
+ <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps">
+ </member>
+ <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough">
+ </member>
+ <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias">
+ </member>
+ <member name="ssao_blur" type="bool" setter="set_ssao_blur" getter="is_ssao_blur_enabled">
+ </member>
+ <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color">
+ </member>
+ <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled">
+ </member>
+ <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity">
+ </member>
+ <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2">
+ </member>
+ <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect">
+ </member>
+ <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius">
+ </member>
+ <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2">
+ </member>
+ <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure">
+ </member>
+ <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper">
+ </member>
+ <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white">
+ </member>
+ </members>
+ <constants>
+ <constant name="BG_KEEP" value="5">
+ </constant>
+ <constant name="BG_CLEAR_COLOR" value="0">
+ </constant>
+ <constant name="BG_COLOR" value="1">
+ </constant>
+ <constant name="BG_SKY" value="2">
+ </constant>
+ <constant name="BG_COLOR_SKY" value="3">
+ </constant>
+ <constant name="BG_CANVAS" value="4">
+ </constant>
+ <constant name="BG_MAX" value="6">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_SCREEN" value="1">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_REPLACE" value="3">
+ </constant>
+ <constant name="TONE_MAPPER_LINEAR" value="0">
+ </constant>
+ <constant name="TONE_MAPPER_REINHARDT" value="1">
+ </constant>
+ <constant name="TONE_MAPPER_FILMIC" value="2">
+ </constant>
+ <constant name="TONE_MAPPER_ACES" value="3">
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_LOW" value="0">
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1">
+ </constant>
+ <constant name="DOF_BLUR_QUALITY_HIGH" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
new file mode 100644
index 0000000000..4e73cd8ae2
--- /dev/null
+++ b/doc/classes/File.xml
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="File" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Type to handle file reading and writing operations.
+ </brief_description>
+ <description>
+ File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example.
+ Here's a sample on how to write and read from a file:
+ [codeblock]
+ func save(content):
+ var file = File.new()
+ file.open("user://save_game.dat", file.WRITE)
+ file.store_string(content)
+ file.close()
+
+ func load():
+ var file = File.new()
+ file.open("user://save_game.dat", file.READ)
+ var content = file.get_as_text()
+ file.close()
+ return content
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="close">
+ <return type="void">
+ </return>
+ <description>
+ Close the currently opened file.
+ </description>
+ </method>
+ <method name="eof_reached" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the file cursor reached the end of the file.
+ </description>
+ </method>
+ <method name="file_exists" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Get whether or not the file in the specified path exists.
+ </description>
+ </method>
+ <method name="get_16" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the next 16 bits from the file as an integer.
+ </description>
+ </method>
+ <method name="get_32" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the next 32 bits from the file as an integer.
+ </description>
+ </method>
+ <method name="get_64" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the next 64 bits from the file as an integer.
+ </description>
+ </method>
+ <method name="get_8" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the next 8 bits from the file as an integer.
+ </description>
+ </method>
+ <method name="get_as_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the whole file as a [String].
+ </description>
+ </method>
+ <method name="get_buffer" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="len" type="int">
+ </argument>
+ <description>
+ Get next len bytes of the file as a [PoolByteArray].
+ </description>
+ </method>
+ <method name="get_csv_line" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="delim" type="String" default="&quot;,&quot;">
+ </argument>
+ <description>
+ Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
+ </description>
+ </method>
+ <method name="get_double" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the next 64 bits from the file as a floating point number.
+ </description>
+ </method>
+ <method name="get_endian_swap">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether endian swap is enabled for this file.
+ </description>
+ </method>
+ <method name="get_error" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
+ </description>
+ </method>
+ <method name="get_float" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the next 32 bits from the file as a floating point number.
+ </description>
+ </method>
+ <method name="get_len" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the file in bytes.
+ </description>
+ </method>
+ <method name="get_line" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the next line of the file as a [String].
+ </description>
+ </method>
+ <method name="get_md5" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Return a md5 String representing the file at the given path or an empty [String] on failure.
+ </description>
+ </method>
+ <method name="get_modified_time" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_pascal_string">
+ <return type="String">
+ </return>
+ <description>
+ Get a [String] saved in Pascal format from the file.
+ </description>
+ </method>
+ <method name="get_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the file cursor position.
+ </description>
+ </method>
+ <method name="get_real" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the next bits from the file as a floating point number.
+ </description>
+ </method>
+ <method name="get_sha256" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Return a sha256 String representing the file at the given path or an empty [String] on failure.
+ </description>
+ </method>
+ <method name="get_var" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Get the next Variant value from the file.
+ </description>
+ </method>
+ <method name="is_open" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the file is currently opened.
+ </description>
+ </method>
+ <method name="open">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="flags" type="int">
+ </argument>
+ <description>
+ Open the file for writing or reading, depending on the flags.
+ </description>
+ </method>
+ <method name="open_compressed">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="mode_flags" type="int">
+ </argument>
+ <argument index="2" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants.
+ </description>
+ </method>
+ <method name="open_encrypted">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="mode_flags" type="int">
+ </argument>
+ <argument index="2" name="key" type="PoolByteArray">
+ </argument>
+ <description>
+ Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
+ </description>
+ </method>
+ <method name="open_encrypted_with_pass">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="mode_flags" type="int">
+ </argument>
+ <argument index="2" name="pass" type="String">
+ </argument>
+ <description>
+ Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file).
+ </description>
+ </method>
+ <method name="seek_end">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="int" default="0">
+ </argument>
+ <description>
+ Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
+ </description>
+ </method>
+ <method name="set_endian_swap">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines.
+ Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
+ </description>
+ </method>
+ <method name="store_16">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Store an integer as 16 bits in the file.
+ </description>
+ </method>
+ <method name="store_32">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Store an integer as 32 bits in the file.
+ </description>
+ </method>
+ <method name="store_64">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Store an integer as 64 bits in the file.
+ </description>
+ </method>
+ <method name="store_8">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Store an integer as 8 bits in the file.
+ </description>
+ </method>
+ <method name="store_buffer">
+ <return type="void">
+ </return>
+ <argument index="0" name="buffer" type="PoolByteArray">
+ </argument>
+ <description>
+ Store the given array of bytes in the file.
+ </description>
+ </method>
+ <method name="store_double">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Store a floating point number as 64 bits in the file.
+ </description>
+ </method>
+ <method name="store_float">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Store a floating point number as 32 bits in the file.
+ </description>
+ </method>
+ <method name="store_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="String">
+ </argument>
+ <description>
+ Store the given [String] as a line in the file.
+ </description>
+ </method>
+ <method name="store_pascal_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
+ </description>
+ </method>
+ <method name="store_real">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Store a floating point number in the file.
+ </description>
+ </method>
+ <method name="store_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Store the given [String] in the file.
+ </description>
+ </method>
+ <method name="store_var">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ Store any Variant value in the file.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="READ" value="1">
+ Open the file for reading.
+ </constant>
+ <constant name="WRITE" value="2">
+ Open the file for writing. Create it if the file not exists and truncate if it exists.
+ </constant>
+ <constant name="READ_WRITE" value="3">
+ Open the file for reading and writing, without truncating the file.
+ </constant>
+ <constant name="WRITE_READ" value="7">
+ Open the file for reading and writing. Create it if the file not exists and truncate if it exists.
+ </constant>
+ <constant name="COMPRESSION_FASTLZ" value="0">
+ Use the FastLZ compression method.
+ </constant>
+ <constant name="COMPRESSION_DEFLATE" value="1">
+ Use the Deflate compression method.
+ </constant>
+ <constant name="COMPRESSION_ZSTD" value="2">
+ Use the Zstd compression method.
+ </constant>
+ <constant name="COMPRESSION_GZIP" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
new file mode 100644
index 0000000000..d7a08368a5
--- /dev/null
+++ b/doc/classes/FileDialog.xml
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Dialog for selecting files or directories in the filesystem.
+ </brief_description>
+ <description>
+ FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_filter">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="String">
+ </argument>
+ <description>
+ Add a custom filter. Filter format is: "mask ; description", example (C++): dialog-&gt;add_filter("*.png ; PNG Images");
+ </description>
+ </method>
+ <method name="clear_filters">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the added filters in the dialog.
+ </description>
+ </method>
+ <method name="get_access" qualifiers="const">
+ <return type="int" enum="FileDialog.Access">
+ </return>
+ <description>
+ Return the file access permission of the dialog.
+ </description>
+ </method>
+ <method name="get_current_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the current working directory of the file dialog.
+ </description>
+ </method>
+ <method name="get_current_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the current selected file of the file dialog (empty if none).
+ </description>
+ </method>
+ <method name="get_current_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the current selected path (directory and file) of the file dialog (empty if none).
+ </description>
+ </method>
+ <method name="get_filters" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="FileDialog.Mode">
+ </return>
+ <description>
+ Get the file dialog mode from the MODE_* enum.
+ </description>
+ </method>
+ <method name="get_vbox">
+ <return type="VBoxContainer">
+ </return>
+ <description>
+ Return the vertical box container of the dialog, custom controls can be added to it.
+ </description>
+ </method>
+ <method name="invalidate">
+ <return type="void">
+ </return>
+ <description>
+ Invalidate and update the current dialog content list.
+ </description>
+ </method>
+ <method name="is_showing_hidden_files" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the diaog allows show hidden files.
+ </description>
+ </method>
+ <method name="set_access">
+ <return type="void">
+ </return>
+ <argument index="0" name="access" type="int" enum="FileDialog.Access">
+ </argument>
+ <description>
+ Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
+ </description>
+ </method>
+ <method name="set_current_dir">
+ <return type="void">
+ </return>
+ <argument index="0" name="dir" type="String">
+ </argument>
+ <description>
+ Set the current working directory of the file dialog.
+ </description>
+ </method>
+ <method name="set_current_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ Set the current selected file name of the file dialog.
+ </description>
+ </method>
+ <method name="set_current_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Set the current selected file path of the file dialog.
+ </description>
+ </method>
+ <method name="set_filters">
+ <return type="void">
+ </return>
+ <argument index="0" name="filters" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="FileDialog.Mode">
+ </argument>
+ <description>
+ Set the file dialog mode from the MODE_* enum.
+ </description>
+ </method>
+ <method name="set_show_hidden_files">
+ <return type="void">
+ </return>
+ <argument index="0" name="show" type="bool">
+ </argument>
+ <description>
+ Set the dialog should show hidden files.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access">
+ </member>
+ <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters">
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode">
+ </member>
+ <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files">
+ </member>
+ </members>
+ <signals>
+ <signal name="dir_selected">
+ <argument index="0" name="dir" type="String">
+ </argument>
+ <description>
+ Event emitted when the user selects a directory.
+ </description>
+ </signal>
+ <signal name="file_selected">
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Event emitted when the user selects a file (double clicks it or presses the OK button).
+ </description>
+ </signal>
+ <signal name="files_selected">
+ <argument index="0" name="paths" type="PoolStringArray">
+ </argument>
+ <description>
+ Event emitted when the user selects multiple files.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MODE_OPEN_FILE" value="0">
+ The dialog allows the selection of one, and only one file.
+ </constant>
+ <constant name="MODE_OPEN_FILES" value="1">
+ The dialog allows the selection of multiple files.
+ </constant>
+ <constant name="MODE_OPEN_DIR" value="2">
+ The dialog functions as a folder selector, disallowing the selection of any file.
+ </constant>
+ <constant name="MODE_OPEN_ANY" value="3">
+ The dialog allows the selection of a file or a directory.
+ </constant>
+ <constant name="MODE_SAVE_FILE" value="4">
+ The dialog will warn when a file exists.
+ </constant>
+ <constant name="ACCESS_RESOURCES" value="0">
+ The dialog allows the selection of file and directory.
+ </constant>
+ <constant name="ACCESS_USERDATA" value="1">
+ The dialog allows ascess files under [Resource] path(res://) .
+ </constant>
+ <constant name="ACCESS_FILESYSTEM" value="2">
+ The dialog allows ascess files in whole file system.
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="files_disabled" type="Color">
+ </theme_item>
+ <theme_item name="folder" type="Texture">
+ </theme_item>
+ <theme_item name="reload" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
new file mode 100644
index 0000000000..420756975f
--- /dev/null
+++ b/doc/classes/Font.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Font" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Internationalized font and text drawing support.
+ </brief_description>
+ <description>
+ Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="string" type="String">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="clip_w" type="int" default="-1">
+ </argument>
+ <description>
+ Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ </description>
+ </method>
+ <method name="draw_char" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="char" type="int">
+ </argument>
+ <argument index="3" name="next" type="int" default="-1">
+ </argument>
+ <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
+ </description>
+ </method>
+ <method name="get_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="get_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the total font height (ascent plus descent) in pixels.
+ </description>
+ </method>
+ <method name="get_string_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Return the size of a string, taking kerning and advance into account.
+ </description>
+ </method>
+ <method name="is_distance_field_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="update_changes">
+ <return type="void">
+ </return>
+ <description>
+ After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
new file mode 100644
index 0000000000..a7593dc2a1
--- /dev/null
+++ b/doc/classes/FuncRef.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FuncRef" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Reference to a function in an object.
+ </brief_description>
+ <description>
+ In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments.
+ However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="call_func" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_function">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the function to call on the object, without parentheses or any parameters.
+ </description>
+ </method>
+ <method name="set_instance">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="Object">
+ </argument>
+ <description>
+ Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDFunctionState.xml b/doc/classes/GDFunctionState.xml
new file mode 100644
index 0000000000..801ca718e7
--- /dev/null
+++ b/doc/classes/GDFunctionState.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDFunctionState" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ State of a function call after yielding.
+ </brief_description>
+ <description>
+ Calling [method @GDScript.yield] within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling [method resume] on this state object.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="extended_check" type="bool" default="false">
+ </argument>
+ <description>
+ Check whether the function call may be resumed. This is not the case if the function state was already resumed.
+ If [code]extended_check[/code] is enabled, it also checks if the associated script and object still exist. The extended check is done in debug mode as part of [method GDFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point.
+ </description>
+ </method>
+ <method name="resume">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="arg" type="Variant" default="null">
+ </argument>
+ <description>
+ Resume execution of the yielded function call.
+ If handed an argument, return the argument from the [method @GDScript.yield] call in the yielded function call. You can pass e.g. an [Array] to hand multiple arguments.
+ This function returns what the resumed function call returns, possibly another function state if yielded again.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="completed">
+ <argument index="0" name="result" type="Nil">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDNative.xml b/doc/classes/GDNative.xml
new file mode 100644
index 0000000000..ba813c4564
--- /dev/null
+++ b/doc/classes/GDNative.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDNative" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="call_native">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="procedure_name" type="String">
+ </argument>
+ <argument index="1" name="arguments" type="String">
+ </argument>
+ <argument index="2" name="arg2" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_library">
+ <return type="GDNativeLibrary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="initialize">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_library">
+ <return type="void">
+ </return>
+ <argument index="0" name="library" type="GDNativeLibrary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="terminate">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDNativeClass.xml b/doc/classes/GDNativeClass.xml
new file mode 100644
index 0000000000..5a3f353720
--- /dev/null
+++ b/doc/classes/GDNativeClass.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDNativeClass" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="new">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDNativeLibrary.xml b/doc/classes/GDNativeLibrary.xml
new file mode 100644
index 0000000000..c3561856cc
--- /dev/null
+++ b/doc/classes/GDNativeLibrary.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_library_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="platform" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_singleton_gdnative" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_library_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="platform" type="String">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_singleton_gdnative">
+ <return type="void">
+ </return>
+ <argument index="0" name="singleton" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="singleton_gdnative" type="bool" setter="set_singleton_gdnative" getter="is_singleton_gdnative">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDScript.xml b/doc/classes/GDScript.xml
new file mode 100644
index 0000000000..2faa0ff968
--- /dev/null
+++ b/doc/classes/GDScript.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDScript" inherits="Script" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A script implemented in the GDScript programming language.
+ </brief_description>
+ <description>
+ A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it.
+ [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_as_byte_code" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ Returns byte code for the script source code.
+ </description>
+ </method>
+ <method name="new" qualifiers="vararg">
+ <return type="Object">
+ </return>
+ <description>
+ Returns a new instance of the script.
+ For example:
+ [codeblock]
+ var MyClass = load("myclass.gd")
+ var instance = MyClass.new()
+ assert(instance.get_script() == MyClass)
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
new file mode 100644
index 0000000000..9df0b80b35
--- /dev/null
+++ b/doc/classes/GIProbe.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="bake">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_node" type="Node" default="null">
+ </argument>
+ <argument index="1" name="create_visual_debug" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="debug_bake">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dynamic_range" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_extents" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_probe_data" qualifiers="const">
+ <return type="GIProbeData">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_propagation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdiv" qualifiers="const">
+ <return type="int" enum="GIProbe.Subdiv">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_compressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_interior" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_compress">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dynamic_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_interior">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_normal_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_probe_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="GIProbeData">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_propagation">
+ <return type="void">
+ </return>
+ <argument index="0" name="max" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdiv">
+ <return type="void">
+ </return>
+ <argument index="0" name="subdiv" type="int" enum="GIProbe.Subdiv">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bias" type="float" setter="set_bias" getter="get_bias">
+ </member>
+ <member name="compress" type="bool" setter="set_compress" getter="is_compressed">
+ </member>
+ <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data">
+ </member>
+ <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range">
+ </member>
+ <member name="energy" type="float" setter="set_energy" getter="get_energy">
+ </member>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+ </member>
+ <member name="interior" type="bool" setter="set_interior" getter="is_interior">
+ </member>
+ <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias">
+ </member>
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation">
+ </member>
+ <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv">
+ </member>
+ </members>
+ <constants>
+ <constant name="SUBDIV_64" value="0">
+ </constant>
+ <constant name="SUBDIV_128" value="1">
+ </constant>
+ <constant name="SUBDIV_256" value="2">
+ </constant>
+ <constant name="SUBDIV_MAX" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
new file mode 100644
index 0000000000..6d47daf985
--- /dev/null
+++ b/doc/classes/GIProbeData.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GIProbeData" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bounds" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dynamic_data" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_dynamic_range" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_propagation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_to_cell_xform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_compressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_interior" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bounds">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounds" type="Rect3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="cell_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_compress">
+ <return type="void">
+ </return>
+ <argument index="0" name="compress" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dynamic_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="dynamic_data" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_dynamic_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="dynamic_range" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_interior">
+ <return type="void">
+ </return>
+ <argument index="0" name="interior" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_normal_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_propagation">
+ <return type="void">
+ </return>
+ <argument index="0" name="propagation" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_to_cell_xform">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_cell_xform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bias" type="float" setter="set_bias" getter="get_bias">
+ </member>
+ <member name="bounds" type="Rect3" setter="set_bounds" getter="get_bounds">
+ </member>
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size">
+ </member>
+ <member name="compress" type="bool" setter="set_compress" getter="is_compressed">
+ </member>
+ <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data">
+ </member>
+ <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range">
+ </member>
+ <member name="energy" type="float" setter="set_energy" getter="get_energy">
+ </member>
+ <member name="interior" type="bool" setter="set_interior" getter="is_interior">
+ </member>
+ <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias">
+ </member>
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation">
+ </member>
+ <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml
new file mode 100644
index 0000000000..4b782e994a
--- /dev/null
+++ b/doc/classes/Generic6DOFJoint.xml
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_flag_x" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag_y" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag_z" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param_x" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param_y" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param_z" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag_z">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param_z">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x">
+ </member>
+ <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x">
+ </member>
+ <member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x">
+ </member>
+ <member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y">
+ </member>
+ <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y">
+ </member>
+ <member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y">
+ </member>
+ <member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z">
+ </member>
+ <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z">
+ </member>
+ <member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z">
+ </member>
+ <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x">
+ </member>
+ <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y">
+ </member>
+ <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z">
+ </member>
+ <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x">
+ </member>
+ <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="linear_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="linear_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="linear_limit_x/upper_distance" type="float" setter="set_param_x" getter="get_param_x">
+ </member>
+ <member name="linear_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y">
+ </member>
+ <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="linear_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="linear_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="linear_limit_y/upper_distance" type="float" setter="set_param_y" getter="get_param_y">
+ </member>
+ <member name="linear_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z">
+ </member>
+ <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="linear_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="linear_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ <member name="linear_limit_z/upper_distance" type="float" setter="set_param_z" getter="get_param_z">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_LINEAR_LOWER_LIMIT" value="0">
+ </constant>
+ <constant name="PARAM_LINEAR_UPPER_LIMIT" value="1">
+ </constant>
+ <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2">
+ </constant>
+ <constant name="PARAM_LINEAR_RESTITUTION" value="3">
+ </constant>
+ <constant name="PARAM_LINEAR_DAMPING" value="4">
+ </constant>
+ <constant name="PARAM_ANGULAR_LOWER_LIMIT" value="5">
+ </constant>
+ <constant name="PARAM_ANGULAR_UPPER_LIMIT" value="6">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="7">
+ </constant>
+ <constant name="PARAM_ANGULAR_DAMPING" value="8">
+ </constant>
+ <constant name="PARAM_ANGULAR_RESTITUTION" value="9">
+ </constant>
+ <constant name="PARAM_ANGULAR_FORCE_LIMIT" value="10">
+ </constant>
+ <constant name="PARAM_ANGULAR_ERP" value="11">
+ </constant>
+ <constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="12">
+ </constant>
+ <constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="13">
+ </constant>
+ <constant name="PARAM_MAX" value="14">
+ </constant>
+ <constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0">
+ </constant>
+ <constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1">
+ </constant>
+ <constant name="FLAG_ENABLE_MOTOR" value="2">
+ </constant>
+ <constant name="FLAG_MAX" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
new file mode 100644
index 0000000000..6c301cb928
--- /dev/null
+++ b/doc/classes/Geometry.xml
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Geometry" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="build_box_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="build_capsule_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="lats" type="int">
+ </argument>
+ <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="build_cylinder_planes">
+ <return type="Array">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <argument index="1" name="height" type="float">
+ </argument>
+ <argument index="2" name="sides" type="int">
+ </argument>
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment_2d">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <argument index="1" name="s1" type="Vector2">
+ </argument>
+ <argument index="2" name="s2" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment_uncapped">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="s1" type="Vector3">
+ </argument>
+ <argument index="2" name="s2" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment_uncapped_2d">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <argument index="1" name="s1" type="Vector2">
+ </argument>
+ <argument index="2" name="s2" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_points_between_segments">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="p1" type="Vector3">
+ </argument>
+ <argument index="1" name="p2" type="Vector3">
+ </argument>
+ <argument index="2" name="q1" type="Vector3">
+ </argument>
+ <argument index="3" name="q2" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_points_between_segments_2d">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="p1" type="Vector2">
+ </argument>
+ <argument index="1" name="q1" type="Vector2">
+ </argument>
+ <argument index="2" name="p2" type="Vector2">
+ </argument>
+ <argument index="3" name="q2" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv84_normal_bit">
+ <return type="int">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_atlas">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="sizes" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="point_is_inside_triangle" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <argument index="1" name="a" type="Vector2">
+ </argument>
+ <argument index="2" name="b" type="Vector2">
+ </argument>
+ <argument index="3" name="c" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="ray_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="dir" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_circle">
+ <return type="float">
+ </return>
+ <argument index="0" name="segment_from" type="Vector2">
+ </argument>
+ <argument index="1" name="segment_to" type="Vector2">
+ </argument>
+ <argument index="2" name="circle_pos" type="Vector2">
+ </argument>
+ <argument index="3" name="circle_radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_convex">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="planes" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_cylinder">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="height" type="float">
+ </argument>
+ <argument index="3" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_segment_2d">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from_a" type="Vector2">
+ </argument>
+ <argument index="1" name="to_a" type="Vector2">
+ </argument>
+ <argument index="2" name="from_b" type="Vector2">
+ </argument>
+ <argument index="3" name="to_b" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_sphere">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="spos" type="Vector3">
+ </argument>
+ <argument index="3" name="sradius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="segment_intersects_triangle">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="a" type="Vector3">
+ </argument>
+ <argument index="3" name="b" type="Vector3">
+ </argument>
+ <argument index="4" name="c" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="triangulate_polygon">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="polygon" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml
new file mode 100644
index 0000000000..57aec8be41
--- /dev/null
+++ b/doc/classes/GeometryInstance.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base node for geometry based visual instances.
+ </brief_description>
+ <description>
+ Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cast_shadows_setting" qualifiers="const">
+ <return type="int" enum="GeometryInstance.ShadowCastingSetting">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_extra_cull_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_max_hysteresis" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_min_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_min_hysteresis" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_material_override" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ Return the material override for the whole geometry.
+ </description>
+ </method>
+ <method name="set_cast_shadows_setting">
+ <return type="void">
+ </return>
+ <argument index="0" name="shadow_casting_setting" type="int" enum="GeometryInstance.ShadowCastingSetting">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_extra_cull_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lod_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lod_max_hysteresis">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lod_min_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lod_min_hysteresis">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_material_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ Set the material override for the whole geometry.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance.ShadowCastingSetting">
+ </member>
+ <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin">
+ </member>
+ <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance">
+ </member>
+ <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis">
+ </member>
+ <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance">
+ </member>
+ <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis">
+ </member>
+ <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
+ </member>
+ <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ </members>
+ <constants>
+ <constant name="SHADOW_CASTING_SETTING_OFF" value="0">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_ON" value="1">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3">
+ </constant>
+ <constant name="FLAG_USE_BAKED_LIGHT" value="0">
+ </constant>
+ <constant name="FLAG_MAX" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
new file mode 100644
index 0000000000..f97908b0a2
--- /dev/null
+++ b/doc/classes/Gradient.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Gradient" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Color interpolator node
+ </brief_description>
+ <description>
+ Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Adds the specified color to the end of the ramp, with the specified offset
+ </description>
+ </method>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="point" type="int">
+ </argument>
+ <description>
+ Returns the color of the ramp color at index [i]point[/i]
+ </description>
+ </method>
+ <method name="get_colors" qualifiers="const">
+ <return type="PoolColorArray">
+ </return>
+ <description>
+ Returns the colors in the ramp
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="point" type="int">
+ </argument>
+ <description>
+ Returns the offset of the ramp color at index [i]point[/i]
+ </description>
+ </method>
+ <method name="get_offsets" qualifiers="const">
+ <return type="PoolRealArray">
+ </return>
+ <description>
+ Returns the offsets for the colors in this ramp
+ </description>
+ </method>
+ <method name="get_point_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of colors in the ramp
+ </description>
+ </method>
+ <method name="interpolate">
+ <return type="Color">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ Returns the interpolated color specified by [i]offset[/i]
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="int">
+ </argument>
+ <description>
+ Removes the color at the index [i]offset[/i]
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="point" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Sets the color of the ramp color at index [i]point[/i]
+ </description>
+ </method>
+ <method name="set_colors">
+ <return type="void">
+ </return>
+ <argument index="0" name="colors" type="PoolColorArray">
+ </argument>
+ <description>
+ Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements.
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="point" type="int">
+ </argument>
+ <argument index="1" name="offset" type="float">
+ </argument>
+ <description>
+ Sets the offset for the ramp color at index [i]point[/i]
+ </description>
+ </method>
+ <method name="set_offsets">
+ <return type="void">
+ </return>
+ <argument index="0" name="offsets" type="PoolRealArray">
+ </argument>
+ <description>
+ Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements, all new colors will be black by default.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors">
+ </member>
+ <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml
new file mode 100644
index 0000000000..eab8ea77af
--- /dev/null
+++ b/doc/classes/GradientTexture.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GradientTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Gradient filled texture.
+ </brief_description>
+ <description>
+ Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_gradient" qualifiers="const">
+ <return type="Gradient">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_gradient">
+ <return type="void">
+ </return>
+ <argument index="0" name="gradient" type="Gradient">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
+ The [Gradient] that will be used to fill the texture.
+ </member>
+ <member name="width" type="int" setter="set_width" getter="get_width">
+ The number of color samples that will be obtained from the [Gradient].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
new file mode 100644
index 0000000000..bd594033ee
--- /dev/null
+++ b/doc/classes/GraphEdit.xml
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GraphEdit" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
+ </brief_description>
+ <description>
+ GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
+ It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="connect_node">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_port" type="int">
+ </argument>
+ <argument index="2" name="to" type="String">
+ </argument>
+ <argument index="3" name="to_port" type="int">
+ </argument>
+ <description>
+ Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
+ </description>
+ </method>
+ <method name="disconnect_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_port" type="int">
+ </argument>
+ <argument index="2" name="to" type="String">
+ </argument>
+ <argument index="3" name="to_port" type="int">
+ </argument>
+ <description>
+ Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
+ </description>
+ </method>
+ <method name="get_connection_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
+ </description>
+ </method>
+ <method name="get_scroll_ofs" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the scroll offset.
+ </description>
+ </method>
+ <method name="get_snap" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_zoom" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current zoom value.
+ </description>
+ </method>
+ <method name="is_node_connected">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_port" type="int">
+ </argument>
+ <argument index="2" name="to" type="String">
+ </argument>
+ <argument index="3" name="to_port" type="int">
+ </argument>
+ <description>
+ Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
+ </description>
+ </method>
+ <method name="is_right_disconnects_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
+ </description>
+ </method>
+ <method name="is_using_snap" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_right_disconnects">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
+ </description>
+ </method>
+ <method name="set_scroll_ofs">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_selected">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_snap">
+ <return type="void">
+ </return>
+ <argument index="0" name="pixels" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_snap">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_zoom">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_zoom" type="float">
+ </argument>
+ <description>
+ Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728].
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="_begin_node_move">
+ <description>
+ Signal sent at the beginning of a GraphNode movement.
+ </description>
+ </signal>
+ <signal name="_end_node_move">
+ <description>
+ Signal sent at the end of a GraphNode movement.
+ </description>
+ </signal>
+ <signal name="connection_request">
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_slot" type="int">
+ </argument>
+ <argument index="2" name="to" type="String">
+ </argument>
+ <argument index="3" name="to_slot" type="int">
+ </argument>
+ <description>
+ Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created.
+ </description>
+ </signal>
+ <signal name="connection_to_empty">
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_slot" type="int">
+ </argument>
+ <argument index="2" name="release_pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="delete_nodes_request">
+ <description>
+ Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
+ </description>
+ </signal>
+ <signal name="disconnection_request">
+ <argument index="0" name="from" type="String">
+ </argument>
+ <argument index="1" name="from_slot" type="int">
+ </argument>
+ <argument index="2" name="to" type="String">
+ </argument>
+ <argument index="3" name="to_slot" type="int">
+ </argument>
+ <description>
+ Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed.
+ </description>
+ </signal>
+ <signal name="duplicate_nodes_request">
+ <description>
+ Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit.
+ </description>
+ </signal>
+ <signal name="node_selected">
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="popup_request">
+ <argument index="0" name="p_position" type="Vector2">
+ </argument>
+ <description>
+ Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.
+ </description>
+ </signal>
+ <signal name="scroll_offset_changed">
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="bezier_len_neg" type="int">
+ </theme_item>
+ <theme_item name="bezier_len_pos" type="int">
+ </theme_item>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="grid_major" type="Color">
+ </theme_item>
+ <theme_item name="grid_minor" type="Color">
+ </theme_item>
+ <theme_item name="minus" type="Texture">
+ </theme_item>
+ <theme_item name="more" type="Texture">
+ </theme_item>
+ <theme_item name="reset" type="Texture">
+ </theme_item>
+ <theme_item name="snap" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
new file mode 100644
index 0000000000..de1d9c1194
--- /dev/null
+++ b/doc/classes/GraphNode.xml
@@ -0,0 +1,365 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GraphNode" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
+ </brief_description>
+ <description>
+ A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear_all_slots">
+ <return type="void">
+ </return>
+ <description>
+ Disable all input and output slots of the GraphNode.
+ </description>
+ </method>
+ <method name="clear_slot">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Disable input and output slot whose index is 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_input_color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the color of the input connection 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_input_count">
+ <return type="int">
+ </return>
+ <description>
+ Return the number of enabled input slots (connections) to the GraphNode.
+ </description>
+ </method>
+ <method name="get_connection_input_pos">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the position of the input connection 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_input_type">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the type of the input connection 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_output_color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the color of the output connection 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_output_count">
+ <return type="int">
+ </return>
+ <description>
+ Return the number of enabled output slots (connections) of the GraphNode.
+ </description>
+ </method>
+ <method name="get_connection_output_pos">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the position of the output connection 'idx'.
+ </description>
+ </method>
+ <method name="get_connection_output_type">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the type of the output connection 'idx'.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the offset of the GraphNode.
+ </description>
+ </method>
+ <method name="get_overlay" qualifiers="const">
+ <return type="int" enum="GraphNode.Overlay">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_slot_color_left" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the color set to 'idx' left (input) slot.
+ </description>
+ </method>
+ <method name="get_slot_color_right" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the color set to 'idx' right (output) slot.
+ </description>
+ </method>
+ <method name="get_slot_type_left" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the (integer) type of left (input) 'idx' slot.
+ </description>
+ </method>
+ <method name="get_slot_type_right" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the (integer) type of right (output) 'idx' slot.
+ </description>
+ </method>
+ <method name="get_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the title of the GraphNode.
+ </description>
+ </method>
+ <method name="is_close_button_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the close button is shown. False otherwise.
+ </description>
+ </method>
+ <method name="is_comment" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_resizable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_selected">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_slot_enabled_left" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return true if left (input) slot 'idx' is enabled. False otherwise.
+ </description>
+ </method>
+ <method name="is_slot_enabled_right" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return true if right (output) slot 'idx' is enabled. False otherwise.
+ </description>
+ </method>
+ <method name="set_comment">
+ <return type="void">
+ </return>
+ <argument index="0" name="comment" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the offset of the GraphNode.
+ </description>
+ </method>
+ <method name="set_overlay">
+ <return type="void">
+ </return>
+ <argument index="0" name="overlay" type="int" enum="GraphNode.Overlay">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_resizable">
+ <return type="void">
+ </return>
+ <argument index="0" name="resizable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_selected">
+ <return type="void">
+ </return>
+ <argument index="0" name="selected" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_show_close_button">
+ <return type="void">
+ </return>
+ <argument index="0" name="show" type="bool">
+ </argument>
+ <description>
+ Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
+ </description>
+ </method>
+ <method name="set_slot">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable_left" type="bool">
+ </argument>
+ <argument index="2" name="type_left" type="int">
+ </argument>
+ <argument index="3" name="color_left" type="Color">
+ </argument>
+ <argument index="4" name="enable_right" type="bool">
+ </argument>
+ <argument index="5" name="type_right" type="int">
+ </argument>
+ <argument index="6" name="color_right" type="Color">
+ </argument>
+ <argument index="7" name="custom_left" type="Texture" default="null">
+ </argument>
+ <argument index="8" name="custom_right" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <description>
+ Set the title of the GraphNode.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable">
+ </member>
+ <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible">
+ </member>
+ <member name="title" type="String" setter="set_title" getter="get_title">
+ </member>
+ </members>
+ <signals>
+ <signal name="close_request">
+ <description>
+ Signal sent on closing the GraphNode.
+ </description>
+ </signal>
+ <signal name="dragged">
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <argument index="1" name="to" type="Vector2">
+ </argument>
+ <description>
+ Signal sent when the GraphNode is dragged.
+ </description>
+ </signal>
+ <signal name="offset_changed">
+ <description>
+ Signal sent when the GraphNode is moved.
+ </description>
+ </signal>
+ <signal name="raise_request">
+ <description>
+ Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
+ </description>
+ </signal>
+ <signal name="resize_request">
+ <argument index="0" name="new_minsize" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="OVERLAY_DISABLED" value="0">
+ </constant>
+ <constant name="OVERLAY_BREAKPOINT" value="1">
+ </constant>
+ <constant name="OVERLAY_POSITION" value="2">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="breakpoint" type="StyleBox">
+ </theme_item>
+ <theme_item name="close" type="Texture">
+ </theme_item>
+ <theme_item name="close_offset" type="int">
+ </theme_item>
+ <theme_item name="comment" type="StyleBox">
+ </theme_item>
+ <theme_item name="commentfocus" type="StyleBox">
+ </theme_item>
+ <theme_item name="defaultfocus" type="StyleBox">
+ </theme_item>
+ <theme_item name="defaultframe" type="StyleBox">
+ </theme_item>
+ <theme_item name="frame" type="StyleBox">
+ </theme_item>
+ <theme_item name="port" type="Texture">
+ </theme_item>
+ <theme_item name="port_offset" type="int">
+ </theme_item>
+ <theme_item name="position" type="StyleBox">
+ </theme_item>
+ <theme_item name="resizer" type="Texture">
+ </theme_item>
+ <theme_item name="selectedframe" type="StyleBox">
+ </theme_item>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ <theme_item name="title_color" type="Color">
+ </theme_item>
+ <theme_item name="title_font" type="Font">
+ </theme_item>
+ <theme_item name="title_offset" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
new file mode 100644
index 0000000000..ca7b868cd8
--- /dev/null
+++ b/doc/classes/GridContainer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GridContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Grid container used to arrange elements in a grid like layout
+ </brief_description>
+ <description>
+ Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_columns" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of columns in this container
+ </description>
+ </method>
+ <method name="set_columns">
+ <return type="void">
+ </return>
+ <argument index="0" name="columns" type="int">
+ </argument>
+ <description>
+ Sets the numbers of columns in the container, then reorder its children to accommodate the new layout
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="columns" type="int" setter="set_columns" getter="get_columns">
+ </member>
+ </members>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="vseparation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
new file mode 100644
index 0000000000..3db2d9aee9
--- /dev/null
+++ b/doc/classes/GrooveJoint2D.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Groove constraint for 2D physics.
+ </brief_description>
+ <description>
+ Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_initial_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Set the final offset of the groove on body A.
+ </description>
+ </method>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the length of the groove.
+ </description>
+ </method>
+ <method name="set_initial_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ Set the initial offset of the groove on body A.
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Set the length of the groove.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset">
+ </member>
+ <member name="length" type="float" setter="set_length" getter="get_length">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
new file mode 100644
index 0000000000..2ffc2a8c57
--- /dev/null
+++ b/doc/classes/HBoxContainer.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Horizontal box container.
+ </brief_description>
+ <description>
+ Horizontal box container. See [BoxContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
new file mode 100644
index 0000000000..188995527c
--- /dev/null
+++ b/doc/classes/HScrollBar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Horizontal scroll bar.
+ </brief_description>
+ <description>
+ Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="decrement" type="Texture">
+ </theme_item>
+ <theme_item name="decrement_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="grabber" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="increment" type="Texture">
+ </theme_item>
+ <theme_item name="increment_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="scroll" type="StyleBox">
+ </theme_item>
+ <theme_item name="scroll_focus" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
new file mode 100644
index 0000000000..351eee7ee6
--- /dev/null
+++ b/doc/classes/HSeparator.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HSeparator" inherits="Separator" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Horizontal separator.
+ </brief_description>
+ <description>
+ Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ <theme_item name="separator" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
new file mode 100644
index 0000000000..91f95d1548
--- /dev/null
+++ b/doc/classes/HSlider.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HSlider" inherits="Slider" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Horizontal slider.
+ </brief_description>
+ <description>
+ Horizontal slider. See [Slider]. This one goes from left (min) to right (max).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_disabled" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" type="StyleBox">
+ </theme_item>
+ <theme_item name="tick" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
new file mode 100644
index 0000000000..d7dc79a783
--- /dev/null
+++ b/doc/classes/HSplitContainer.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Horizontal split container.
+ </brief_description>
+ <description>
+ Horizontal split container. See [SplitContainer]. This goes from left to right.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="autohide" type="int">
+ </theme_item>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber" type="Texture">
+ </theme_item>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
new file mode 100644
index 0000000000..cf48ec84f6
--- /dev/null
+++ b/doc/classes/HTTPClient.xml
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HTTPClient" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Hyper-text transfer protocol client.
+ </brief_description>
+ <description>
+ Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification.
+ Can be reused to connect to different hosts and make many requests.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="close">
+ <return type="void">
+ </return>
+ <description>
+ Cloces the current connection, allows for reusal of [HTTPClient].
+ </description>
+ </method>
+ <method name="connect_to_host">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <argument index="2" name="use_ssl" type="bool" default="false">
+ </argument>
+ <argument index="3" name="verify_host" type="bool" default="true">
+ </argument>
+ <description>
+ Connect to a host. This needs to be done before any requests are sent.
+ The host should not have http:// prepended but will strip the protocol identifier if provided.
+ verify_host will check the SSL identity of the host if set to true.
+ </description>
+ </method>
+ <method name="get_connection" qualifiers="const">
+ <return type="StreamPeer">
+ </return>
+ <description>
+ Return current connection.
+ </description>
+ </method>
+ <method name="get_response_body_length" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the response's body length.
+ </description>
+ </method>
+ <method name="get_response_code" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the HTTP status code of the response.
+ </description>
+ </method>
+ <method name="get_response_headers">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return the response headers.
+ </description>
+ </method>
+ <method name="get_response_headers_as_dictionary">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.
+ Structure: ("key":"value1; value2")
+ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
+ </description>
+ </method>
+ <method name="get_status" qualifiers="const">
+ <return type="int" enum="HTTPClient.Status">
+ </return>
+ <description>
+ Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates.
+ </description>
+ </method>
+ <method name="has_response" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this [HTTPClient] has a response available.
+ </description>
+ </method>
+ <method name="is_blocking_mode_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether blocking mode is enabled.
+ </description>
+ </method>
+ <method name="is_response_chunked" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this [HTTPClient] has a response that is chunked.
+ </description>
+ </method>
+ <method name="poll">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ This needs to be called in order to have any request processed. Check results with [method get_status]
+ </description>
+ </method>
+ <method name="query_string_from_dict">
+ <return type="String">
+ </return>
+ <argument index="0" name="fields" type="Dictionary">
+ </argument>
+ <description>
+ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
+ [codeblock]
+ var fields = {"username": "user", "password": "pass"}
+ String queryString = httpClient.query_string_from_dict(fields)
+ returns:= "username=user&amp;password=pass"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="read_response_body_chunk">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ Reads one chunk from the response.
+ </description>
+ </method>
+ <method name="request">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="method" type="int" enum="HTTPClient.Method">
+ </argument>
+ <argument index="1" name="url" type="String">
+ </argument>
+ <argument index="2" name="headers" type="PoolStringArray">
+ </argument>
+ <argument index="3" name="body" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ To create a POST request with query strings to push to the server, do:
+ [codeblock]
+ var fields = {"username" : "user", "password" : "pass"}
+ var queryString = httpClient.query_string_from_dict(fields)
+ var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
+ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="request_raw">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="method" type="int" enum="HTTPClient.Method">
+ </argument>
+ <argument index="1" name="url" type="String">
+ </argument>
+ <argument index="2" name="headers" type="PoolStringArray">
+ </argument>
+ <argument index="3" name="body" type="PoolByteArray">
+ </argument>
+ <description>
+ Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
+ Headers are HTTP request headers.
+ Sends body raw, as a byte array, does not encode it in any way.
+ </description>
+ </method>
+ <method name="send_body_data">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="body" type="PoolByteArray">
+ </argument>
+ <description>
+ Stub function
+ </description>
+ </method>
+ <method name="send_body_text">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="body" type="String">
+ </argument>
+ <description>
+ Stub function
+ </description>
+ </method>
+ <method name="set_blocking_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ If set to true, execution will block until all data is read from the response.
+ </description>
+ </method>
+ <method name="set_connection">
+ <return type="void">
+ </return>
+ <argument index="0" name="connection" type="StreamPeer">
+ </argument>
+ <description>
+ Set connection to use, for this client.
+ </description>
+ </method>
+ <method name="set_read_chunk_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk]
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="METHOD_GET" value="0">
+ </constant>
+ <constant name="METHOD_HEAD" value="1">
+ </constant>
+ <constant name="METHOD_POST" value="2">
+ </constant>
+ <constant name="METHOD_PUT" value="3">
+ </constant>
+ <constant name="METHOD_DELETE" value="4">
+ </constant>
+ <constant name="METHOD_OPTIONS" value="5">
+ </constant>
+ <constant name="METHOD_TRACE" value="6">
+ </constant>
+ <constant name="METHOD_CONNECT" value="7">
+ </constant>
+ <constant name="METHOD_MAX" value="8">
+ </constant>
+ <constant name="STATUS_DISCONNECTED" value="0">
+ </constant>
+ <constant name="STATUS_RESOLVING" value="1">
+ </constant>
+ <constant name="STATUS_CANT_RESOLVE" value="2">
+ </constant>
+ <constant name="STATUS_CONNECTING" value="3">
+ </constant>
+ <constant name="STATUS_CANT_CONNECT" value="4">
+ </constant>
+ <constant name="STATUS_CONNECTED" value="5">
+ </constant>
+ <constant name="STATUS_REQUESTING" value="6">
+ </constant>
+ <constant name="STATUS_BODY" value="7">
+ </constant>
+ <constant name="STATUS_CONNECTION_ERROR" value="8">
+ </constant>
+ <constant name="STATUS_SSL_HANDSHAKE_ERROR" value="9">
+ </constant>
+ <constant name="RESPONSE_CONTINUE" value="100">
+ </constant>
+ <constant name="RESPONSE_SWITCHING_PROTOCOLS" value="101">
+ </constant>
+ <constant name="RESPONSE_PROCESSING" value="102">
+ </constant>
+ <constant name="RESPONSE_OK" value="200">
+ </constant>
+ <constant name="RESPONSE_CREATED" value="201">
+ </constant>
+ <constant name="RESPONSE_ACCEPTED" value="202">
+ </constant>
+ <constant name="RESPONSE_NON_AUTHORITATIVE_INFORMATION" value="203">
+ </constant>
+ <constant name="RESPONSE_NO_CONTENT" value="204">
+ </constant>
+ <constant name="RESPONSE_RESET_CONTENT" value="205">
+ </constant>
+ <constant name="RESPONSE_PARTIAL_CONTENT" value="206">
+ </constant>
+ <constant name="RESPONSE_MULTI_STATUS" value="207">
+ </constant>
+ <constant name="RESPONSE_IM_USED" value="226">
+ </constant>
+ <constant name="RESPONSE_MULTIPLE_CHOICES" value="300">
+ </constant>
+ <constant name="RESPONSE_MOVED_PERMANENTLY" value="301">
+ </constant>
+ <constant name="RESPONSE_FOUND" value="302">
+ </constant>
+ <constant name="RESPONSE_SEE_OTHER" value="303">
+ </constant>
+ <constant name="RESPONSE_NOT_MODIFIED" value="304">
+ </constant>
+ <constant name="RESPONSE_USE_PROXY" value="305">
+ </constant>
+ <constant name="RESPONSE_TEMPORARY_REDIRECT" value="307">
+ </constant>
+ <constant name="RESPONSE_BAD_REQUEST" value="400">
+ </constant>
+ <constant name="RESPONSE_UNAUTHORIZED" value="401">
+ </constant>
+ <constant name="RESPONSE_PAYMENT_REQUIRED" value="402">
+ </constant>
+ <constant name="RESPONSE_FORBIDDEN" value="403">
+ </constant>
+ <constant name="RESPONSE_NOT_FOUND" value="404">
+ </constant>
+ <constant name="RESPONSE_METHOD_NOT_ALLOWED" value="405">
+ </constant>
+ <constant name="RESPONSE_NOT_ACCEPTABLE" value="406">
+ </constant>
+ <constant name="RESPONSE_PROXY_AUTHENTICATION_REQUIRED" value="407">
+ </constant>
+ <constant name="RESPONSE_REQUEST_TIMEOUT" value="408">
+ </constant>
+ <constant name="RESPONSE_CONFLICT" value="409">
+ </constant>
+ <constant name="RESPONSE_GONE" value="410">
+ </constant>
+ <constant name="RESPONSE_LENGTH_REQUIRED" value="411">
+ </constant>
+ <constant name="RESPONSE_PRECONDITION_FAILED" value="412">
+ </constant>
+ <constant name="RESPONSE_REQUEST_ENTITY_TOO_LARGE" value="413">
+ </constant>
+ <constant name="RESPONSE_REQUEST_URI_TOO_LONG" value="414">
+ </constant>
+ <constant name="RESPONSE_UNSUPPORTED_MEDIA_TYPE" value="415">
+ </constant>
+ <constant name="RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE" value="416">
+ </constant>
+ <constant name="RESPONSE_EXPECTATION_FAILED" value="417">
+ </constant>
+ <constant name="RESPONSE_UNPROCESSABLE_ENTITY" value="422">
+ </constant>
+ <constant name="RESPONSE_LOCKED" value="423">
+ </constant>
+ <constant name="RESPONSE_FAILED_DEPENDENCY" value="424">
+ </constant>
+ <constant name="RESPONSE_UPGRADE_REQUIRED" value="426">
+ </constant>
+ <constant name="RESPONSE_INTERNAL_SERVER_ERROR" value="500">
+ </constant>
+ <constant name="RESPONSE_NOT_IMPLEMENTED" value="501">
+ </constant>
+ <constant name="RESPONSE_BAD_GATEWAY" value="502">
+ </constant>
+ <constant name="RESPONSE_SERVICE_UNAVAILABLE" value="503">
+ </constant>
+ <constant name="RESPONSE_GATEWAY_TIMEOUT" value="504">
+ </constant>
+ <constant name="RESPONSE_HTTP_VERSION_NOT_SUPPORTED" value="505">
+ </constant>
+ <constant name="RESPONSE_INSUFFICIENT_STORAGE" value="507">
+ </constant>
+ <constant name="RESPONSE_NOT_EXTENDED" value="510">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
new file mode 100644
index 0000000000..c2839890cf
--- /dev/null
+++ b/doc/classes/HTTPRequest.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HTTPRequest" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A Node with the ability to send HTTP requests.
+ </brief_description>
+ <description>
+ A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS.
+ Can be used to make HTTP requests or download files via HTTP.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="cancel_request">
+ <return type="void">
+ </return>
+ <description>
+ Cancel the current request.
+ </description>
+ </method>
+ <method name="get_body_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the response body length.
+ </description>
+ </method>
+ <method name="get_body_size_limit" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return current body size limit.
+ </description>
+ </method>
+ <method name="get_download_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the file this request will download into.
+ </description>
+ </method>
+ <method name="get_downloaded_bytes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of bytes this HTTPRequest downloaded.
+ </description>
+ </method>
+ <method name="get_http_client_status" qualifiers="const">
+ <return type="int" enum="HTTPClient.Status">
+ </return>
+ <description>
+ Return the current status of the underlying [HTTPClient].
+ </description>
+ </method>
+ <method name="get_max_redirects" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the maximum amount of redirects that will be followed.
+ </description>
+ </method>
+ <method name="is_using_threads" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Whether this request is using threads.
+ </description>
+ </method>
+ <method name="request">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="url" type="String">
+ </argument>
+ <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray( )">
+ </argument>
+ <argument index="2" name="ssl_validate_domain" type="bool" default="true">
+ </argument>
+ <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0">
+ </argument>
+ <argument index="4" name="request_data" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_body_size_limit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Set the response body size limit.
+ </description>
+ </method>
+ <method name="set_download_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Set the file to download into. Outputs the response body into the file.
+ </description>
+ </method>
+ <method name="set_max_redirects">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set the maximum amount of redirects the request will follow.
+ </description>
+ </method>
+ <method name="set_use_threads">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Make this HTTPRequest use threads.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit">
+ </member>
+ <member name="max_redirects" type="int" setter="set_max_redirects" getter="get_max_redirects">
+ </member>
+ <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads">
+ </member>
+ </members>
+ <signals>
+ <signal name="request_completed">
+ <argument index="0" name="result" type="int">
+ </argument>
+ <argument index="1" name="response_code" type="int">
+ </argument>
+ <argument index="2" name="headers" type="PoolStringArray">
+ </argument>
+ <argument index="3" name="body" type="PoolByteArray">
+ </argument>
+ <description>
+ This signal is emitted upon request completion.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="RESULT_SUCCESS" value="0">
+ Request successful.
+ </constant>
+ <constant name="RESULT_CHUNKED_BODY_SIZE_MISMATCH" value="1">
+ </constant>
+ <constant name="RESULT_CANT_CONNECT" value="2">
+ Request failed while connecting.
+ </constant>
+ <constant name="RESULT_CANT_RESOLVE" value="3">
+ Request failed while resolving.
+ </constant>
+ <constant name="RESULT_CONNECTION_ERROR" value="4">
+ Request failed due to connection(read/write) error.
+ </constant>
+ <constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5">
+ Request failed on SSL handshake.
+ </constant>
+ <constant name="RESULT_NO_RESPONSE" value="6">
+ Request does not have a response(yet).
+ </constant>
+ <constant name="RESULT_BODY_SIZE_LIMIT_EXCEEDED" value="7">
+ Request exceded its maximum size limit, see [method set_body_size_limit].
+ </constant>
+ <constant name="RESULT_REQUEST_FAILED" value="8">
+ Request failed. (unused)
+ </constant>
+ <constant name="RESULT_DOWNLOAD_FILE_CANT_OPEN" value="9">
+ HTTPRequest couldn't open the download file.
+ </constant>
+ <constant name="RESULT_DOWNLOAD_FILE_WRITE_ERROR" value="10">
+ HTTPRequest couldn't write to the download file.
+ </constant>
+ <constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11">
+ Request reached its maximum redirect limit, see [method set_max_redirects].
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml
new file mode 100644
index 0000000000..ae3693c3a4
--- /dev/null
+++ b/doc/classes/HingeJoint.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HingeJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="HingeJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="HingeJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit">
+ </member>
+ <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit">
+ </member>
+ <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="params/bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_BIAS" value="0">
+ </constant>
+ <constant name="PARAM_LIMIT_UPPER" value="1">
+ </constant>
+ <constant name="PARAM_LIMIT_LOWER" value="2">
+ </constant>
+ <constant name="PARAM_LIMIT_BIAS" value="3">
+ </constant>
+ <constant name="PARAM_LIMIT_SOFTNESS" value="4">
+ </constant>
+ <constant name="PARAM_LIMIT_RELAXATION" value="5">
+ </constant>
+ <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6">
+ </constant>
+ <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7">
+ </constant>
+ <constant name="PARAM_MAX" value="8">
+ </constant>
+ <constant name="FLAG_USE_LIMIT" value="0">
+ </constant>
+ <constant name="FLAG_ENABLE_MOTOR" value="1">
+ </constant>
+ <constant name="FLAG_MAX" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
new file mode 100644
index 0000000000..fed7000df6
--- /dev/null
+++ b/doc/classes/IP.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="IP" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ IP Protocol support functions.
+ </brief_description>
+ <description>
+ IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear_cache">
+ <return type="void">
+ </return>
+ <argument index="0" name="hostname" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed.
+ </description>
+ </method>
+ <method name="erase_resolve_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
+ </description>
+ </method>
+ <method name="get_local_addresses" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns all of the user's current IPv4 and IPv6 addresses as an array.
+ </description>
+ </method>
+ <method name="get_resolve_item_address" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).
+ </description>
+ </method>
+ <method name="get_resolve_item_status" qualifiers="const">
+ <return type="int" enum="IP.ResolverStatus">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id".
+ </description>
+ </method>
+ <method name="resolve_hostname">
+ <return type="String">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
+ </argument>
+ <description>
+ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type".
+ </description>
+ </method>
+ <method name="resolve_hostname_queue_item">
+ <return type="int">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
+ </argument>
+ <description>
+ Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="RESOLVER_STATUS_NONE" value="0">
+ </constant>
+ <constant name="RESOLVER_STATUS_WAITING" value="1">
+ </constant>
+ <constant name="RESOLVER_STATUS_DONE" value="2">
+ </constant>
+ <constant name="RESOLVER_STATUS_ERROR" value="3">
+ </constant>
+ <constant name="RESOLVER_MAX_QUERIES" value="32" enum="">
+ </constant>
+ <constant name="RESOLVER_INVALID_ID" value="-1" enum="">
+ </constant>
+ <constant name="TYPE_NONE" value="0">
+ </constant>
+ <constant name="TYPE_IPV4" value="1">
+ </constant>
+ <constant name="TYPE_IPV6" value="2">
+ </constant>
+ <constant name="TYPE_ANY" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml
new file mode 100644
index 0000000000..d30ad795a8
--- /dev/null
+++ b/doc/classes/IP_Unix.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="IP_Unix" inherits="IP" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
new file mode 100644
index 0000000000..f4ea9d00ce
--- /dev/null
+++ b/doc/classes/Image.xml
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Image" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Image datatype.
+ </brief_description>
+ <description>
+ Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="blend_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="src" type="Image">
+ </argument>
+ <argument index="1" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="2" name="dst" type="Vector2">
+ </argument>
+ <description>
+ Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
+ </description>
+ </method>
+ <method name="blend_rect_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="src" type="Image">
+ </argument>
+ <argument index="1" name="mask" type="Image">
+ </argument>
+ <argument index="2" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="3" name="dst" type="Vector2">
+ </argument>
+ <description>
+ Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
+ </description>
+ </method>
+ <method name="blit_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="src" type="Image">
+ </argument>
+ <argument index="1" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="2" name="dst" type="Vector2">
+ </argument>
+ <description>
+ Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
+ </description>
+ </method>
+ <method name="blit_rect_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="src" type="Image">
+ </argument>
+ <argument index="1" name="mask" type="Image">
+ </argument>
+ <argument index="2" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="3" name="dst" type="Vector2">
+ </argument>
+ <description>
+ Blits a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
+ </description>
+ </method>
+ <method name="clear_mipmaps">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="compress">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Image.CompressMode">
+ </argument>
+ <argument index="1" name="source" type="int" enum="Image.CompressSource">
+ </argument>
+ <argument index="2" name="lossy_quality" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="convert">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="Image.Format">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="copy_from">
+ <return type="void">
+ </return>
+ <argument index="0" name="src" type="Image">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <argument index="1" name="height" type="int">
+ </argument>
+ <argument index="2" name="use_mipmaps" type="bool">
+ </argument>
+ <argument index="3" name="format" type="int" enum="Image.Format">
+ </argument>
+ <description>
+ Create an empty image of a specific size and format.
+ </description>
+ </method>
+ <method name="create_from_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <argument index="1" name="height" type="int">
+ </argument>
+ <argument index="2" name="use_mipmaps" type="bool">
+ </argument>
+ <argument index="3" name="format" type="int" enum="Image.Format">
+ </argument>
+ <argument index="4" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="crop">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <argument index="1" name="height" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="decompress">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="detect_alpha" qualifiers="const">
+ <return type="int" enum="Image.AlphaMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="expand_x2_hq2x">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="fill">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Fills an [Image] with a specified [Color]
+ </description>
+ </method>
+ <method name="fix_alpha_edges">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="flip_x">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="flip_y">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="generate_mipmaps">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ Return the raw data of the [Image].
+ </description>
+ </method>
+ <method name="get_format" qualifiers="const">
+ <return type="int" enum="Image.Format">
+ </return>
+ <description>
+ Return the format of the [Image], one of [Image].FORMAT_*.
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the height of the [Image].
+ </description>
+ </method>
+ <method name="get_mipmap_offset" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="mipmap" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_pixel" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_rect" qualifiers="const">
+ <return type="Image">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Return a new [Image] that is a copy of "area" in this [Image].
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_used_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return the area of this [Image] that is used/visibly colored/opaque.
+ </description>
+ </method>
+ <method name="get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the width of the [Image].
+ </description>
+ </method>
+ <method name="has_mipmaps" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_compressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_invisible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="load">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Load an [Image].
+ </description>
+ </method>
+ <method name="lock">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="normalmap_to_xy">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="premultiply_alpha">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <argument index="1" name="height" type="int">
+ </argument>
+ <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="resize_to_po2">
+ <return type="void">
+ </return>
+ <argument index="0" name="square" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save_png" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Save this [Image] as a png.
+ </description>
+ </method>
+ <method name="set_pixel">
+ <return type="void">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shrink_x2">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="srgb_to_linear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="unlock">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <constants>
+ <constant name="FORMAT_L8" value="0">
+ </constant>
+ <constant name="FORMAT_LA8" value="1">
+ </constant>
+ <constant name="FORMAT_R8" value="2">
+ </constant>
+ <constant name="FORMAT_RG8" value="3">
+ </constant>
+ <constant name="FORMAT_RGB8" value="4">
+ </constant>
+ <constant name="FORMAT_RGBA8" value="5">
+ </constant>
+ <constant name="FORMAT_RGBA4444" value="6">
+ </constant>
+ <constant name="FORMAT_RGBA5551" value="7">
+ </constant>
+ <constant name="FORMAT_RF" value="8">
+ </constant>
+ <constant name="FORMAT_RGF" value="9">
+ </constant>
+ <constant name="FORMAT_RGBF" value="10">
+ </constant>
+ <constant name="FORMAT_RGBAF" value="11">
+ </constant>
+ <constant name="FORMAT_RH" value="12">
+ </constant>
+ <constant name="FORMAT_RGH" value="13">
+ </constant>
+ <constant name="FORMAT_RGBH" value="14">
+ </constant>
+ <constant name="FORMAT_RGBAH" value="15">
+ </constant>
+ <constant name="FORMAT_RGBE9995" value="16">
+ </constant>
+ <constant name="FORMAT_DXT1" value="17">
+ </constant>
+ <constant name="FORMAT_DXT3" value="18">
+ </constant>
+ <constant name="FORMAT_DXT5" value="19">
+ </constant>
+ <constant name="FORMAT_RGTC_R" value="20">
+ </constant>
+ <constant name="FORMAT_RGTC_RG" value="21">
+ </constant>
+ <constant name="FORMAT_BPTC_RGBA" value="22">
+ </constant>
+ <constant name="FORMAT_BPTC_RGBF" value="23">
+ </constant>
+ <constant name="FORMAT_BPTC_RGBFU" value="24">
+ </constant>
+ <constant name="FORMAT_PVRTC2" value="25">
+ </constant>
+ <constant name="FORMAT_PVRTC2A" value="26">
+ </constant>
+ <constant name="FORMAT_PVRTC4" value="27">
+ </constant>
+ <constant name="FORMAT_PVRTC4A" value="28">
+ </constant>
+ <constant name="FORMAT_ETC" value="29">
+ </constant>
+ <constant name="FORMAT_ETC2_R11" value="30">
+ </constant>
+ <constant name="FORMAT_ETC2_R11S" value="31">
+ </constant>
+ <constant name="FORMAT_ETC2_RG11" value="32">
+ </constant>
+ <constant name="FORMAT_ETC2_RG11S" value="33">
+ </constant>
+ <constant name="FORMAT_ETC2_RGB8" value="34">
+ </constant>
+ <constant name="FORMAT_ETC2_RGBA8" value="35">
+ </constant>
+ <constant name="FORMAT_ETC2_RGB8A1" value="36">
+ </constant>
+ <constant name="FORMAT_MAX" value="37">
+ </constant>
+ <constant name="INTERPOLATE_NEAREST" value="0">
+ </constant>
+ <constant name="INTERPOLATE_BILINEAR" value="1">
+ </constant>
+ <constant name="INTERPOLATE_CUBIC" value="2">
+ </constant>
+ <constant name="ALPHA_NONE" value="0">
+ </constant>
+ <constant name="ALPHA_BIT" value="1">
+ </constant>
+ <constant name="ALPHA_BLEND" value="2">
+ </constant>
+ <constant name="COMPRESS_S3TC" value="0">
+ </constant>
+ <constant name="COMPRESS_PVRTC2" value="1">
+ </constant>
+ <constant name="COMPRESS_PVRTC4" value="2">
+ </constant>
+ <constant name="COMPRESS_ETC" value="3">
+ </constant>
+ <constant name="COMPRESS_ETC2" value="4">
+ </constant>
+ <constant name="COMPRESS_SOURCE_GENERIC" value="0">
+ </constant>
+ <constant name="COMPRESS_SOURCE_SRGB" value="1">
+ </constant>
+ <constant name="COMPRESS_SOURCE_NORMAL" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
new file mode 100644
index 0000000000..2b74a15fd5
--- /dev/null
+++ b/doc/classes/ImageTexture.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImageTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A [Texture] based on an [Image].
+ </brief_description>
+ <description>
+ A [Texture] based on an [Image]. Can be created from an [Image].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="create">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <argument index="1" name="height" type="int">
+ </argument>
+ <argument index="2" name="format" type="int" enum="Image.Format">
+ </argument>
+ <argument index="3" name="flags" type="int" default="7">
+ </argument>
+ <description>
+ Create a new [ImageTexture] with "width" and "height".
+ "format" one of [Image].FORMAT_*.
+ "flags" one or more of [Texture].FLAG_*.
+ </description>
+ </method>
+ <method name="create_from_image">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <argument index="1" name="flags" type="int" default="7">
+ </argument>
+ <description>
+ Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
+ </description>
+ </method>
+ <method name="get_format" qualifiers="const">
+ <return type="int" enum="Image.Format">
+ </return>
+ <description>
+ Return the format of the [ImageTexture], one of [Image].FORMAT_*.
+ </description>
+ </method>
+ <method name="get_lossy_storage_quality" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ </description>
+ </method>
+ <method name="get_storage" qualifiers="const">
+ <return type="int" enum="ImageTexture.Storage">
+ </return>
+ <description>
+ Return the storage type. One of [ImageTexture].STORAGE_*.
+ </description>
+ </method>
+ <method name="load">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Load an [ImageTexure].
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <description>
+ Set the [Image] of this [ImageTexture].
+ </description>
+ </method>
+ <method name="set_lossy_storage_quality">
+ <return type="void">
+ </return>
+ <argument index="0" name="quality" type="float">
+ </argument>
+ <description>
+ Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ </description>
+ </method>
+ <method name="set_size_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_storage">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ImageTexture.Storage">
+ </argument>
+ <description>
+ Set the storage type. One of [ImageTexture].STORAGE_*.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STORAGE_RAW" value="0">
+ [Image] data is stored raw and unaltered.
+ </constant>
+ <constant name="STORAGE_COMPRESS_LOSSY" value="1">
+ [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality].
+ </constant>
+ <constant name="STORAGE_COMPRESS_LOSSLESS" value="2">
+ [Image] data is compressed with a lossless algorithm.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml
new file mode 100644
index 0000000000..7b45c0c678
--- /dev/null
+++ b/doc/classes/ImmediateGeometry.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node to draw simple geometry from code, ala OpenGL 1.x
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_sphere">
+ <return type="void">
+ </return>
+ <argument index="0" name="lats" type="int">
+ </argument>
+ <argument index="1" name="lons" type="int">
+ </argument>
+ <argument index="2" name="radius" type="float">
+ </argument>
+ <argument index="3" name="add_uv" type="bool" default="true">
+ </argument>
+ <description>
+ Simple helper to draw a uvsphere, with given latitudes, longitude and radius.
+ </description>
+ </method>
+ <method name="add_vertex">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <description>
+ Add a vertex with the currently set color/uv/etc.
+ </description>
+ </method>
+ <method name="begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <argument index="1" name="texture" type="Texture" default="null">
+ </argument>
+ <description>
+ Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
+ For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear everything that was drawn using begin/end.
+ </description>
+ </method>
+ <method name="end">
+ <return type="void">
+ </return>
+ <description>
+ Call this when done adding a batch of geometry, otherwise it can't be displayed.
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set the color that the next vertex will use to be drawn.
+ </description>
+ </method>
+ <method name="set_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Set the normal that the next vertex will use to be drawn.
+ </description>
+ </method>
+ <method name="set_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="tangent" type="Plane">
+ </argument>
+ <description>
+ Set the tangent (and binormal facing) that the next vertex will use to be drawn.
+ </description>
+ </method>
+ <method name="set_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="Vector2">
+ </argument>
+ <description>
+ Set the UV that the next vertex will use to be drawn.
+ </description>
+ </method>
+ <method name="set_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="Vector2">
+ </argument>
+ <description>
+ Set the second layer of UV that the next vertex will use to be drawn.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
new file mode 100644
index 0000000000..f636000242
--- /dev/null
+++ b/doc/classes/Input.xml
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Input" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A Singleton that deals with inputs.
+ </brief_description>
+ <description>
+ A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="action_press">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ This will simulate pressing the specificed action.
+ </description>
+ </method>
+ <method name="action_release">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ If the specified action is already pressed, this will release it.
+ </description>
+ </method>
+ <method name="add_joy_mapping">
+ <return type="void">
+ </return>
+ <argument index="0" name="mapping" type="String">
+ </argument>
+ <argument index="1" name="update_existing" type="bool" default="false">
+ </argument>
+ <description>
+ Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
+ </description>
+ </method>
+ <method name="get_accelerometer" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ If the device has an accelerometer, this will return the movement.
+ </description>
+ </method>
+ <method name="get_connected_joypads">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an [Array] containing the device IDs of all currently connected joypads.
+ </description>
+ </method>
+ <method name="get_gravity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_gyroscope" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis.
+ </description>
+ </method>
+ <method name="get_joy_axis" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <argument index="1" name="axis" type="int">
+ </argument>
+ <description>
+ Returns the current value of the joypad axis at given index (see JOY_* constants in [@Global Scope])
+ </description>
+ </method>
+ <method name="get_joy_axis_index_from_string">
+ <return type="int">
+ </return>
+ <argument index="0" name="axis" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_joy_axis_string">
+ <return type="String">
+ </return>
+ <argument index="0" name="axis_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_joy_button_index_from_string">
+ <return type="int">
+ </return>
+ <argument index="0" name="button" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_joy_button_string">
+ <return type="String">
+ </return>
+ <argument index="0" name="button_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_joy_guid" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise.
+ </description>
+ </method>
+ <method name="get_joy_name">
+ <return type="String">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Returns the name of the joypad at the specified device index
+ </description>
+ </method>
+ <method name="get_joy_vibration_duration">
+ <return type="float">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Returns the duration of the current vibration effect in seconds.
+ </description>
+ </method>
+ <method name="get_joy_vibration_strength">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
+ </description>
+ </method>
+ <method name="get_last_mouse_speed" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion.
+ </description>
+ </method>
+ <method name="get_magnetometer" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes.
+ </description>
+ </method>
+ <method name="get_mouse_button_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together.
+ </description>
+ </method>
+ <method name="get_mouse_mode" qualifiers="const">
+ <return type="int" enum="Input.MouseMode">
+ </return>
+ <description>
+ Return the mouse mode. See the constants for more information.
+ </description>
+ </method>
+ <method name="is_action_just_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_action_just_released" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_action_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap].
+ </description>
+ </method>
+ <method name="is_joy_button_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <argument index="1" name="button" type="int">
+ </argument>
+ <description>
+ Returns if the joypad button at the given index is currently pressed. (see JOY_* constants in [@Global Scope])
+ </description>
+ </method>
+ <method name="is_joy_known">
+ <return type="bool">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
+ </description>
+ </method>
+ <method name="is_key_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="scancode" type="int">
+ </argument>
+ <description>
+ Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope].
+ </description>
+ </method>
+ <method name="is_mouse_button_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope].
+ </description>
+ </method>
+ <method name="parse_input_event">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_joy_mapping">
+ <return type="void">
+ </return>
+ <argument index="0" name="guid" type="String">
+ </argument>
+ <description>
+ Removes all mappings from the internal db that match the given uid.
+ </description>
+ </method>
+ <method name="set_custom_mouse_cursor">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Resource">
+ </argument>
+ <argument index="1" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mouse_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Input.MouseMode">
+ </argument>
+ <description>
+ Set the mouse mode. See the constants for more information.
+ </description>
+ </method>
+ <method name="start_joy_vibration">
+ <return type="void">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <argument index="1" name="weak_magnitude" type="float">
+ </argument>
+ <argument index="2" name="strong_magnitude" type="float">
+ </argument>
+ <argument index="3" name="duration" type="float" default="0">
+ </argument>
+ <description>
+ Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
+ Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds.
+ </description>
+ </method>
+ <method name="stop_joy_vibration">
+ <return type="void">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ Stops the vibration of the joypad.
+ </description>
+ </method>
+ <method name="warp_mouse_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Sets the mouse position to the specified vector.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="joy_connection_changed">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="connected" type="bool">
+ </argument>
+ <description>
+ Emitted when a joypad device has been connected or disconnected
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MOUSE_MODE_VISIBLE" value="0">
+ Makes the mouse cursor visible if it is hidden.
+ </constant>
+ <constant name="MOUSE_MODE_HIDDEN" value="1">
+ Makes the mouse cursor hidden if it is visible.
+ </constant>
+ <constant name="MOUSE_MODE_CAPTURED" value="2">
+ Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses.
+ </constant>
+ <constant name="MOUSE_MODE_CONFINED" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml
new file mode 100644
index 0000000000..cb8ad6b823
--- /dev/null
+++ b/doc/classes/InputDefault.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputDefault" inherits="Input" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Default implementation of the [Input] class.
+ </brief_description>
+ <description>
+ Default implementation of the [Input] class, used internally by the editor and games for default input management.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
new file mode 100644
index 0000000000..392ee25ad6
--- /dev/null
+++ b/doc/classes/InputEvent.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEvent" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generic input event
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="action_match" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Returns true if this input event matches the event passed.
+ </description>
+ </method>
+ <method name="as_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns a [String] representation of the event.
+ </description>
+ </method>
+ <method name="get_device" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the id of the device that generated the event.
+ </description>
+ </method>
+ <method name="get_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the id of the event.
+ </description>
+ </method>
+ <method name="is_action" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Returns true if this input event matches a pre-defined action, no matter the type.
+ </description>
+ </method>
+ <method name="is_action_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ </description>
+ </method>
+ <method name="is_action_released" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ </description>
+ </method>
+ <method name="is_action_type" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_echo" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types).
+ </description>
+ </method>
+ <method name="is_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ </description>
+ </method>
+ <method name="set_device">
+ <return type="void">
+ </return>
+ <argument index="0" name="device" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shortcut_match" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="xformed_by" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="local_ofs" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="device" type="int" setter="set_device" getter="get_device">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
new file mode 100644
index 0000000000..2617ea4dfa
--- /dev/null
+++ b/doc/classes/InputEventAction.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for actions.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_action" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_action">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="action" type="String" setter="set_action" getter="get_action">
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
new file mode 100644
index 0000000000..2784b06442
--- /dev/null
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for joypad button events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_button_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pressure" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_button_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="button_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressure">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressure" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="button_index" type="int" setter="set_button_index" getter="get_button_index">
+ Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope].
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ Pressed state of the joypad button.
+ </member>
+ <member name="pressure" type="float" setter="set_pressure" getter="get_pressure">
+ Intensity of the button pressure, ranges from 0 to 1.0.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
new file mode 100644
index 0000000000..8a26007fc1
--- /dev/null
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for joypad motion/axis events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_axis" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_axis_value" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_axis">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_axis_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis_value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="axis" type="int" setter="set_axis" getter="get_axis">
+ Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope].
+ </member>
+ <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value">
+ Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
new file mode 100644
index 0000000000..151e19d25d
--- /dev/null
+++ b/doc/classes/InputEventKey.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for keyboard events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_scancode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_scancode_with_modifiers" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unicode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_echo">
+ <return type="void">
+ </return>
+ <argument index="0" name="echo" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scancode">
+ <return type="void">
+ </return>
+ <argument index="0" name="scancode" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_unicode">
+ <return type="void">
+ </return>
+ <argument index="0" name="unicode" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="echo" type="bool" setter="set_echo" getter="is_echo">
+ Echo state of the key, i.e. whether it's a repeat event or not.
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ Pressed state of the key.
+ </member>
+ <member name="scancode" type="int" setter="set_scancode" getter="get_scancode">
+ Scancode of the key, one of the KEY_* constants in [@Global Scope].
+ </member>
+ <member name="unicode" type="int" setter="set_unicode" getter="get_unicode">
+ Unicode identifier of the key (when relevant).
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
new file mode 100644
index 0000000000..57f0acbf30
--- /dev/null
+++ b/doc/classes/InputEventMouse.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base input event type for mouse events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_button_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_global_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_button_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="button_mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_global_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="global_position" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask">
+ Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope].
+ </member>
+ <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position">
+ Global position of the mouse click.
+ </member>
+ <member name="position" type="Vector2" setter="set_position" getter="get_position">
+ Local position of the mouse click.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
new file mode 100644
index 0000000000..63e31eb61c
--- /dev/null
+++ b/doc/classes/InputEventMouseButton.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for mouse button events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_button_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_factor">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_doubleclick" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_button_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="button_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_doubleclick">
+ <return type="void">
+ </return>
+ <argument index="0" name="doubleclick" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_factor">
+ <return type="void">
+ </return>
+ <argument index="0" name="factor" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="button_index" type="int" setter="set_button_index" getter="get_button_index">
+ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope].
+ </member>
+ <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick">
+ Whether the event is a double-click.
+ </member>
+ <member name="factor" type="float" setter="set_factor" getter="get_factor">
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ Pressed state of the mouse button.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
new file mode 100644
index 0000000000..59fe8d2e58
--- /dev/null
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for mouse motion events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_relative" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_speed" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_relative">
+ <return type="void">
+ </return>
+ <argument index="0" name="relative" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="relative" type="Vector2" setter="set_relative" getter="get_relative">
+ Position of the mouse pointer relative to the previous mouse position.
+ </member>
+ <member name="speed" type="Vector2" setter="set_speed" getter="get_speed">
+ Speed of the mouse pointer.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
new file mode 100644
index 0000000000..0b0ecc17bc
--- /dev/null
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for screen drag events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_relative" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_speed" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_relative">
+ <return type="void">
+ </return>
+ <argument index="0" name="relative" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="index" type="int" setter="set_index" getter="get_index">
+ Drag event index in the case of a multi-drag event.
+ </member>
+ <member name="position" type="Vector2" setter="set_position" getter="get_position">
+ Position of the drag event.
+ </member>
+ <member name="relative" type="Vector2" setter="set_relative" getter="get_relative">
+ Position of the drag event relative to its start position.
+ </member>
+ <member name="speed" type="Vector2" setter="set_speed" getter="get_speed">
+ Speed of the drag event.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
new file mode 100644
index 0000000000..97c3537364
--- /dev/null
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Input event type for screen touch events.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="index" type="int" setter="set_index" getter="get_index">
+ Touch event index in the case of a multi-touch event.
+ </member>
+ <member name="position" type="Vector2" setter="set_position" getter="get_position">
+ Position of the touch event.
+ </member>
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ Pressed state of the touch event.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
new file mode 100644
index 0000000000..7bbdf0a441
--- /dev/null
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for input events with modifiers.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_alt" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_command" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_control" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_metakey" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shift" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_alt">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_command">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_control">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_metakey">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shift">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="alt" type="bool" setter="set_alt" getter="get_alt">
+ State of the Alt modifier.
+ </member>
+ <member name="command" type="bool" setter="set_command" getter="get_command">
+ State of the Command modifier.
+ </member>
+ <member name="control" type="bool" setter="set_control" getter="get_control">
+ State of the Ctrl modifier.
+ </member>
+ <member name="meta" type="bool" setter="set_metakey" getter="get_metakey">
+ State of the Meta modifier.
+ </member>
+ <member name="shift" type="bool" setter="set_shift" getter="get_shift">
+ State of the Shift modifier.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
new file mode 100644
index 0000000000..bf72ba05e7
--- /dev/null
+++ b/doc/classes/InputMap.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputMap" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Singleton that manages actions.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="action_add_event">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
+ </description>
+ </method>
+ <method name="action_erase_event">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Remove an [InputEvent] from an action.
+ </description>
+ </method>
+ <method name="action_has_event">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <argument index="1" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Whether an action has an [InputEvent] associated with it.
+ </description>
+ </method>
+ <method name="add_action">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
+ </description>
+ </method>
+ <method name="erase_action">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Remove an action from the [InputMap].
+ </description>
+ </method>
+ <method name="event_is_action" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <argument index="1" name="action" type="String">
+ </argument>
+ <description>
+ Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
+ </description>
+ </method>
+ <method name="get_action_list">
+ <return type="Array">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Return an array of InputEvents associated with a given action.
+ </description>
+ </method>
+ <method name="get_actions">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array of all actions in the [InputMap].
+ </description>
+ </method>
+ <method name="has_action" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ Whether this InputMap has a registered action with the given name.
+ </description>
+ </method>
+ <method name="load_from_globals">
+ <return type="void">
+ </return>
+ <description>
+ Clear the [InputMap] and load it anew from [ProjectSettings].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
new file mode 100644
index 0000000000..e962192f81
--- /dev/null
+++ b/doc/classes/InstancePlaceholder.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Placeholder for the root [Node] of a [PackedScene].
+ </brief_description>
+ <description>
+ Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstacePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
+ The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_instance_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Retrieve the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance].
+ </description>
+ </method>
+ <method name="get_stored_values">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="with_order" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="replace_by_instance">
+ <return type="void">
+ </return>
+ <argument index="0" name="custom_scene" type="PackedScene" default="null">
+ </argument>
+ <description>
+ Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml
new file mode 100644
index 0000000000..5e5ce59a8b
--- /dev/null
+++ b/doc/classes/InterpolatedCamera.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_target_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_interpolation_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_interpolation_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="target_path" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_target">
+ <return type="void">
+ </return>
+ <argument index="0" name="target" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_target_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="target_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled">
+ </member>
+ <member name="speed" type="float" setter="set_speed" getter="get_speed">
+ </member>
+ <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
new file mode 100644
index 0000000000..3423b8fb9c
--- /dev/null
+++ b/doc/classes/ItemList.xml
@@ -0,0 +1,558 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ItemList" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
+ </brief_description>
+ <description>
+ This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons,
+ or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list
+ may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled
+ to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_icon_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="icon" type="Texture">
+ </argument>
+ <argument index="1" name="selectable" type="bool" default="true">
+ </argument>
+ <description>
+ Adds an item to the item list with no text, only an icon.
+ </description>
+ </method>
+ <method name="add_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="icon" type="Texture" default="null">
+ </argument>
+ <argument index="2" name="selectable" type="bool" default="true">
+ </argument>
+ <description>
+ Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon.
+ If selectable is true the list item will be selectable.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Remove all items from the list.
+ </description>
+ </method>
+ <method name="ensure_current_is_visible">
+ <return type="void">
+ </return>
+ <description>
+ Ensure selection is visible, adjusting the scroll position as necessary.
+ </description>
+ </method>
+ <method name="get_allow_rmb_select" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether or not items may be selected via right mouse clicking.
+ </description>
+ </method>
+ <method name="get_fixed_column_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ If column size has been fixed to a value, return that value.
+ </description>
+ </method>
+ <method name="get_fixed_icon_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon_mode" qualifiers="const">
+ <return type="int" enum="ItemList.IconMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_at_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="exact" type="bool" default="false">
+ </argument>
+ <description>
+ Given a position within the control return the item (if any) at that point.
+ </description>
+ </method>
+ <method name="get_item_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return count of items currently in the item list.
+ </description>
+ </method>
+ <method name="get_item_custom_bg_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_icon_region" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the text for specified item index.
+ </description>
+ </method>
+ <method name="get_item_tooltip" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return tooltip hint for specified item index.
+ </description>
+ </method>
+ <method name="get_max_columns" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return total number of columns in use by the list.
+ </description>
+ </method>
+ <method name="get_max_text_lines" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return total number of lines currently in use by the list.
+ </description>
+ </method>
+ <method name="get_select_mode" qualifiers="const">
+ <return type="int" enum="ItemList.SelectMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_selected_items">
+ <return type="PoolIntArray">
+ </return>
+ <description>
+ Returns the list of selected indexes.
+ </description>
+ </method>
+ <method name="get_v_scroll">
+ <return type="VScrollBar">
+ </return>
+ <description>
+ Returns the current vertical scroll bar for the List.
+ </description>
+ </method>
+ <method name="has_auto_height" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_item_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns whether or not the item at the specified index is disabled
+ </description>
+ </method>
+ <method name="is_item_selectable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns whether or not the item at the specified index is selectable.
+ </description>
+ </method>
+ <method name="is_item_tooltip_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns whether the tooptip is enabled for specified item index.
+ </description>
+ </method>
+ <method name="is_same_column_width" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether or not all columns of the list are of the same size.
+ </description>
+ </method>
+ <method name="is_selected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns whether or not item at the specified index is currently selected.
+ </description>
+ </method>
+ <method name="remove_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove item at specified index from the list.
+ </description>
+ </method>
+ <method name="select">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="single" type="bool" default="true">
+ </argument>
+ <description>
+ Select the item at the specified index.
+ Note: This method does not trigger the item selection signal.
+ </description>
+ </method>
+ <method name="set_allow_rmb_select">
+ <return type="void">
+ </return>
+ <argument index="0" name="allow" type="bool">
+ </argument>
+ <description>
+ Allow (or disallow) selection of (selectable) items in the list using right mouse button.
+ </description>
+ </method>
+ <method name="set_auto_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fixed_column_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <description>
+ Set the size (width) all columns in the list are to use.
+ </description>
+ </method>
+ <method name="set_fixed_icon_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ItemList.IconMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_custom_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="custom_bg_color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ Disable (or enable) item at specified index.
+ Disabled items are not be selectable and do not fire activation (Enter or double-click) signals.
+ </description>
+ </method>
+ <method name="set_item_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="icon" type="Texture">
+ </argument>
+ <description>
+ Set (or replace) icon of the item at the specified index.
+ </description>
+ </method>
+ <method name="set_item_icon_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_metadata">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="metadata" type="Variant">
+ </argument>
+ <description>
+ Sets a value (of any type) to be stored with the item at the specified index.
+ </description>
+ </method>
+ <method name="set_item_selectable">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="selectable" type="bool">
+ </argument>
+ <description>
+ Allow or disallow selection of the item at the specified index.
+ </description>
+ </method>
+ <method name="set_item_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ Sets text of item at specified index.
+ </description>
+ </method>
+ <method name="set_item_tooltip">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tooltip" type="String">
+ </argument>
+ <description>
+ Sets tooltip hint for item at specified index.
+ </description>
+ </method>
+ <method name="set_item_tooltip_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ Sets whether the tooltip is enabled for specified item index.
+ </description>
+ </method>
+ <method name="set_max_columns">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set maximum number of columns to use for the list.
+ </description>
+ </method>
+ <method name="set_max_text_lines">
+ <return type="void">
+ </return>
+ <argument index="0" name="lines" type="int">
+ </argument>
+ <description>
+ Set maximum number of lines to use for the list.
+ </description>
+ </method>
+ <method name="set_same_column_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Sets a fixed size (width) to use for all columns of the list.
+ </description>
+ </method>
+ <method name="set_select_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ItemList.SelectMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="sort_items_by_text">
+ <return type="void">
+ </return>
+ <description>
+ Sorts items in the list by their text.
+ </description>
+ </method>
+ <method name="unselect">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Ensure item at specified index is not selected.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select">
+ </member>
+ <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height">
+ </member>
+ <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width">
+ </member>
+ <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode">
+ </member>
+ <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale">
+ </member>
+ <member name="items" type="Array" setter="_set_items" getter="_get_items">
+ </member>
+ <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns">
+ </member>
+ <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines">
+ </member>
+ <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width">
+ </member>
+ <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode">
+ </member>
+ </members>
+ <signals>
+ <signal name="item_activated">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Fired when specified list item is activated via double click or Enter.
+ </description>
+ </signal>
+ <signal name="item_rmb_selected">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="atpos" type="Vector2">
+ </argument>
+ <description>
+ Fired when specified list item has been selected via right mouse clicking.
+ The click position is also provided to allow appropriate popup of context menus
+ at the correct location.
+ </description>
+ </signal>
+ <signal name="item_selected">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Fired when specified item has been selected.
+ </description>
+ </signal>
+ <signal name="multi_selected">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="selected" type="bool">
+ </argument>
+ <description>
+ Fired when a multiple selection is altered on a list allowing mutliple selection.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ICON_MODE_TOP" value="0">
+ </constant>
+ <constant name="ICON_MODE_LEFT" value="1">
+ </constant>
+ <constant name="SELECT_SINGLE" value="0">
+ </constant>
+ <constant name="SELECT_MULTI" value="1">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="bg_focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="cursor" type="StyleBox">
+ </theme_item>
+ <theme_item name="cursor_unfocused" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_selected" type="Color">
+ </theme_item>
+ <theme_item name="guide_color" type="Color">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="icon_margin" type="int">
+ </theme_item>
+ <theme_item name="line_separation" type="int">
+ </theme_item>
+ <theme_item name="selected" type="StyleBox">
+ </theme_item>
+ <theme_item name="selected_focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="vseparation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
new file mode 100644
index 0000000000..a38b2f61cf
--- /dev/null
+++ b/doc/classes/JSON.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSON" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="parse">
+ <return type="JSONParseResult">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="print">
+ <return type="String">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
new file mode 100644
index 0000000000..6aeb614508
--- /dev/null
+++ b/doc/classes/JSONParseResult.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSONParseResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_error" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_result" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="error" type="int" enum="Error">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_error_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="error_line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_error_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="error_string" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_result">
+ <return type="void">
+ </return>
+ <argument index="0" name="result" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
+ </member>
+ <member name="error_line" type="int" setter="set_error_line" getter="get_error_line">
+ </member>
+ <member name="error_string" type="String" setter="set_error_string" getter="get_error_string">
+ </member>
+ <member name="result" type="Variant" setter="set_result" getter="get_result">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml
new file mode 100644
index 0000000000..2e7d24aac1
--- /dev/null
+++ b/doc/classes/Joint.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Joint" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_exclude_nodes_from_collision" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_a" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_b" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_solver_priority" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_exclude_nodes_from_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_node_a">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_node_b">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_solver_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="priority" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision">
+ </member>
+ <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a">
+ </member>
+ <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b">
+ </member>
+ <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
new file mode 100644
index 0000000000..e6c2f6d157
--- /dev/null
+++ b/doc/classes/Joint2D.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Joint2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base node for all joint constraints in 2D physics.
+ </brief_description>
+ <description>
+ Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_exclude_nodes_from_collision" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_a" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Return the path to the A node for the joint.
+ </description>
+ </method>
+ <method name="get_node_b" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Return the path to the B node for the joint.
+ </description>
+ </method>
+ <method name="set_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_exclude_nodes_from_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_node_a">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="NodePath">
+ </argument>
+ <description>
+ Set the path to the A node for the joint. Must be of type [PhysicsBody2D].
+ </description>
+ </method>
+ <method name="set_node_b">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="NodePath">
+ </argument>
+ <description>
+ Set the path to the B node for the joint. Must be of type [PhysicsBody2D].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bias" type="float" setter="set_bias" getter="get_bias">
+ </member>
+ <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision">
+ </member>
+ <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a">
+ </member>
+ <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
new file mode 100644
index 0000000000..8f242c5187
--- /dev/null
+++ b/doc/classes/KinematicBody.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Kinematic body 3D node.
+ </brief_description>
+ <description>
+ Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
+ Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_safe_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="linear_velocity" type="Vector3">
+ </argument>
+ <argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
+ </argument>
+ <argument index="2" name="slope_stop_min_velocity" type="float" default="0.05">
+ </argument>
+ <argument index="3" name="max_slides" type="int" default="4">
+ </argument>
+ <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_safe_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="pixels" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
new file mode 100644
index 0000000000..dddae2c0fc
--- /dev/null
+++ b/doc/classes/KinematicBody2D.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Kinematic body 2D node.
+ </brief_description>
+ <description>
+ Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
+ Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_safe_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector2">
+ </argument>
+ <description>
+ Moves the body along the given vector. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the colliding body.
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="linear_velocity" type="Vector2">
+ </argument>
+ <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <argument index="2" name="slope_stop_min_velocity" type="float" default="5">
+ </argument>
+ <argument index="3" name="max_bounces" type="int" default="4">
+ </argument>
+ <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_safe_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="pixels" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector2">
+ </argument>
+ <description>
+ Returns true if there would be a collision if the body moved from the given point in the given direction.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml
new file mode 100644
index 0000000000..b7269a646e
--- /dev/null
+++ b/doc/classes/KinematicCollision.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="KinematicCollision" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Collision data for KinematicBody2D collisions.
+ </brief_description>
+ <description>
+ Contains collision data for KinematicBody collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned.
+ This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_local_shape" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collider" type="Object" setter="" getter="get_collider">
+ The colliding body.
+ </member>
+ <member name="collider_id" type="int" setter="" getter="get_collider_id">
+ The colliding body's unique [RID].
+ </member>
+ <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
+ The colliding body's metadata. See [Object].
+ </member>
+ <member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
+ The colliding body's shape.
+ </member>
+ <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index">
+ The colliding shape's index. See [CollisionObject].
+ </member>
+ <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity">
+ The colliding object's velocity.
+ </member>
+ <member name="local_shape" type="Object" setter="" getter="get_local_shape">
+ The moving object's colliding shape.
+ </member>
+ <member name="normal" type="Vector3" setter="" getter="get_normal">
+ The colliding body's shape's normal at the point of collision.
+ </member>
+ <member name="position" type="Vector3" setter="" getter="get_position">
+ The point of collision.
+ </member>
+ <member name="remainder" type="Vector3" setter="" getter="get_remainder">
+ The moving object's remaining movement vector.
+ </member>
+ <member name="travel" type="Vector3" setter="" getter="get_travel">
+ The distance the moving object traveled before collision.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
new file mode 100644
index 0000000000..7a40a39292
--- /dev/null
+++ b/doc/classes/KinematicCollision2D.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Collision data for KinematicBody2D collisions.
+ </brief_description>
+ <description>
+ Contains collision data for KinematicBody2D collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned.
+ This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_local_shape" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collider" type="Object" setter="" getter="get_collider">
+ The colliding body.
+ </member>
+ <member name="collider_id" type="int" setter="" getter="get_collider_id">
+ The colliding body's unique [RID].
+ </member>
+ <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
+ The colliding body's metadata. See [Object].
+ </member>
+ <member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
+ The colliding body's shape.
+ </member>
+ <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index">
+ The colliding shape's index. See [CollisionObject2D].
+ </member>
+ <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity">
+ The colliding object's velocity.
+ </member>
+ <member name="local_shape" type="Object" setter="" getter="get_local_shape">
+ The moving object's colliding shape.
+ </member>
+ <member name="normal" type="Vector2" setter="" getter="get_normal">
+ The colliding body's shape's normal at the point of collision.
+ </member>
+ <member name="position" type="Vector2" setter="" getter="get_position">
+ The point of collision.
+ </member>
+ <member name="remainder" type="Vector2" setter="" getter="get_remainder">
+ The moving object's remaining movement vector.
+ </member>
+ <member name="travel" type="Vector2" setter="" getter="get_travel">
+ The distance the moving object traveled before collision.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
new file mode 100644
index 0000000000..8c5e69b407
--- /dev/null
+++ b/doc/classes/Label.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Label" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
+ </brief_description>
+ <description>
+ Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_align" qualifiers="const">
+ <return type="int" enum="Label.Align">
+ </return>
+ <description>
+ Return the alignment mode (any of the ALIGN_* enumeration values).
+ </description>
+ </method>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the amount of lines of text the Label has.
+ </description>
+ </method>
+ <method name="get_line_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the font size in pixels.
+ </description>
+ </method>
+ <method name="get_lines_skipped" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the the number of lines to skipped before displaying.
+ </description>
+ </method>
+ <method name="get_max_lines_visible" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the restricted number of lines to display. Returns -1 if unrestricted.
+ </description>
+ </method>
+ <method name="get_percent_visible" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the restricted number of characters to display (as a percentage of the total text).
+ </description>
+ </method>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the label text. Text can contain newlines.
+ </description>
+ </method>
+ <method name="get_total_character_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the total length of the text.
+ </description>
+ </method>
+ <method name="get_valign" qualifiers="const">
+ <return type="int" enum="Label.VAlign">
+ </return>
+ <description>
+ Return the vertical alignment mode (any of the VALIGN_* enumeration values).
+ </description>
+ </method>
+ <method name="get_visible_characters" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the restricted number of characters to display. Returns -1 if unrestricted.
+ </description>
+ </method>
+ <method name="get_visible_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_autowrap" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
+ </description>
+ </method>
+ <method name="is_clipping_text" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return [code]true[/code] if text would be cut off if it is too wide.
+ </description>
+ </method>
+ <method name="is_uppercase" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return [code]true[/code] if text is displayed in all capitals.
+ </description>
+ </method>
+ <method name="set_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Label.Align">
+ </argument>
+ <description>
+ Sets the alignment mode to any of the ALIGN_* enumeration values.
+ </description>
+ </method>
+ <method name="set_autowrap">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows.
+ </description>
+ </method>
+ <method name="set_clip_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Cuts off the rest of the text if it is too wide.
+ </description>
+ </method>
+ <method name="set_lines_skipped">
+ <return type="void">
+ </return>
+ <argument index="0" name="lines_skipped" type="int">
+ </argument>
+ <description>
+ Sets the number of lines to skip before displaying. Useful for scrolling text.
+ </description>
+ </method>
+ <method name="set_max_lines_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="lines_visible" type="int">
+ </argument>
+ <description>
+ Restricts the number of lines to display. Set to -1 to disable.
+ </description>
+ </method>
+ <method name="set_percent_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="percent_visible" type="float">
+ </argument>
+ <description>
+ Restricts the number of characters to display (as a percentage of the total text).
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Set the label text. Text can contain newlines.
+ </description>
+ </method>
+ <method name="set_uppercase">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Display text in all capitals.
+ </description>
+ </method>
+ <method name="set_valign">
+ <return type="void">
+ </return>
+ <argument index="0" name="valign" type="int" enum="Label.VAlign">
+ </argument>
+ <description>
+ Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
+ </description>
+ </method>
+ <method name="set_visible_characters">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Restricts the number of characters to display. Set to -1 to disable.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align">
+ Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants.
+ </member>
+ <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap">
+ If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: false.
+ </member>
+ <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text">
+ If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely.
+ </member>
+ <member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped">
+ The node ignores the first [code]lines_skipped[/code] lines before it starts to display text.
+ </member>
+ <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible">
+ Limits the lines of text the node shows on screen.
+ </member>
+ <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible">
+ Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
+ </member>
+ <member name="text" type="String" setter="set_text" getter="get_text">
+ The text to display on screen.
+ </member>
+ <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase">
+ If [code]true[/code], all the text displays as UPPERCASE.
+ </member>
+ <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign">
+ Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants.
+ </member>
+ </members>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ Align rows to the left (default).
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ Align rows centered.
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ Align rows to the right (default).
+ </constant>
+ <constant name="ALIGN_FILL" value="3">
+ Expand row whitespaces to fit the width.
+ </constant>
+ <constant name="VALIGN_TOP" value="0">
+ Align the whole text to the top.
+ </constant>
+ <constant name="VALIGN_CENTER" value="1">
+ Align the whole text to the center.
+ </constant>
+ <constant name="VALIGN_BOTTOM" value="2">
+ Align the whole text to the bottom.
+ </constant>
+ <constant name="VALIGN_FILL" value="3">
+ Align the whole text by spreading the rows.
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_shadow" type="Color">
+ </theme_item>
+ <theme_item name="line_spacing" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="shadow_as_outline" type="int">
+ </theme_item>
+ <theme_item name="shadow_offset_x" type="int">
+ </theme_item>
+ <theme_item name="shadow_offset_y" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml
new file mode 100644
index 0000000000..e4cabdc556
--- /dev/null
+++ b/doc/classes/LargeTexture.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LargeTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A Texture capable of storing many smaller Textures with offsets.
+ </brief_description>
+ <description>
+ A Texture capable of storing many smaller Textures with offsets.
+ You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_piece">
+ <return type="int">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Add another [Texture] to this [LargeTexture], starting on offset "ofs".
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the [LargeTexture].
+ </description>
+ </method>
+ <method name="get_piece_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the number of pieces currently in this [LargeTexture].
+ </description>
+ </method>
+ <method name="get_piece_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the offset of the piece with index "idx".
+ </description>
+ </method>
+ <method name="get_piece_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the [Texture] of the piece with index "idx".
+ </description>
+ </method>
+ <method name="set_piece_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ Set the offset of the piece with index "idx" to "ofs".
+ </description>
+ </method>
+ <method name="set_piece_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Set the [Texture] of the piece with index "idx" to "ofs".
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Set the size of this [LargeTexture].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Array" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
new file mode 100644
index 0000000000..11eee135cb
--- /dev/null
+++ b/doc/classes/Light.xml
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Light" inherits="VisualInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Provides a base class for different kinds of light nodes.
+ </brief_description>
+ <description>
+ Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cull_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="Light.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_reverse_cull_face" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_shadow" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_editor_only" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_negative" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="cull_mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_editor_only">
+ <return type="void">
+ </return>
+ <argument index="0" name="editor_only" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_negative">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Light.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="shadow_color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_reverse_cull_face">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only">
+ </member>
+ <member name="light_color" type="Color" setter="set_color" getter="get_color">
+ </member>
+ <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask">
+ </member>
+ <member name="light_energy" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="light_negative" type="bool" setter="set_negative" getter="is_negative">
+ </member>
+ <member name="light_specular" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color">
+ </member>
+ <member name="shadow_contact" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow">
+ </member>
+ <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_ENERGY" value="0">
+ </constant>
+ <constant name="PARAM_SPECULAR" value="1">
+ </constant>
+ <constant name="PARAM_RANGE" value="2">
+ </constant>
+ <constant name="PARAM_ATTENUATION" value="3">
+ </constant>
+ <constant name="PARAM_SPOT_ANGLE" value="4">
+ </constant>
+ <constant name="PARAM_SPOT_ATTENUATION" value="5">
+ </constant>
+ <constant name="PARAM_CONTACT_SHADOW_SIZE" value="6">
+ </constant>
+ <constant name="PARAM_SHADOW_MAX_DISTANCE" value="7">
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="8">
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="9">
+ </constant>
+ <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="10">
+ </constant>
+ <constant name="PARAM_SHADOW_NORMAL_BIAS" value="11">
+ </constant>
+ <constant name="PARAM_SHADOW_BIAS" value="12">
+ </constant>
+ <constant name="PARAM_MAX" value="14">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
new file mode 100644
index 0000000000..7ce7cef7c1
--- /dev/null
+++ b/doc/classes/Light2D.xml
@@ -0,0 +1,432 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Light2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node that casts light in a 2D environment.
+ </brief_description>
+ <description>
+ Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Return the color of the Light2D.
+ </description>
+ </method>
+ <method name="get_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the energy value of the Light2D.
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the height of the Light2D. Used with 2D normalmapping.
+ </description>
+ </method>
+ <method name="get_item_cull_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_shadow_cull_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_layer_range_max" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Set the maximum layer value of objects of the scene that are affected by the Light2D.
+ </description>
+ </method>
+ <method name="get_layer_range_min" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the minimum layer value of objects of the scene that are affected by the Light2D.
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="Light2D.Mode">
+ </return>
+ <description>
+ Return the current mode set to the Light2D.
+ </description>
+ </method>
+ <method name="get_shadow_buffer_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the shadow buffer size.
+ </description>
+ </method>
+ <method name="get_shadow_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Return the color of casted shadows for this Light2D.
+ </description>
+ </method>
+ <method name="get_shadow_filter" qualifiers="const">
+ <return type="int" enum="Light2D.ShadowFilter">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_gradient_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_smooth" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ Return the texture of the Light2D.
+ </description>
+ </method>
+ <method name="get_texture_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the offset of the light texture.
+ </description>
+ </method>
+ <method name="get_texture_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the scale value of the light texture.
+ </description>
+ </method>
+ <method name="get_z_range_max" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
+ </description>
+ </method>
+ <method name="get_z_range_min" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
+ </description>
+ </method>
+ <method name="is_editor_only" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the Light2D is enabled, false if it is not.
+ </description>
+ </method>
+ <method name="is_shadow_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if shadow casting is enabled for this Light2D, else return false.
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set the color of the Light2D.
+ </description>
+ </method>
+ <method name="set_editor_only">
+ <return type="void">
+ </return>
+ <argument index="0" name="editor_only" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Switches the Light2D on or off, depending on the 'enabled' parameter.
+ </description>
+ </method>
+ <method name="set_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ Set the energy value of the Light2D. The bigger the value, the stronger the light.
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ Set the height of the Light2D. Used with 2D normalmapping.
+ </description>
+ </method>
+ <method name="set_item_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="item_cull_mask" type="int">
+ </argument>
+ <description>
+ Set the item mask of the Light2D to 'item_mask' value.
+ </description>
+ </method>
+ <method name="set_item_shadow_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="item_shadow_cull_mask" type="int">
+ </argument>
+ <description>
+ Set the item shadow mask to 'item_shadow_mask' value.
+ </description>
+ </method>
+ <method name="set_layer_range_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the maximum layer value of objects of the scene that are affected by the Light2D.
+ </description>
+ </method>
+ <method name="set_layer_range_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the minimum layer value of objects of the scene that are affected by the Light2D.
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Light2D.Mode">
+ </argument>
+ <description>
+ Set the behaviour mode of the Light2D. Use constants defined in the constants section.
+ </description>
+ </method>
+ <method name="set_shadow_buffer_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Set the shadow buffer size.
+ </description>
+ </method>
+ <method name="set_shadow_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="shadow_color" type="Color">
+ </argument>
+ <description>
+ Set the color of casted shadows for this Light2D.
+ </description>
+ </method>
+ <method name="set_shadow_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enable or disable shadows casting from this Light2D according to the 'enabled' parameter.
+ </description>
+ </method>
+ <method name="set_shadow_filter">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="int" enum="Light2D.ShadowFilter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_gradient_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="multiplier" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_smooth">
+ <return type="void">
+ </return>
+ <argument index="0" name="smooth" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ Set the texture of the Light2D.
+ </description>
+ </method>
+ <method name="set_texture_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_offset" type="Vector2">
+ </argument>
+ <description>
+ Set the offset of the light texture.
+ </description>
+ </method>
+ <method name="set_texture_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_scale" type="float">
+ </argument>
+ <description>
+ Set the scale value of the light texture.
+ </description>
+ </method>
+ <method name="set_z_range_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="z" type="int">
+ </argument>
+ <description>
+ Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D.
+ </description>
+ </method>
+ <method name="set_z_range_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="z" type="int">
+ </argument>
+ <description>
+ Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color" type="Color" setter="set_color" getter="get_color">
+ The Light2D's [Color].
+ </member>
+ <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only">
+ If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code].
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ If [code]true[/code] Light2D will emit light. Default value: [code]true[/code].
+ </member>
+ <member name="energy" type="float" setter="set_energy" getter="get_energy">
+ The Light2D's energy value. The larger the value, the stronger the light.
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode">
+ The Light2D's mode. See MODE_* constants for values.
+ </member>
+ <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset">
+ The offset of the Light2D's [code]texture[/code].
+ </member>
+ <member name="range_height" type="float" setter="set_height" getter="get_height">
+ The height of the Light2D. Used with 2D normal mapping.
+ </member>
+ <member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask">
+ The layer mask. Only objects with a matching mask will be affected by the Light2D.
+ </member>
+ <member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max">
+ Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
+ </member>
+ <member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min">
+ Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
+ </member>
+ <member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max">
+ Maximum [code]Z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code].
+ </member>
+ <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min">
+ Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code].
+ </member>
+ <member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size">
+ Shadow buffer size. Default value: [code]2048[/code].
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color">
+ [Color] of shadows cast by the Light2D.
+ </member>
+ <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled">
+ If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code].
+ </member>
+ <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter">
+ Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code].
+ </member>
+ <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
+ Smoothing value for shadows.
+ </member>
+ <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length">
+ Smooth shadow gradient length.
+ </member>
+ <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask">
+ The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows.
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ [Texture] used for the Light2D's appearance.
+ </member>
+ <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale">
+ The [code]texture[/code]'s scale factor.
+ </member>
+ </members>
+ <constants>
+ <constant name="MODE_ADD" value="0">
+ Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light.
+ </constant>
+ <constant name="MODE_SUB" value="1">
+ Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
+ </constant>
+ <constant name="MODE_MIX" value="2">
+ Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
+ </constant>
+ <constant name="MODE_MASK" value="3">
+ The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
+ </constant>
+ <constant name="SHADOW_FILTER_NONE" value="0">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF3" value="1">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF5" value="2">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF7" value="3">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF9" value="4">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF13" value="5">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
new file mode 100644
index 0000000000..babcf31c08
--- /dev/null
+++ b/doc/classes/LightOccluder2D.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Occludes light cast by a Light2D, casting shadows.
+ </brief_description>
+ <description>
+ Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_occluder_light_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the light mask of the LightOccluder2D.
+ </description>
+ </method>
+ <method name="get_occluder_polygon" qualifiers="const">
+ <return type="OccluderPolygon2D">
+ </return>
+ <description>
+ Return the OccluderPolygon2D that defines the LightOccluder2D.
+ </description>
+ </method>
+ <method name="set_occluder_light_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
+ </description>
+ </method>
+ <method name="set_occluder_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="OccluderPolygon2D">
+ </argument>
+ <description>
+ Set the OccluderPolygon2D that defines the LightOccluder2D.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask">
+ The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
+ </member>
+ <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
+ The [OccluderPolygon2D] used to compute the shadow.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
new file mode 100644
index 0000000000..81fd255781
--- /dev/null
+++ b/doc/classes/Line2D.xml
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Line2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A 2D line.
+ </brief_description>
+ <description>
+ A line through several points in 2D space.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Add a point at the x/y position in the supplied [Vector2]
+ </description>
+ </method>
+ <method name="get_begin_cap_mode" qualifiers="const">
+ <return type="int" enum="Line2D.LineCapMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_default_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_end_cap_mode" qualifiers="const">
+ <return type="int" enum="Line2D.LineCapMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_gradient" qualifiers="const">
+ <return type="Gradient">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_joint_mode" qualifiers="const">
+ <return type="int" enum="Line2D.LineJointMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="i" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_points" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_round_precision" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sharp_limit" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture_mode" qualifiers="const">
+ <return type="int" enum="Line2D.LineTextureMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_point">
+ <return type="void">
+ </return>
+ <argument index="0" name="i" type="int">
+ </argument>
+ <description>
+ Remove the point at index 'i' from the line.
+ </description>
+ </method>
+ <method name="set_begin_cap_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_default_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_end_cap_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_gradient">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Gradient">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_joint_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Line2D.LineJointMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="i" type="int">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_points">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_round_precision">
+ <return type="void">
+ </return>
+ <argument index="0" name="precision" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sharp_limit">
+ <return type="void">
+ </return>
+ <argument index="0" name="limit" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Line2D.LineTextureMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode">
+ </member>
+ <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color">
+ </member>
+ <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode">
+ </member>
+ <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
+ </member>
+ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode">
+ </member>
+ <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
+ </member>
+ <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision">
+ </member>
+ <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode">
+ </member>
+ <member name="width" type="float" setter="set_width" getter="get_width">
+ </member>
+ </members>
+ <constants>
+ <constant name="LINE_JOINT_SHARP" value="0">
+ </constant>
+ <constant name="LINE_JOINT_BEVEL" value="1">
+ </constant>
+ <constant name="LINE_JOINT_ROUND" value="2">
+ </constant>
+ <constant name="LINE_CAP_NONE" value="0">
+ </constant>
+ <constant name="LINE_CAP_BOX" value="1">
+ </constant>
+ <constant name="LINE_CAP_ROUND" value="2">
+ </constant>
+ <constant name="LINE_TEXTURE_NONE" value="0">
+ </constant>
+ <constant name="LINE_TEXTURE_TILE" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
new file mode 100644
index 0000000000..0577e1ba37
--- /dev/null
+++ b/doc/classes/LineEdit.xml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LineEdit" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Control that provides single line string editing.
+ </brief_description>
+ <description>
+ LineEdit provides a single line string editor, used for text fields.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="append_at_cursor">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Append text at cursor, scrolling the [LineEdit] when needed.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the [LineEdit] text.
+ </description>
+ </method>
+ <method name="cursor_get_blink_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Gets whether the line edit caret is blinking.
+ </description>
+ </method>
+ <method name="cursor_get_blink_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Gets the line edit caret blink speed.
+ </description>
+ </method>
+ <method name="cursor_set_blink_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the line edit caret to blink.
+ </description>
+ </method>
+ <method name="cursor_set_blink_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="blink_speed" type="float">
+ </argument>
+ <description>
+ Set the line edit caret blink speed. Cannot be less then or equal to 0.
+ </description>
+ </method>
+ <method name="get_align" qualifiers="const">
+ <return type="int" enum="LineEdit.Align">
+ </return>
+ <description>
+ Return the align mode of the [LineEdit].
+ </description>
+ </method>
+ <method name="get_cursor_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the cursor position inside the [LineEdit].
+ </description>
+ </method>
+ <method name="get_expand_to_text_length" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_length" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
+ </description>
+ </method>
+ <method name="get_menu" qualifiers="const">
+ <return type="PopupMenu">
+ </return>
+ <description>
+ Return the [PopupMenu] of this [LineEdit].
+ </description>
+ </method>
+ <method name="get_placeholder" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the placeholder text.
+ </description>
+ </method>
+ <method name="get_placeholder_alpha" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return transparency of the placeholder text.
+ </description>
+ </method>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the text in the [LineEdit].
+ </description>
+ </method>
+ <method name="is_editable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
+ </description>
+ </method>
+ <method name="is_secret" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
+ </description>
+ </method>
+ <method name="menu_option">
+ <return type="void">
+ </return>
+ <argument index="0" name="option" type="int">
+ </argument>
+ <description>
+ Execute a given action as defined in the MENU_* enum.
+ </description>
+ </method>
+ <method name="select">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="int" default="0">
+ </argument>
+ <argument index="1" name="to" type="int" default="-1">
+ </argument>
+ <description>
+ Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end.
+ [codeblock]
+ select() # select all
+ select(5) # select from the fifth character to the end.
+ select(2, 5) # select from the second to the fifth character.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="select_all">
+ <return type="void">
+ </return>
+ <description>
+ Select the whole string.
+ </description>
+ </method>
+ <method name="set_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="LineEdit.Align">
+ </argument>
+ <description>
+ Set text alignment of the [LineEdit].
+ </description>
+ </method>
+ <method name="set_cursor_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Set the cursor position inside the [LineEdit], causing it to scroll if needed.
+ </description>
+ </method>
+ <method name="set_editable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
+ </description>
+ </method>
+ <method name="set_expand_to_text_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="chars" type="int">
+ </argument>
+ <description>
+ Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
+ </description>
+ </method>
+ <method name="set_placeholder">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Set the placeholder text.
+ </description>
+ </method>
+ <method name="set_placeholder_alpha">
+ <return type="void">
+ </return>
+ <argument index="0" name="alpha" type="float">
+ </argument>
+ <description>
+ Set transparency of the placeholder text.
+ </description>
+ </method>
+ <method name="set_secret">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Set the text in the [LineEdit], clearing the existing one and the selection.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align">
+ </member>
+ <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
+ </member>
+ <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
+ </member>
+ <member name="editable" type="bool" setter="set_editable" getter="is_editable">
+ </member>
+ <member name="expand_to_len" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length">
+ </member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode">
+ </member>
+ <member name="max_length" type="int" setter="set_max_length" getter="get_max_length">
+ </member>
+ <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha">
+ </member>
+ <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder">
+ </member>
+ <member name="secret" type="bool" setter="set_secret" getter="is_secret">
+ </member>
+ <member name="text" type="String" setter="set_text" getter="get_text">
+ </member>
+ </members>
+ <signals>
+ <signal name="text_changed">
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ When the text changes, this signal is emitted.
+ </description>
+ </signal>
+ <signal name="text_entered">
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ Align left.
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ Align center.
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ Align right.
+ </constant>
+ <constant name="ALIGN_FILL" value="3">
+ Align fill.
+ </constant>
+ <constant name="MENU_CUT" value="0">
+ Cut (Copy and clear).
+ </constant>
+ <constant name="MENU_COPY" value="1">
+ Copy the selected text.
+ </constant>
+ <constant name="MENU_PASTE" value="2">
+ Paste the clipboard text over the selected text.
+ </constant>
+ <constant name="MENU_CLEAR" value="3">
+ Clear the text.
+ </constant>
+ <constant name="MENU_SELECT_ALL" value="4">
+ Select all text.
+ </constant>
+ <constant name="MENU_UNDO" value="5">
+ Undo an action.
+ </constant>
+ <constant name="MENU_MAX" value="6">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="cursor_color" type="Color">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_selected" type="Color">
+ </theme_item>
+ <theme_item name="minimum_spaces" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="read_only" type="StyleBox">
+ </theme_item>
+ <theme_item name="selection_color" type="Color">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
new file mode 100644
index 0000000000..5596c48162
--- /dev/null
+++ b/doc/classes/LineShape2D.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Line shape for 2D collisions.
+ </brief_description>
+ <description>
+ Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_d" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the line distance from the origin.
+ </description>
+ </method>
+ <method name="get_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the line normal.
+ </description>
+ </method>
+ <method name="set_d">
+ <return type="void">
+ </return>
+ <argument index="0" name="d" type="float">
+ </argument>
+ <description>
+ Set the line distance from the origin.
+ </description>
+ </method>
+ <method name="set_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector2">
+ </argument>
+ <description>
+ Set the line normal.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="d" type="float" setter="set_d" getter="get_d">
+ The line's distance from the origin.
+ </member>
+ <member name="normal" type="Vector2" setter="set_normal" getter="get_normal">
+ The line's normal.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
new file mode 100644
index 0000000000..d9598daf16
--- /dev/null
+++ b/doc/classes/LinkButton.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LinkButton" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Simple button used to represent a link to some resource
+ </brief_description>
+ <description>
+ This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the text of the button.
+ </description>
+ </method>
+ <method name="get_underline_mode" qualifiers="const">
+ <return type="int" enum="LinkButton.UnderlineMode">
+ </return>
+ <description>
+ Returns the underline mode for this button.
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Sets the text of the button.
+ </description>
+ </method>
+ <method name="set_underline_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="underline_mode" type="int" enum="LinkButton.UnderlineMode">
+ </argument>
+ <description>
+ Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="text" type="String" setter="set_text" getter="get_text">
+ </member>
+ <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode">
+ </member>
+ </members>
+ <constants>
+ <constant name="UNDERLINE_MODE_ALWAYS" value="0">
+ The LinkButton will always show an underline at the bottom of its text
+ </constant>
+ <constant name="UNDERLINE_MODE_ON_HOVER" value="1">
+ The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
+ </constant>
+ <constant name="UNDERLINE_MODE_NEVER" value="2">
+ The LinkButton will never show an underline at the bottom of its text.
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="underline_spacing" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml
new file mode 100644
index 0000000000..176369cccb
--- /dev/null
+++ b/doc/classes/Listener.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Listener" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear_current">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_listener_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_current" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_current">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
new file mode 100644
index 0000000000..e6f9e40dfe
--- /dev/null
+++ b/doc/classes/MainLoop.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MainLoop" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Main loop is the abstract main loop base class.
+ </brief_description>
+ <description>
+ Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_drop_files" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="files" type="PoolStringArray">
+ </argument>
+ <argument index="1" name="screen" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_finalize" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called before the program exits.
+ </description>
+ </method>
+ <method name="_idle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Called each idle frame with time since last call as an only argument.
+ </description>
+ </method>
+ <method name="_initialize" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called once during initialization.
+ </description>
+ </method>
+ <method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="ev" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_input_text" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_iteration" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="finish">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="idle">
+ <return type="bool">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="init">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="input_event">
+ <return type="void">
+ </return>
+ <argument index="0" name="ev" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="input_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="iteration">
+ <return type="bool">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="2" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="3" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_FOCUS_IN" value="4" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_FOCUS_OUT" value="5" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="6" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8" enum="">
+ </constant>
+ <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9" enum="">
+ </constant>
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="90" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_ABOUT" value="91" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
new file mode 100644
index 0000000000..d4b9b01f63
--- /dev/null
+++ b/doc/classes/MarginContainer.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MarginContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Simple margin container.
+ </brief_description>
+ <description>
+ Simple margin container. Adds a left margin to anything contained.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="margin_bottom" type="int">
+ </theme_item>
+ <theme_item name="margin_left" type="int">
+ </theme_item>
+ <theme_item name="margin_right" type="int">
+ </theme_item>
+ <theme_item name="margin_top" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
new file mode 100644
index 0000000000..b443d03108
--- /dev/null
+++ b/doc/classes/Marshalls.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Marshalls" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Data transformation (marshalling) and encoding helpers.
+ </brief_description>
+ <description>
+ Provides data transformation and encoding utility functions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="base64_to_raw">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="base64_str" type="String">
+ </argument>
+ <description>
+ Return [PoolByteArray] of a given base64 encoded String.
+ </description>
+ </method>
+ <method name="base64_to_utf8">
+ <return type="String">
+ </return>
+ <argument index="0" name="base64_str" type="String">
+ </argument>
+ <description>
+ Return utf8 String of a given base64 encoded String.
+ </description>
+ </method>
+ <method name="base64_to_variant">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="base64_str" type="String">
+ </argument>
+ <description>
+ Return [Variant] of a given base64 encoded String.
+ </description>
+ </method>
+ <method name="raw_to_base64">
+ <return type="String">
+ </return>
+ <argument index="0" name="array" type="PoolByteArray">
+ </argument>
+ <description>
+ Return base64 encoded String of a given [PoolByteArray].
+ </description>
+ </method>
+ <method name="utf8_to_base64">
+ <return type="String">
+ </return>
+ <argument index="0" name="utf8_str" type="String">
+ </argument>
+ <description>
+ Return base64 encoded String of a given utf8 String.
+ </description>
+ </method>
+ <method name="variant_to_base64">
+ <return type="String">
+ </return>
+ <argument index="0" name="variant" type="Variant">
+ </argument>
+ <description>
+ Return base64 encoded String of a given [Variant].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
new file mode 100644
index 0000000000..88b35ac6b5
--- /dev/null
+++ b/doc/classes/Material.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Material" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Abstract base [Resource] for coloring and shading geometry.
+ </brief_description>
+ <description>
+ Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_next_pass" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_render_priority" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_next_pass">
+ <return type="void">
+ </return>
+ <argument index="0" name="next_pass" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_render_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="priority" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
+ </member>
+ <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority">
+ </member>
+ </members>
+ <constants>
+ <constant name="RENDER_PRIORITY_MAX" value="127" enum="">
+ </constant>
+ <constant name="RENDER_PRIORITY_MIN" value="-128" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
new file mode 100644
index 0000000000..f1ab74d00e
--- /dev/null
+++ b/doc/classes/MenuButton.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MenuButton" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Special button that brings up a [PopupMenu] when clicked.
+ </brief_description>
+ <description>
+ Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_popup">
+ <return type="PopupMenu">
+ </return>
+ <description>
+ Return the [PopupMenu] contained in this button.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="items" type="Array" setter="_set_items" getter="_get_items">
+ </member>
+ </members>
+ <signals>
+ <signal name="about_to_show">
+ <description>
+ Emitted when [PopupMenu] of this MenuButton is about to show.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
new file mode 100644
index 0000000000..658265d242
--- /dev/null
+++ b/doc/classes/Mesh.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Mesh" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A [Resource] that contains vertex-array based geometry.
+ </brief_description>
+ <description>
+ Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="create_convex_shape" qualifiers="const">
+ <return type="Shape">
+ </return>
+ <description>
+ Calculate a [ConvexPolygonShape] from the mesh.
+ </description>
+ </method>
+ <method name="create_outline" qualifiers="const">
+ <return type="Mesh">
+ </return>
+ <argument index="0" name="margin" type="float">
+ </argument>
+ <description>
+ Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise).
+ </description>
+ </method>
+ <method name="create_trimesh_shape" qualifiers="const">
+ <return type="Shape">
+ </return>
+ <description>
+ Calculate a [ConcavePolygonShape] from the mesh.
+ </description>
+ </method>
+ <method name="generate_triangle_mesh" qualifiers="const">
+ <return type="TriangleMesh">
+ </return>
+ <description>
+ Generate a [TriangleMesh] from the mesh.
+ </description>
+ </method>
+ <method name="get_faces" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="PRIMITIVE_POINTS" value="0">
+ Render array as points (one vertex equals one point).
+ </constant>
+ <constant name="PRIMITIVE_LINES" value="1">
+ Render array as lines (every two vertices a line is created).
+ </constant>
+ <constant name="PRIMITIVE_LINE_STRIP" value="2">
+ Render array as line strip.
+ </constant>
+ <constant name="PRIMITIVE_LINE_LOOP" value="3">
+ Render array as line loop (like line strip, but closed).
+ </constant>
+ <constant name="PRIMITIVE_TRIANGLES" value="4">
+ Render array as triangles (every three vertices a triangle is created).
+ </constant>
+ <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5">
+ Render array as triangle strips.
+ </constant>
+ <constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
+ Render array as triangle fans.
+ </constant>
+ <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0">
+ </constant>
+ <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1">
+ </constant>
+ <constant name="ARRAY_FORMAT_VERTEX" value="1">
+ </constant>
+ <constant name="ARRAY_FORMAT_NORMAL" value="2">
+ </constant>
+ <constant name="ARRAY_FORMAT_TANGENT" value="4">
+ </constant>
+ <constant name="ARRAY_FORMAT_COLOR" value="8">
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV" value="16">
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
+ </constant>
+ <constant name="ARRAY_FORMAT_BONES" value="64">
+ </constant>
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
+ </constant>
+ <constant name="ARRAY_FORMAT_INDEX" value="256">
+ </constant>
+ <constant name="ARRAY_COMPRESS_BASE" value="9">
+ </constant>
+ <constant name="ARRAY_COMPRESS_VERTEX" value="512">
+ </constant>
+ <constant name="ARRAY_COMPRESS_NORMAL" value="1024">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TANGENT" value="2048">
+ </constant>
+ <constant name="ARRAY_COMPRESS_COLOR" value="4096">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TEX_UV" value="8192">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384">
+ </constant>
+ <constant name="ARRAY_COMPRESS_BONES" value="32768">
+ </constant>
+ <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536">
+ </constant>
+ <constant name="ARRAY_COMPRESS_INDEX" value="131072">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288">
+ </constant>
+ <constant name="ARRAY_COMPRESS_DEFAULT" value="97792">
+ </constant>
+ <constant name="ARRAY_VERTEX" value="0">
+ </constant>
+ <constant name="ARRAY_NORMAL" value="1">
+ </constant>
+ <constant name="ARRAY_TANGENT" value="2">
+ </constant>
+ <constant name="ARRAY_COLOR" value="3">
+ </constant>
+ <constant name="ARRAY_TEX_UV" value="4">
+ </constant>
+ <constant name="ARRAY_TEX_UV2" value="5">
+ </constant>
+ <constant name="ARRAY_BONES" value="6">
+ </constant>
+ <constant name="ARRAY_WEIGHTS" value="7">
+ </constant>
+ <constant name="ARRAY_INDEX" value="8">
+ </constant>
+ <constant name="ARRAY_MAX" value="9">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
new file mode 100644
index 0000000000..6088d30013
--- /dev/null
+++ b/doc/classes/MeshDataTool.xml
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MeshDataTool" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="commit_to_surface">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="mesh" type="ArrayMesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_from_surface">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="mesh" type="ArrayMesh">
+ </argument>
+ <argument index="1" name="surface" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_faces" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_meta" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_vertex" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vertex" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_face_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_face_edge" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="edge" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_face_meta" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_face_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_face_vertex" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vertex" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_format" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_bones" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_edges" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_faces" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_meta" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_tangent" qualifiers="const">
+ <return type="Plane">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_uv" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_uv2" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertex_weights" qualifiers="const">
+ <return type="PoolRealArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_edge_meta">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="meta" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_face_meta">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="meta" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vertex" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_bones">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="bones" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_meta">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="meta" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="normal" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tangent" type="Plane">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="uv" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="uv2" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertex_weights">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="weights" type="PoolRealArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml
new file mode 100644
index 0000000000..56b446cac1
--- /dev/null
+++ b/doc/classes/MeshInstance.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node that instances meshes into a scenario.
+ </brief_description>
+ <description>
+ MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="create_convex_collision">
+ <return type="void">
+ </return>
+ <description>
+ This helper creates a [StaticBody] child [Node] with a [ConvexPolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing.
+ </description>
+ </method>
+ <method name="create_debug_tangents">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_trimesh_collision">
+ <return type="void">
+ </return>
+ <description>
+ This helper creates a [StaticBody] child [Node] with a [ConcavePolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing.
+ </description>
+ </method>
+ <method name="get_mesh" qualifiers="const">
+ <return type="Mesh">
+ </return>
+ <description>
+ Returns the current [Mesh] resource for the instance.
+ </description>
+ </method>
+ <method name="get_skeleton_path">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surface" type="int">
+ </argument>
+ <description>
+ Returns the [Material] for a surface of the [Mesh] resource.
+ </description>
+ </method>
+ <method name="set_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_skeleton_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeleton_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_surface_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="surface" type="int">
+ </argument>
+ <argument index="1" name="material" type="Material">
+ </argument>
+ <description>
+ Sets the [Material] for a surface of the [Mesh] resource.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ The [Mesh] resource for the instance.
+ </member>
+ <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path">
+ [NodePath] to the [Skeleton] associated with the instance.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
new file mode 100644
index 0000000000..5636db23b5
--- /dev/null
+++ b/doc/classes/MeshLibrary.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MeshLibrary" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Library of meshes.
+ </brief_description>
+ <description>
+ Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the library.
+ </description>
+ </method>
+ <method name="create_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Create a new item in the library, supplied an id.
+ </description>
+ </method>
+ <method name="find_item_by_name" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_list" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <description>
+ Return the list of items.
+ </description>
+ </method>
+ <method name="get_item_mesh" qualifiers="const">
+ <return type="Mesh">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the mesh of the item.
+ </description>
+ </method>
+ <method name="get_item_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the name of the item.
+ </description>
+ </method>
+ <method name="get_item_navmesh" qualifiers="const">
+ <return type="NavigationMesh">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_preview" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_shapes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_last_unused_item_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get an unused id for a new item.
+ </description>
+ </method>
+ <method name="remove_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Remove the item.
+ </description>
+ </method>
+ <method name="set_item_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="mesh" type="Mesh">
+ </argument>
+ <description>
+ Set the mesh of the item.
+ </description>
+ </method>
+ <method name="set_item_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the item.
+ </description>
+ </method>
+ <method name="set_item_navmesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="navmesh" type="NavigationMesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_preview">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shapes" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
new file mode 100644
index 0000000000..6df9689ada
--- /dev/null
+++ b/doc/classes/MultiMesh.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiMesh" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Provides high performance mesh instancing.
+ </brief_description>
+ <description>
+ MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
+ For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
+ As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
+ Since instances may have any behavior, the Rect3 used for visibility must be provided by the user.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ Return the visibility Rect3.
+ </description>
+ </method>
+ <method name="get_color_format" qualifiers="const">
+ <return type="int" enum="MultiMesh.ColorFormat">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_instance_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <description>
+ Get the color of a specific instance.
+ </description>
+ </method>
+ <method name="get_instance_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of instances that is going to be drawn.
+ </description>
+ </method>
+ <method name="get_instance_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <description>
+ Return the transform of a specific instance.
+ </description>
+ </method>
+ <method name="get_mesh" qualifiers="const">
+ <return type="Mesh">
+ </return>
+ <description>
+ Return the [Mesh] resource drawn as multiple instances.
+ </description>
+ </method>
+ <method name="get_transform_format" qualifiers="const">
+ <return type="int" enum="MultiMesh.TransformFormat">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_color_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="MultiMesh.ColorFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_instance_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Set the color of a specific instance.
+ </description>
+ </method>
+ <method name="set_instance_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="count" type="int">
+ </argument>
+ <description>
+ Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data.
+ </description>
+ </method>
+ <method name="set_instance_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ Set the transform for a specific instance.
+ </description>
+ </method>
+ <method name="set_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
+ <description>
+ Set the [Mesh] resource to be drawn in multiple instances.
+ </description>
+ </method>
+ <method name="set_transform_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="MultiMesh.TransformFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array">
+ </member>
+ <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat">
+ </member>
+ <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count">
+ </member>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="transform_array" type="PoolVector3Array" setter="_set_transform_array" getter="_get_transform_array">
+ </member>
+ <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat">
+ </member>
+ </members>
+ <constants>
+ <constant name="TRANSFORM_2D" value="0">
+ </constant>
+ <constant name="TRANSFORM_3D" value="1">
+ </constant>
+ <constant name="COLOR_NONE" value="0">
+ </constant>
+ <constant name="COLOR_8BIT" value="1">
+ </constant>
+ <constant name="COLOR_FLOAT" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml
new file mode 100644
index 0000000000..06454e3cdc
--- /dev/null
+++ b/doc/classes/MultiMeshInstance.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node that instances a [MultiMesh].
+ </brief_description>
+ <description>
+ MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_multimesh" qualifiers="const">
+ <return type="MultiMesh">
+ </return>
+ <description>
+ Return the [MultiMesh] that is used for instancing.
+ </description>
+ </method>
+ <method name="set_multimesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="MultiMesh">
+ </argument>
+ <description>
+ Set the [MultiMesh] to be instanced.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
new file mode 100644
index 0000000000..ef3aeb9e07
--- /dev/null
+++ b/doc/classes/Mutex.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Mutex" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A synchronization Mutex.
+ </brief_description>
+ <description>
+ A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="lock">
+ <return type="void">
+ </return>
+ <description>
+ Lock this [Mutex], blocks until it is unlocked by the current owner.
+ </description>
+ </method>
+ <method name="try_lock">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
+ </description>
+ </method>
+ <method name="unlock">
+ <return type="void">
+ </return>
+ <description>
+ Unlock this [Mutex], leaving it to others threads.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NativeScript.xml b/doc/classes/NativeScript.xml
new file mode 100644
index 0000000000..b040cfd966
--- /dev/null
+++ b/doc/classes/NativeScript.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NativeScript" inherits="Script" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_class_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_library" qualifiers="const">
+ <return type="GDNativeLibrary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="new" qualifiers="vararg">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_class_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="class_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_library">
+ <return type="void">
+ </return>
+ <argument index="0" name="library" type="GDNativeLibrary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="class_name" type="String" setter="set_class_name" getter="get_class_name">
+ </member>
+ <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
new file mode 100644
index 0000000000..3e063f6a82
--- /dev/null
+++ b/doc/classes/Navigation.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Navigation" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_closest_point">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_normal">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_owner">
+ <return type="Object">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_to_segment">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="start" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <argument index="2" name="use_collision" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_simple_path">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="start" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <argument index="2" name="optimize" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_up_vector" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="navmesh_create">
+ <return type="int">
+ </return>
+ <argument index="0" name="mesh" type="NavigationMesh">
+ </argument>
+ <argument index="1" name="xform" type="Transform">
+ </argument>
+ <argument index="2" name="owner" type="Object" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navmesh_remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navmesh_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="xform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_up_vector">
+ <return type="void">
+ </return>
+ <argument index="0" name="up" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
new file mode 100644
index 0000000000..ab10463a5d
--- /dev/null
+++ b/doc/classes/Navigation2D.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Navigation2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_closest_point">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point_owner">
+ <return type="Object">
+ </return>
+ <argument index="0" name="to_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_simple_path">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="start" type="Vector2">
+ </argument>
+ <argument index="1" name="end" type="Vector2">
+ </argument>
+ <argument index="2" name="optimize" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navpoly_create">
+ <return type="int">
+ </return>
+ <argument index="0" name="mesh" type="NavigationPolygon">
+ </argument>
+ <argument index="1" name="xform" type="Transform2D">
+ </argument>
+ <argument index="2" name="owner" type="Object" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navpoly_remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="navpoly_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
new file mode 100644
index 0000000000..788fadfd77
--- /dev/null
+++ b/doc/classes/NavigationMesh.xml
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationMesh" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_polygons">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_from_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_agent_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_agent_max_climb" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_agent_max_slope" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_agent_radius">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_detail_sample_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_detail_sample_max_error" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_max_error" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edge_max_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_filter_ledge_spans" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_filter_low_hanging_obstacles" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_filter_walkable_low_height_spans" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_region_merge_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_region_min_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sample_partition_type" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertices" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_verts_per_poly" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_agent_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent_height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_agent_max_climb">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent_max_climb" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_agent_max_slope">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent_max_slope" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_agent_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="agent_radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="cell_height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="cell_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_detail_sample_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_sample_dist" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_detail_sample_max_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_sample_max_error" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_edge_max_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="edge_max_error" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_edge_max_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="edge_max_length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_filter_ledge_spans">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter_ledge_spans" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_filter_low_hanging_obstacles">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter_low_hanging_obstacles" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_filter_walkable_low_height_spans">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter_walkable_low_height_spans" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_merge_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="region_merge_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_min_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="region_min_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sample_partition_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="sample_partition_type" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertices">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertices" type="PoolVector3Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_verts_per_poly">
+ <return type="void">
+ </return>
+ <argument index="0" name="verts_per_poly" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height">
+ </member>
+ <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb">
+ </member>
+ <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope">
+ </member>
+ <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius">
+ </member>
+ <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height">
+ </member>
+ <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size">
+ </member>
+ <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance">
+ </member>
+ <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error">
+ </member>
+ <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error">
+ </member>
+ <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length">
+ </member>
+ <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans">
+ </member>
+ <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans">
+ </member>
+ <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles">
+ </member>
+ <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly">
+ </member>
+ <member name="polygons" type="Array" setter="_set_polygons" getter="_get_polygons">
+ </member>
+ <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size">
+ </member>
+ <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size">
+ </member>
+ <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type">
+ </member>
+ <member name="vertices" type="PoolVector3Array" setter="set_vertices" getter="get_vertices">
+ </member>
+ </members>
+ <constants>
+ <constant name="SAMPLE_PARTITION_WATERSHED" value="0" enum="">
+ </constant>
+ <constant name="SAMPLE_PARTITION_MONOTONE" value="1" enum="">
+ </constant>
+ <constant name="SAMPLE_PARTITION_LAYERS" value="2" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml
new file mode 100644
index 0000000000..6d3a81a939
--- /dev/null
+++ b/doc/classes/NavigationMeshInstance.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_navigation_mesh" qualifiers="const">
+ <return type="NavigationMesh">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_navigation_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="navmesh" type="NavigationMesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ </member>
+ <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
new file mode 100644
index 0000000000..07eb4afb8d
--- /dev/null
+++ b/doc/classes/NavigationPolygon.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_outline">
+ <return type="void">
+ </return>
+ <argument index="0" name="outline" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_outline_at_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="outline" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_outlines">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_polygons">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_outline" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_outline_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vertices" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_polygons_from_outlines">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_outline">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_outline">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="outline" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vertices">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertices" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="outlines" type="Array" setter="_set_outlines" getter="_get_outlines">
+ </member>
+ <member name="polygons" type="Array" setter="_set_polygons" getter="_get_polygons">
+ </member>
+ <member name="vertices" type="PoolVector2Array" setter="set_vertices" getter="get_vertices">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml
new file mode 100644
index 0000000000..a6d70d5b4b
--- /dev/null
+++ b/doc/classes/NavigationPolygonInstance.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_navigation_polygon" qualifiers="const">
+ <return type="NavigationPolygon">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_navigation_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="navpoly" type="NavigationPolygon">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ </member>
+ <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NetworkedMultiplayerENet.xml b/doc/classes/NetworkedMultiplayerENet.xml
new file mode 100644
index 0000000000..02c919bd83
--- /dev/null
+++ b/doc/classes/NetworkedMultiplayerENet.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ PacketPeer implementation using the ENet library.
+ </brief_description>
+ <description>
+ A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="close_connection">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_client">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="ip" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <argument index="2" name="in_bandwidth" type="int" default="0">
+ </argument>
+ <argument index="3" name="out_bandwidth" type="int" default="0">
+ </argument>
+ <description>
+ Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code].
+ </description>
+ </method>
+ <method name="create_server">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="max_clients" type="int" default="32">
+ </argument>
+ <argument index="2" name="in_bandwidth" type="int" default="0">
+ </argument>
+ <argument index="3" name="out_bandwidth" type="int" default="0">
+ </argument>
+ <description>
+ Create server that listens to connections via [code]port[/code].
+ </description>
+ </method>
+ <method name="get_compression_mode" qualifiers="const">
+ <return type="int" enum="NetworkedMultiplayerENet.CompressionMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bind_ip">
+ <return type="void">
+ </return>
+ <argument index="0" name="ip" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_compression_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerENet.CompressionMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="COMPRESS_NONE" value="0">
+ </constant>
+ <constant name="COMPRESS_RANGE_CODER" value="1">
+ </constant>
+ <constant name="COMPRESS_FASTLZ" value="2">
+ </constant>
+ <constant name="COMPRESS_ZLIB" value="3">
+ </constant>
+ <constant name="COMPRESS_ZSTD" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
new file mode 100644
index 0000000000..c1d8c5ad91
--- /dev/null
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_connection_status" qualifiers="const">
+ <return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_packet_peer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unique_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_refusing_new_connections" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this [NetworkedMultiplayerPeer] is refusing new connections.
+ </description>
+ </method>
+ <method name="poll">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_refuse_new_connections">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ If [code]endable[/code] is true, this [NetworkedMultiplayerPeer] will refuse new connections.
+ </description>
+ </method>
+ <method name="set_target_peer">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_transfer_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="connection_failed">
+ <description>
+ Emitted when failed to connect to server.
+ </description>
+ </signal>
+ <signal name="connection_succeeded">
+ <description>
+ Emitted when successfully connected to server.
+ </description>
+ </signal>
+ <signal name="peer_connected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Emitted by the server when a client is connected.
+ </description>
+ </signal>
+ <signal name="peer_disconnected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Emitted by the server when a client is disconnected.
+ </description>
+ </signal>
+ <signal name="server_disconnected">
+ <description>
+ Emitted by clients when server is disconnected.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0">
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1">
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2">
+ </constant>
+ <constant name="CONNECTION_DISCONNECTED" value="0">
+ </constant>
+ <constant name="CONNECTION_CONNECTING" value="1">
+ </constant>
+ <constant name="CONNECTION_CONNECTED" value="2">
+ </constant>
+ <constant name="TARGET_PEER_BROADCAST" value="0" enum="">
+ </constant>
+ <constant name="TARGET_PEER_SERVER" value="1" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml
new file mode 100644
index 0000000000..de12ad1261
--- /dev/null
+++ b/doc/classes/Nil.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Nil" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolColorArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolVector3Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolRealArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Basis">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Rect3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Quat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Plane">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Nil">
+ <argument index="0" name="from" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
new file mode 100644
index 0000000000..6829b36e14
--- /dev/null
+++ b/doc/classes/NinePatchRect.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NinePatchRect" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes.
+ </brief_description>
+ <description>
+ Better known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3 by 3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_h_axis_stretch_mode" qualifiers="const">
+ <return type="int" enum="NinePatchRect.AxisStretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_patch_margin" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_region_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_axis_stretch_mode" qualifiers="const">
+ <return type="int" enum="NinePatchRect.AxisStretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_center">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_center" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_patch_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode">
+ Doesn't do anything at the time of writing.
+ </member>
+ <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode">
+ Doesn't do anything at the time of writing.
+ </member>
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
+ If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. Default value: [code]true[/code]
+ </member>
+ <member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values indivually to create panels with non-uniform borders.
+ </member>
+ <member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's left column.
+ </member>
+ <member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's right column.
+ </member>
+ <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's top row.
+ </member>
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one.
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The node's texture resource.
+ </member>
+ </members>
+ <signals>
+ <signal name="texture_changed">
+ <description>
+ Fired when the node's texture changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
+ Doesn't do anything at the time of writing. Default value for [code]axis_stretch_horizontal[/code] and [code]axis_stretch_vertical[/code].
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE" value="1">
+ Doesn't do anything at the time of writing.
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
+ Doesn't do anything at the time of writing.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
new file mode 100644
index 0000000000..5a99263f1e
--- /dev/null
+++ b/doc/classes/Node.xml
@@ -0,0 +1,870 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Node" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all the [i]scene[/i] elements.
+ </brief_description>
+ <description>
+ Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names.
+ Any tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions.
+ [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Children nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
+ Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, from the children up to the parent nodes.
+ It means that when adding a scene to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (and that recursively for the whole scene).
+ [b]Processing:[/b] Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is variable. Fixed processing (callback [method _fixed_process], toggled with [method set_fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics.
+ Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
+ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
+ Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children.
+ [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_enter_tree" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
+ Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification].
+ </description>
+ </method>
+ <method name="_exit_tree" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
+ Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification].
+ </description>
+ </method>
+ <method name="_fixed_process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant.
+ It is only called if fixed processing has been enabled with [method set_fixed_process].
+ Corresponds to the NOTIFICATION_FIXED_PROCESS notification in [method Object._notification].
+ </description>
+ </method>
+ <method name="_input" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Called when there is a change to input devices. Propagated through the node tree until a Node consumes it.
+ </description>
+ </method>
+ <method name="_process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant.
+ It is only called if processing has been enabled with [method set_process].
+ Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification].
+ </description>
+ </method>
+ <method name="_ready" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards.
+ Corresponds to the NOTIFICATION_READY notification in [method Object._notification].
+ </description>
+ </method>
+ <method name="_unhandled_input" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ Propagated to all nodes when the previous InputEvent is not consumed by any nodes.
+ </description>
+ </method>
+ <method name="_unhandled_key_input" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEventKey">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_child">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <argument index="1" name="legible_unique_name" type="bool" default="false">
+ </argument>
+ <description>
+ Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
+ The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only.
+ </description>
+ </method>
+ <method name="add_child_below_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <argument index="1" name="child_node" type="Node">
+ </argument>
+ <argument index="2" name="legible_unique_name" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_to_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <argument index="1" name="persistent" type="bool" default="false">
+ </argument>
+ <description>
+ Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
+ </description>
+ </method>
+ <method name="can_process" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see [method set_pause_mode]). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND?
+ </description>
+ </method>
+ <method name="duplicate" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="flags" type="int" default="15">
+ </argument>
+ <description>
+ Duplicate the node, returning a new [Node].
+ You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants.
+ </description>
+ </method>
+ <method name="find_node" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="mask" type="String">
+ </argument>
+ <argument index="1" name="recursive" type="bool" default="true">
+ </argument>
+ <argument index="2" name="owned" type="bool" default="true">
+ </argument>
+ <description>
+ Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names.
+ </description>
+ </method>
+ <method name="get_child" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
+ </description>
+ </method>
+ <method name="get_child_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of child nodes.
+ </description>
+ </method>
+ <method name="get_children" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array of references ([Node]) to the child nodes.
+ </description>
+ </method>
+ <method name="get_filename" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]).
+ </description>
+ </method>
+ <method name="get_fixed_process_delta_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the time elapsed since the last fixed frame (see [method _fixed_process]). This is always the same in fixed processing unless the frames per second is changed in [OS].
+ </description>
+ </method>
+ <method name="get_groups" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array listing the groups that the node is part of.
+ </description>
+ </method>
+ <method name="get_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the node index, i.e. its position among the siblings of its parent.
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the node. This name is unique among the siblings (other child nodes from the same parent).
+ </description>
+ </method>
+ <method name="get_network_master" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Fetch a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.
+ Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
+ [i]Example:[/i] Assume your current node is Character and the following tree:
+ [codeblock]
+ /root
+ /root/Character
+ /root/Character/Sword
+ /root/Character/Backpack/Dagger
+ /root/MyGame
+ /root/Swamp/Alligator
+ /root/Swamp/Mosquito
+ /root/Swamp/Goblin
+ [/codeblock]
+ Possible paths are:
+ [codeblock]
+ get_node("Sword")
+ get_node("Backpack/Dagger")
+ get_node("../Swamp/Alligator")
+ get_node("/root/MyGame")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_node_and_resource">
+ <return type="Array">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_owner" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Get the node owner (see [method set_owner]).
+ </description>
+ </method>
+ <method name="get_parent" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ Return the parent node of the current node, or an empty [Node] if the node lacks a parent.
+ </description>
+ </method>
+ <method name="get_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]).
+ </description>
+ </method>
+ <method name="get_path_to" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail.
+ </description>
+ </method>
+ <method name="get_pause_mode" qualifiers="const">
+ <return type="int" enum="Node.PauseMode">
+ </return>
+ <description>
+ Return the pause mode (PAUSE_MODE_*) of this Node.
+ </description>
+ </method>
+ <method name="get_position_in_parent" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the order in the node tree branch, i.e. if called by the first child Node, return 0.
+ </description>
+ </method>
+ <method name="get_process_delta_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the time elapsed (in seconds) since the last process callback. This is almost always different each time.
+ </description>
+ </method>
+ <method name="get_scene_instance_load_placeholder" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tree" qualifiers="const">
+ <return type="SceneTree">
+ </return>
+ <description>
+ Return a [SceneTree] that this node is inside.
+ </description>
+ </method>
+ <method name="get_viewport" qualifiers="const">
+ <return type="Viewport">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_node" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Return whether the node that a given [NodePath] points too exists.
+ </description>
+ </method>
+ <method name="has_node_and_resource" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_a_parent_of" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i].
+ </description>
+ </method>
+ <method name="is_displayed_folded" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_fixed_processing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if fixed processing is enabled (see [method set_fixed_process]).
+ </description>
+ </method>
+ <method name="is_fixed_processing_internal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_greater_than" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i].
+ </description>
+ </method>
+ <method name="is_in_group" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <description>
+ Return whether this Node is in the specified group.
+ </description>
+ </method>
+ <method name="is_inside_tree" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this Node is inside a [SceneTree].
+ </description>
+ </method>
+ <method name="is_network_master" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_processing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether processing is enabled in the current node (see [method set_process]).
+ </description>
+ </method>
+ <method name="is_processing_input" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the node is processing input (see [method set_process_input]).
+ </description>
+ </method>
+ <method name="is_processing_internal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_processing_unhandled_input" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the node is processing unhandled input (see [method set_process_unhandled_input]).
+ </description>
+ </method>
+ <method name="is_processing_unhandled_key_input" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_child">
+ <return type="void">
+ </return>
+ <argument index="0" name="child_node" type="Node">
+ </argument>
+ <argument index="1" name="to_pos" type="int">
+ </argument>
+ <description>
+ Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
+ </description>
+ </method>
+ <method name="print_stray_nodes">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="print_tree">
+ <return type="void">
+ </return>
+ <description>
+ Print the scene to stdout. Used mainly for debugging purposes.
+ </description>
+ </method>
+ <method name="propagate_call">
+ <return type="void">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <argument index="1" name="args" type="Array" default="[ ]">
+ </argument>
+ <argument index="2" name="parent_first" type="bool" default="false">
+ </argument>
+ <description>
+ Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [Node] first, then on all children. If it is false then the children will get called first.
+ </description>
+ </method>
+ <method name="propagate_notification">
+ <return type="void">
+ </return>
+ <argument index="0" name="what" type="int">
+ </argument>
+ <description>
+ Notify the current node and all its children recursively by calling notification() in all of them.
+ </description>
+ </method>
+ <method name="queue_free">
+ <return type="void">
+ </return>
+ <description>
+ Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame.
+ </description>
+ </method>
+ <method name="raise">
+ <return type="void">
+ </return>
+ <description>
+ Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
+ </description>
+ </method>
+ <method name="remove_and_skip">
+ <return type="void">
+ </return>
+ <description>
+ Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed.
+ </description>
+ </method>
+ <method name="remove_child">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
+ </description>
+ </method>
+ <method name="remove_from_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <description>
+ Remove a node from a group.
+ </description>
+ </method>
+ <method name="replace_by">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <argument index="1" name="keep_data" type="bool" default="false">
+ </argument>
+ <description>
+ Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
+ </description>
+ </method>
+ <method name="request_ready">
+ <return type="void">
+ </return>
+ <description>
+ Request that [code]_ready[/code] be called again.
+ </description>
+ </method>
+ <method name="rpc" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <description>
+ Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath].
+ </description>
+ </method>
+ <method name="rpc_config">
+ <return type="void">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Node.RPCMode">
+ </argument>
+ <description>
+ Change the method's RPC mode (one of RPC_MODE_* constants).
+ </description>
+ </method>
+ <method name="rpc_id" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <description>
+ Send a [method rpc] to a specific peer identified by [i]peer_id[/i].
+ </description>
+ </method>
+ <method name="rpc_unreliable" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <description>
+ Send a [method rpc] using an unreliable protocol.
+ </description>
+ </method>
+ <method name="rpc_unreliable_id" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <description>
+ Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol.
+ </description>
+ </method>
+ <method name="rset">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ Remotely change property's value on other peers (and locally).
+ </description>
+ </method>
+ <method name="rset_config">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Node.RPCMode">
+ </argument>
+ <description>
+ Change the property's RPC mode (one of RPC_MODE_* constants).
+ </description>
+ </method>
+ <method name="rset_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Remotely change property's value on a specific peer identified by [i]peer_id[/i].
+ </description>
+ </method>
+ <method name="rset_unreliable">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ Remotely change property's value on other peers (and locally) using an unreliable protocol.
+ </description>
+ </method>
+ <method name="rset_unreliable_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol.
+ </description>
+ </method>
+ <method name="set_display_folded">
+ <return type="void">
+ </return>
+ <argument index="0" name="fold" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_filename">
+ <return type="void">
+ </return>
+ <argument index="0" name="filename" type="String">
+ </argument>
+ <description>
+ A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded.
+ </description>
+ </method>
+ <method name="set_fixed_process">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time].
+ </description>
+ </method>
+ <method name="set_fixed_process_internal">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
+ </description>
+ </method>
+ <method name="set_network_master">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="recursive" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_owner">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner" type="Node">
+ </argument>
+ <description>
+ Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing.
+ </description>
+ </method>
+ <method name="set_pause_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Node.PauseMode">
+ </argument>
+ <description>
+ Set pause mode (PAUSE_MODE_*) of this Node.
+ </description>
+ </method>
+ <method name="set_process">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time].
+ </description>
+ </method>
+ <method name="set_process_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]).
+ </description>
+ </method>
+ <method name="set_process_internal">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_process_unhandled_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]).
+ </description>
+ </method>
+ <method name="set_process_unhandled_key_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scene_instance_load_placeholder">
+ <return type="void">
+ </return>
+ <argument index="0" name="load_placeholder" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_import_path" type="NodePath" setter="_set_import_path" getter="_get_import_path">
+ </member>
+ <member name="editor/display_folded" type="bool" setter="set_display_folded" getter="is_displayed_folded">
+ </member>
+ <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode">
+ </member>
+ </members>
+ <signals>
+ <signal name="renamed">
+ <description>
+ Emitted when the node is renamed.
+ </description>
+ </signal>
+ <signal name="tree_entered">
+ <description>
+ Emitted when Node enters the tree.
+ </description>
+ </signal>
+ <signal name="tree_exited">
+ <description>
+ Emitted when Node exits the tree.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_ENTER_TREE" value="10" enum="">
+ </constant>
+ <constant name="NOTIFICATION_EXIT_TREE" value="11" enum="">
+ </constant>
+ <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12" enum="">
+ </constant>
+ <constant name="NOTIFICATION_READY" value="13" enum="">
+ </constant>
+ <constant name="NOTIFICATION_FIXED_PROCESS" value="16" enum="">
+ </constant>
+ <constant name="NOTIFICATION_PROCESS" value="17" enum="">
+ Notification received every frame when the process flag is set (see [method set_process]).
+ </constant>
+ <constant name="NOTIFICATION_PARENTED" value="18" enum="">
+ Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree.
+ </constant>
+ <constant name="NOTIFICATION_UNPARENTED" value="19" enum="">
+ Notification received when a node is unparented (parent removed it from the list of children).
+ </constant>
+ <constant name="NOTIFICATION_PAUSED" value="14" enum="">
+ </constant>
+ <constant name="NOTIFICATION_UNPAUSED" value="15" enum="">
+ </constant>
+ <constant name="NOTIFICATION_INSTANCED" value="20" enum="">
+ </constant>
+ <constant name="NOTIFICATION_DRAG_BEGIN" value="21" enum="">
+ </constant>
+ <constant name="NOTIFICATION_DRAG_END" value="22" enum="">
+ </constant>
+ <constant name="NOTIFICATION_PATH_CHANGED" value="23" enum="">
+ </constant>
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="24" enum="">
+ </constant>
+ <constant name="NOTIFICATION_INTERNAL_PROCESS" value="25" enum="">
+ </constant>
+ <constant name="NOTIFICATION_INTERNAL_FIXED_PROCESS" value="26" enum="">
+ </constant>
+ <constant name="RPC_MODE_DISABLED" value="0">
+ </constant>
+ <constant name="RPC_MODE_REMOTE" value="1">
+ Call a method remotely.
+ </constant>
+ <constant name="RPC_MODE_SYNC" value="2">
+ Call a method both remotely and locally.
+ </constant>
+ <constant name="RPC_MODE_MASTER" value="3">
+ Call a method if the Node is Master.
+ </constant>
+ <constant name="RPC_MODE_SLAVE" value="4">
+ Call a method if the Node is Slave.
+ </constant>
+ <constant name="PAUSE_MODE_INHERIT" value="0">
+ Inherits pause mode from parent. For root node, it is equivalent to PAUSE_MODE_STOP.
+ </constant>
+ <constant name="PAUSE_MODE_STOP" value="1">
+ Stop processing when SceneTree is paused.
+ </constant>
+ <constant name="PAUSE_MODE_PROCESS" value="2">
+ Continue to process regardless of SceneTree pause state.
+ </constant>
+ <constant name="DUPLICATE_SIGNALS" value="1">
+ </constant>
+ <constant name="DUPLICATE_GROUPS" value="2">
+ </constant>
+ <constant name="DUPLICATE_SCRIPTS" value="4">
+ </constant>
+ <constant name="DUPLICATE_USE_INSTANCING" value="8">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
new file mode 100644
index 0000000000..2ba312b301
--- /dev/null
+++ b/doc/classes/Node2D.xml
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Node2D" inherits="CanvasItem" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index.
+ </brief_description>
+ <description>
+ A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="apply_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="Vector2">
+ </argument>
+ <description>
+ Multiplies the current scale by the 'ratio' vector.
+ </description>
+ </method>
+ <method name="edit_set_pivot">
+ <return type="void">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="get_angle_to" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Returns the angle between the node and the 'point' in radians.
+ </description>
+ </method>
+ <method name="get_global_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the node's global position.
+ </description>
+ </method>
+ <method name="get_global_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the node's global rotation in radians.
+ </description>
+ </method>
+ <method name="get_global_rotation_in_degrees" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the node's global rotation in degrees.
+ </description>
+ </method>
+ <method name="get_global_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the node's global scale.
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the node's position.
+ </description>
+ </method>
+ <method name="get_relative_transform_to_parent" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="parent" type="Node">
+ </argument>
+ <description>
+ Returns the [Transform2D] relative to this node's parent.
+ </description>
+ </method>
+ <method name="get_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the node's rotation in radians.
+ </description>
+ </method>
+ <method name="get_rotation_in_degrees" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the node's rotation in degrees.
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the node's scale.
+ </description>
+ </method>
+ <method name="get_z" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the node's Z-index.
+ </description>
+ </method>
+ <method name="global_translate">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Adds the 'offset' vector to the node's global position.
+ </description>
+ </method>
+ <method name="is_z_relative" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this node's Z-index is relative to its parent's. Else, returns false.
+ </description>
+ </method>
+ <method name="look_at">
+ <return type="void">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Rotates the node so it points towards the 'point'.
+ </description>
+ </method>
+ <method name="move_local_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="move_local_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="rotate">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Apply a rotation to the node, in radians, starting from its current rotation.
+ </description>
+ </method>
+ <method name="set_global_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Set the node's global position.
+ </description>
+ </method>
+ <method name="set_global_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Set the node's global rotation in radians.
+ </description>
+ </method>
+ <method name="set_global_rotation_in_degrees">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ Set the node's global rotation in degrees.
+ </description>
+ </method>
+ <method name="set_global_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set the node's global scale.
+ </description>
+ </method>
+ <method name="set_global_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ Set the node's global [Transform2D].
+ </description>
+ </method>
+ <method name="set_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Set the node's position.
+ </description>
+ </method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Set the node's rotation in radians.
+ </description>
+ </method>
+ <method name="set_rotation_in_degrees">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ Set the node's rotation in degrees.
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set the node's scale.
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ Set the node's local [Transform2D].
+ </description>
+ </method>
+ <method name="set_z">
+ <return type="void">
+ </return>
+ <argument index="0" name="z" type="int">
+ </argument>
+ <description>
+ Set the node's Z-index.
+ </description>
+ </method>
+ <method name="set_z_as_relative">
+ <return type="void">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="to_global" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="local_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="to_local" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="global_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="translate">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Translate the node locally by the 'offset' vector, starting from its current local position.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position">
+ Global position.
+ </member>
+ <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation">
+ Global rotation in radians.
+ </member>
+ <member name="global_rotation_deg" type="float" setter="set_global_rotation_in_degrees" getter="get_global_rotation_in_degrees">
+ Global rotation in degrees.
+ </member>
+ <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale">
+ Global scale.
+ </member>
+ <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform">
+ Global [Transform2D].
+ </member>
+ <member name="position" type="Vector2" setter="set_position" getter="get_position">
+ Position, relative to the node's parent.
+ </member>
+ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation">
+ Rotation in radians.
+ </member>
+ <member name="rotation_deg" type="float" setter="set_rotation_in_degrees" getter="get_rotation_in_degrees">
+ Rotation in degrees.
+ </member>
+ <member name="scale" type="Vector2" setter="set_scale" getter="get_scale">
+ Rotation in degrees.
+ </member>
+ <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
+ Local [Transform2D].
+ </member>
+ <member name="z" type="int" setter="set_z" getter="get_z">
+ Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others.
+ </member>
+ <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative">
+ 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.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
new file mode 100644
index 0000000000..9aa9572b80
--- /dev/null
+++ b/doc/classes/NodePath.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NodePath" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Pre-parsed scene tree path.
+ </brief_description>
+ <description>
+ A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.
+ You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
+ A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="NodePath">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
+ </description>
+ </method>
+ <method name="get_name">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the node name indicated by [code]idx[/code] (0 to [method get_name_count])
+ </description>
+ </method>
+ <method name="get_name_count">
+ <return type="int">
+ </return>
+ <description>
+ Get the number of node names which make up the path.
+ </description>
+ </method>
+ <method name="get_property">
+ <return type="String">
+ </return>
+ <description>
+ Get the path's property name, or an empty string if the path doesn't have a property.
+ </description>
+ </method>
+ <method name="get_subname">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count])
+ </description>
+ </method>
+ <method name="get_subname_count">
+ <return type="int">
+ </return>
+ <description>
+ Get the number of resource names in the path.
+ </description>
+ </method>
+ <method name="is_absolute">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the node path is absolute (not relative).
+ </description>
+ </method>
+ <method name="is_empty">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the node path is empty.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
new file mode 100644
index 0000000000..65200c4769
--- /dev/null
+++ b/doc/classes/OS.xml
@@ -0,0 +1,854 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OS" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Operating System functions.
+ </brief_description>
+ <description>
+ Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="alert">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="title" type="String" default="&quot;Alert!&quot;">
+ </argument>
+ <description>
+ Displays a modal dialog box utilizing the host OS.
+ </description>
+ </method>
+ <method name="can_draw" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the host OS allows drawing.
+ </description>
+ </method>
+ <method name="can_use_threads" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns if the current host platform is using multiple threads.
+ </description>
+ </method>
+ <method name="delay_msec" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="msec" type="int">
+ </argument>
+ <description>
+ Delay executing of the current thread by given milliseconds.
+ </description>
+ </method>
+ <method name="delay_usec" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="usec" type="int">
+ </argument>
+ <description>
+ Delay executing of the current thread by given microseconds.
+ </description>
+ </method>
+ <method name="dump_memory_to_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ Dumps the memory allocation ringlist to a file (only works in debug).
+ Entry format per line: "Address - Size - Description"
+ </description>
+ </method>
+ <method name="dump_resources_to_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ Dumps all used resources to file (only works in debug).
+ Entry format per line: "Resource Type : Resource Location"
+ At the end of the file is a statistic of all used Resource Types.
+ </description>
+ </method>
+ <method name="execute">
+ <return type="int">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="arguments" type="PoolStringArray">
+ </argument>
+ <argument index="2" name="blocking" type="bool">
+ </argument>
+ <argument index="3" name="output" type="Array" default="[ ]">
+ </argument>
+ <description>
+ Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
+ </description>
+ </method>
+ <method name="find_scancode_from_string" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Returns the scancode of the given string (e.g. "Escape")
+ </description>
+ </method>
+ <method name="get_borderless_window" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the current window is borderless.
+ </description>
+ </method>
+ <method name="get_clipboard" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get clipboard from the host OS.
+ </description>
+ </method>
+ <method name="get_cmdline_args">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return the commandline passed to the engine.
+ </description>
+ </method>
+ <method name="get_current_screen" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current screen index (0 padded).
+ </description>
+ </method>
+ <method name="get_data_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the absolute directory path of user data path([user://]).
+ </description>
+ </method>
+ <method name="get_date" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time).
+ </description>
+ </method>
+ <method name="get_datetime" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second.
+ </description>
+ </method>
+ <method name="get_datetime_from_unix_time" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="unix_time_val" type="int">
+ </argument>
+ <description>
+ Get a dictionary of time values when given epoch time.
+ Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch).
+ </description>
+ </method>
+ <method name="get_dynamic_memory_usage" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the total amount of dynamic memory used (only works in debug).
+ </description>
+ </method>
+ <method name="get_environment" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="environment" type="String">
+ </argument>
+ <description>
+ Return an environment variable.
+ </description>
+ </method>
+ <method name="get_executable_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the path to the current engine executable.
+ </description>
+ </method>
+ <method name="get_exit_code" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_latin_keyboard_variant" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the current latin keyboard variant as a String.
+ Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR"
+ </description>
+ </method>
+ <method name="get_locale" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the host OS locale.
+ </description>
+ </method>
+ <method name="get_model_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the model name of the current device.
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11".
+ </description>
+ </method>
+ <method name="get_power_percent_left">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_power_seconds_left">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_power_state">
+ <return type="int" enum="OS.PowerState">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_process_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the game process ID
+ </description>
+ </method>
+ <method name="get_processor_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of cores available in the host machine.
+ </description>
+ </method>
+ <method name="get_scancode_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="code" type="int">
+ </argument>
+ <description>
+ Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape").
+ </description>
+ </method>
+ <method name="get_screen_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of displays attached to the host machine
+ </description>
+ </method>
+ <method name="get_screen_dpi" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ Returns the dots per inch density of the specified screen.
+
+ On Android Devices, the actual screen densities are grouped into six generalized densities:
+ ldpi - 120 dpi
+ mdpi - 160 dpi
+ hdpi - 240 dpi
+ xhdpi - 320 dpi
+ xxhdpi - 480 dpi
+ xxxhdpi - 640 dpi
+ </description>
+ </method>
+ <method name="get_screen_orientation" qualifiers="const">
+ <return type="int" enum="OS.ScreenOrientation">
+ </return>
+ <description>
+ Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
+ </description>
+ </method>
+ <method name="get_screen_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_screen_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="screen" type="int" default="-1">
+ </argument>
+ <description>
+ Returns the dimensions in pixels of the specified screen.
+ </description>
+ </method>
+ <method name="get_splash_tick_msec" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_static_memory_peak_usage" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the max amount of static memory used (only works in debug).
+ </description>
+ </method>
+ <method name="get_static_memory_usage" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_system_dir" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="dir" type="int" enum="OS.SystemDir">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_system_time_secs" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ticks_msec" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of time passed in milliseconds since the engine started.
+ </description>
+ </method>
+ <method name="get_time" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="utc" type="bool" default="false">
+ </argument>
+ <description>
+ Returns current time as a dictionary of keys: hour, minute, second
+ </description>
+ </method>
+ <method name="get_time_zone_info" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unique_id" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_unix_time" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the current unix timestamp.
+ </description>
+ </method>
+ <method name="get_unix_time_from_datetime" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="datetime" type="Dictionary">
+ </argument>
+ <description>
+ Get an epoch time value from a dictionary of time values.
+ [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second.
+ You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored.
+ </description>
+ </method>
+ <method name="get_window_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
+ </description>
+ </method>
+ <method name="get_window_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the size of the window (without counting window manager decorations).
+ </description>
+ </method>
+ <method name="has_environment" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="environment" type="String">
+ </argument>
+ <description>
+ Return true if an environment variable exists.
+ </description>
+ </method>
+ <method name="has_touchscreen_ui_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_virtual_keyboard" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the platform has a virtual keyboard, false otherwise.
+ </description>
+ </method>
+ <method name="hide_virtual_keyboard">
+ <return type="void">
+ </return>
+ <description>
+ Hides the virtual keyboard if it is shown, does nothing otherwise.
+ </description>
+ </method>
+ <method name="is_debug_build" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_in_low_processor_usage_mode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if low cpu usage mode is enabled.
+ </description>
+ </method>
+ <method name="is_keep_screen_on" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the screen is being kept on or not.
+ </description>
+ </method>
+ <method name="is_ok_left_and_cancel_right" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_scancode_unicode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="code" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_stdout_verbose" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the engine was executed with -v (verbose stdout).
+ </description>
+ </method>
+ <method name="is_vsync_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_window_fullscreen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the window is in fullscreen mode or not.
+ </description>
+ </method>
+ <method name="is_window_maximized" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the window is maximized.
+ </description>
+ </method>
+ <method name="is_window_minimized" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the window is minimized.
+ </description>
+ </method>
+ <method name="is_window_resizable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the window is resizable or not.
+ </description>
+ </method>
+ <method name="kill">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="pid" type="int">
+ </argument>
+ <description>
+ Kill a process ID (this method can be used to kill processes that were not spawned by the game).
+ </description>
+ </method>
+ <method name="native_video_is_playing">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_pause">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_play">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="volume" type="float">
+ </argument>
+ <argument index="2" name="audio_track" type="String">
+ </argument>
+ <argument index="3" name="subtitle_track" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_stop">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="native_video_unpause">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="print_all_resources">
+ <return type="void">
+ </return>
+ <argument index="0" name="tofile" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="print_all_textures_by_size">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="print_resources_by_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="types" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="print_resources_in_use">
+ <return type="void">
+ </return>
+ <argument index="0" name="short" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="request_attention">
+ <return type="void">
+ </return>
+ <description>
+ Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
+ </description>
+ </method>
+ <method name="set_borderless_window">
+ <return type="void">
+ </return>
+ <argument index="0" name="borderless" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_clipboard">
+ <return type="void">
+ </return>
+ <argument index="0" name="clipboard" type="String">
+ </argument>
+ <description>
+ Set clipboard to the OS.
+ </description>
+ </method>
+ <method name="set_current_screen">
+ <return type="void">
+ </return>
+ <argument index="0" name="screen" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_exit_code">
+ <return type="void">
+ </return>
+ <argument index="0" name="code" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="icon" type="Image">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ime_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_keep_screen_on">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS)
+ </description>
+ </method>
+ <method name="set_low_processor_usage_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu.
+ </description>
+ </method>
+ <method name="set_screen_orientation">
+ <return type="void">
+ </return>
+ <argument index="0" name="orientation" type="int" enum="OS.ScreenOrientation">
+ </argument>
+ <description>
+ Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
+ </description>
+ </method>
+ <method name="set_thread_name">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_file_access_save_and_swap">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_vsync">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_window_fullscreen">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode.
+ </description>
+ </method>
+ <method name="set_window_maximized">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the window size to maximized.
+ </description>
+ </method>
+ <method name="set_window_minimized">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether the window is minimized.
+ </description>
+ </method>
+ <method name="set_window_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen).
+ </description>
+ </method>
+ <method name="set_window_resizable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings.
+ </description>
+ </method>
+ <method name="set_window_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Sets the window size to the specified size.
+ </description>
+ </method>
+ <method name="set_window_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <description>
+ Sets the window title to the specified string.
+ </description>
+ </method>
+ <method name="shell_open">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="uri" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="show_virtual_keyboard">
+ <return type="void">
+ </return>
+ <argument index="0" name="existing_text" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Shows the virtual keyboard if the platform has one. The [i]existing_text[/i] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="DAY_SUNDAY" value="0">
+ </constant>
+ <constant name="DAY_MONDAY" value="1">
+ </constant>
+ <constant name="DAY_TUESDAY" value="2">
+ </constant>
+ <constant name="DAY_WEDNESDAY" value="3">
+ </constant>
+ <constant name="DAY_THURSDAY" value="4">
+ </constant>
+ <constant name="DAY_FRIDAY" value="5">
+ </constant>
+ <constant name="DAY_SATURDAY" value="6">
+ </constant>
+ <constant name="MONTH_JANUARY" value="1">
+ </constant>
+ <constant name="MONTH_FEBRUARY" value="2">
+ </constant>
+ <constant name="MONTH_MARCH" value="3">
+ </constant>
+ <constant name="MONTH_APRIL" value="4">
+ </constant>
+ <constant name="MONTH_MAY" value="5">
+ </constant>
+ <constant name="MONTH_JUNE" value="6">
+ </constant>
+ <constant name="MONTH_JULY" value="7">
+ </constant>
+ <constant name="MONTH_AUGUST" value="8">
+ </constant>
+ <constant name="MONTH_SEPTEMBER" value="9">
+ </constant>
+ <constant name="MONTH_OCTOBER" value="10">
+ </constant>
+ <constant name="MONTH_NOVEMBER" value="11">
+ </constant>
+ <constant name="MONTH_DECEMBER" value="12">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_PORTRAIT" value="1">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5">
+ </constant>
+ <constant name="SCREEN_ORIENTATION_SENSOR" value="6">
+ </constant>
+ <constant name="SYSTEM_DIR_DESKTOP" value="0">
+ </constant>
+ <constant name="SYSTEM_DIR_DCIM" value="1">
+ </constant>
+ <constant name="SYSTEM_DIR_DOCUMENTS" value="2">
+ </constant>
+ <constant name="SYSTEM_DIR_DOWNLOADS" value="3">
+ </constant>
+ <constant name="SYSTEM_DIR_MOVIES" value="4">
+ </constant>
+ <constant name="SYSTEM_DIR_MUSIC" value="5">
+ </constant>
+ <constant name="SYSTEM_DIR_PICTURES" value="6">
+ </constant>
+ <constant name="SYSTEM_DIR_RINGTONES" value="7">
+ </constant>
+ <constant name="POWERSTATE_UNKNOWN" value="0">
+ </constant>
+ <constant name="POWERSTATE_ON_BATTERY" value="1">
+ </constant>
+ <constant name="POWERSTATE_NO_BATTERY" value="2">
+ </constant>
+ <constant name="POWERSTATE_CHARGING" value="3">
+ </constant>
+ <constant name="POWERSTATE_CHARGED" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
new file mode 100644
index 0000000000..67421487f1
--- /dev/null
+++ b/doc/classes/Object.xml
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all non built-in types.
+ </brief_description>
+ <description>
+ Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class.
+ Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++).
+ Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted.
+ Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
+ Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_get" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ Return a property, return null if the property does not exist.
+ </description>
+ </method>
+ <method name="_get_property_list" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]).
+ </description>
+ </method>
+ <method name="_init" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_notification" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="what" type="int">
+ </argument>
+ <description>
+ Notification request, the notification id is received.
+ </description>
+ </method>
+ <method name="_set" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ Set a property. Return true if the property was found.
+ </description>
+ </method>
+ <method name="add_user_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <argument index="1" name="arguments" type="Array" default="[ ]">
+ </argument>
+ <description>
+ Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*).
+ </description>
+ </method>
+ <method name="call" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="call_deferred" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="callv">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <argument index="1" name="arg_array" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="can_translate_messages" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if this object can translate strings.
+ </description>
+ </method>
+ <method name="connect">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <argument index="1" name="target" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <argument index="3" name="binds" type="Array" default="[ ]">
+ </argument>
+ <argument index="4" name="flags" type="int" default="0">
+ </argument>
+ <description>
+ Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check.
+ </description>
+ </method>
+ <method name="disconnect">
+ <return type="void">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <argument index="1" name="target" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <description>
+ Disconnect a signal from a method.
+ </description>
+ </method>
+ <method name="emit_signal" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="free">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ Get a property from the object.
+ </description>
+ </method>
+ <method name="get_class" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the class of the object as a string.
+ </description>
+ </method>
+ <method name="get_incoming_connections" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an [Array] of dictionaries with informations about signals that are connected to this object.
+ Inside each [Dictionary] there are 3 fields:
+ - "source" is a reference to signal emitter.
+ - "signal_name" is name of connected signal.
+ - "method_name" is a name of method to which signal is connected.
+ </description>
+ </method>
+ <method name="get_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the instance ID. All objects have a unique instance ID.
+ </description>
+ </method>
+ <method name="get_meta" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return a metadata from the object.
+ </description>
+ </method>
+ <method name="get_meta_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return the list of metadata in the object.
+ </description>
+ </method>
+ <method name="get_method_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_property_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]).
+ </description>
+ </method>
+ <method name="get_script" qualifiers="const">
+ <return type="Reference">
+ </return>
+ <description>
+ Return the object script (or null if it doesn't have one).
+ </description>
+ </method>
+ <method name="get_signal_connection_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_signal_list" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of signals as an array of dictionaries.
+ </description>
+ </method>
+ <method name="has_meta" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return true if a metadata is found with the requested name.
+ </description>
+ </method>
+ <method name="has_method" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_user_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_blocking_signals" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if signal emission blocking is enabled.
+ </description>
+ </method>
+ <method name="is_class" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Check the class of the object against a string (including inheritance).
+ </description>
+ </method>
+ <method name="is_connected" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <argument index="1" name="target" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <description>
+ Return true if a connection exists for a given signal and target/method.
+ </description>
+ </method>
+ <method name="is_queued_for_deletion" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="notification">
+ <return type="void">
+ </return>
+ <argument index="0" name="what" type="int">
+ </argument>
+ <argument index="1" name="reversed" type="bool" default="false">
+ </argument>
+ <description>
+ Notify the object of something.
+ </description>
+ </method>
+ <method name="property_list_changed_notify">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ Set property into the object.
+ </description>
+ </method>
+ <method name="set_block_signals">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ If set to true, signal emission is blocked.
+ </description>
+ </method>
+ <method name="set_message_translation">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Define whether this object can translate strings (with calls to [method tr]). Default is true.
+ </description>
+ </method>
+ <method name="set_meta">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
+ </description>
+ </method>
+ <method name="set_script">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="Reference">
+ </argument>
+ <description>
+ Set a script into the object, scripts extend the object functionality.
+ </description>
+ </method>
+ <method name="tr" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="message" type="String">
+ </argument>
+ <description>
+ Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation].
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="script_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_POSTINITIALIZE" value="0" enum="">
+ Called right when the object is initialized. Not available in script.
+ </constant>
+ <constant name="NOTIFICATION_PREDELETE" value="1" enum="">
+ Called before the object is about to be deleted.
+ </constant>
+ <constant name="CONNECT_DEFERRED" value="1">
+ Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time.
+ </constant>
+ <constant name="CONNECT_PERSIST" value="2">
+ Persisting connections are saved when the object is serialized to file.
+ </constant>
+ <constant name="CONNECT_ONESHOT" value="4">
+ One shot connections disconnect themselves after emission.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
new file mode 100644
index 0000000000..99c1536ddf
--- /dev/null
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cull_mode" qualifiers="const">
+ <return type="int" enum="OccluderPolygon2D.CullMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_polygon" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_closed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_closed">
+ <return type="void">
+ </return>
+ <argument index="0" name="closed" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cull_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="cull_mode" type="int" enum="OccluderPolygon2D.CullMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="closed" type="bool" setter="set_closed" getter="is_closed">
+ </member>
+ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode">
+ </member>
+ <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ </member>
+ </members>
+ <constants>
+ <constant name="CULL_DISABLED" value="0">
+ </constant>
+ <constant name="CULL_CLOCKWISE" value="1">
+ </constant>
+ <constant name="CULL_COUNTER_CLOCKWISE" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
new file mode 100644
index 0000000000..cb8e756a4c
--- /dev/null
+++ b/doc/classes/OmniLight.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OmniLight" inherits="Light" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ OmniDirectional Light, such as a light bulb or a candle.
+ </brief_description>
+ <description>
+ An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_shadow_detail" qualifiers="const">
+ <return type="int" enum="OmniLight.ShadowDetail">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_mode" qualifiers="const">
+ <return type="int" enum="OmniLight.ShadowMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_detail">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail" type="int" enum="OmniLight.ShadowDetail">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="OmniLight.ShadowMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="omni_attenuation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="omni_range" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail">
+ </member>
+ <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode">
+ </member>
+ </members>
+ <constants>
+ <constant name="SHADOW_DUAL_PARABOLOID" value="0">
+ </constant>
+ <constant name="SHADOW_CUBE" value="1">
+ </constant>
+ <constant name="SHADOW_DETAIL_VERTICAL" value="0">
+ </constant>
+ <constant name="SHADOW_DETAIL_HORIZONTAL" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
new file mode 100644
index 0000000000..abb0dc4f2d
--- /dev/null
+++ b/doc/classes/OptionButton.xml
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OptionButton" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Button control that provides selectable options when pressed.
+ </brief_description>
+ <description>
+ OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_icon_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="id" type="int">
+ </argument>
+ <description>
+ Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
+ </description>
+ </method>
+ <method name="add_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="label" type="String">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
+ </description>
+ </method>
+ <method name="add_separator">
+ <return type="void">
+ </return>
+ <description>
+ Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the items in the [OptionButton].
+ </description>
+ </method>
+ <method name="get_item_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of items in the OptionButton.
+ </description>
+ </method>
+ <method name="get_item_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the icon of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the ID of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the text of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_selected" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the current item index
+ </description>
+ </method>
+ <method name="get_selected_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_selected_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_item_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="select">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Select an item by index and make it the current item.
+ </description>
+ </method>
+ <method name="set_item_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Set the icon of an item at index "idx".
+ </description>
+ </method>
+ <method name="set_item_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ Set the ID of an item at index "idx".
+ </description>
+ </method>
+ <method name="set_item_metadata">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="metadata" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ Set the text of an item at index "idx".
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="items" type="Array" setter="_set_items" getter="_get_items">
+ </member>
+ <member name="selected" type="int" setter="_select_int" getter="get_selected">
+ </member>
+ </members>
+ <signals>
+ <signal name="item_selected">
+ <argument index="0" name="ID" type="int">
+ </argument>
+ <description>
+ This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="arrow" type="Texture">
+ </theme_item>
+ <theme_item name="arrow_margin" type="int">
+ </theme_item>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
new file mode 100644
index 0000000000..cf8efdf6be
--- /dev/null
+++ b/doc/classes/PCKPacker.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PCKPacker" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_file">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="pck_path" type="String">
+ </argument>
+ <argument index="1" name="source_path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="flush">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="verbose" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pck_start">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="pck_name" type="String">
+ </argument>
+ <argument index="1" name="alignment" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml
new file mode 100644
index 0000000000..b25ddcbf22
--- /dev/null
+++ b/doc/classes/PHashTranslation.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PHashTranslation" inherits="Translation" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Optimized translation.
+ </brief_description>
+ <description>
+ Optimized translation. Uses real-time compressed translations, which results in very small dictionaries.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="generate">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="Translation">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
new file mode 100644
index 0000000000..660a39f210
--- /dev/null
+++ b/doc/classes/PackedDataContainer.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="pack">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
new file mode 100644
index 0000000000..413cd4468b
--- /dev/null
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
new file mode 100644
index 0000000000..b40207229c
--- /dev/null
+++ b/doc/classes/PackedScene.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedScene" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ TODO: explain ownership, and that node does not need to own itself
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="can_instance" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_state">
+ <return type="SceneState">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="instance" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pack">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="Node">
+ </argument>
+ <description>
+ Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene">
+ </member>
+ </members>
+ <constants>
+ <constant name="GEN_EDIT_STATE_DISABLED" value="0">
+ </constant>
+ <constant name="GEN_EDIT_STATE_INSTANCE" value="1">
+ </constant>
+ <constant name="GEN_EDIT_STATE_MAIN" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
new file mode 100644
index 0000000000..bc15e5fc0c
--- /dev/null
+++ b/doc/classes/PacketPeer.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeer" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Abstraction and base class for packet-based protocols.
+ </brief_description>
+ <description>
+ PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_available_packet_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the number of packets currently available in the ring-buffer.
+ </description>
+ </method>
+ <method name="get_packet" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ Get a raw packet.
+ </description>
+ </method>
+ <method name="get_packet_error" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Return the error state of the last packet received (via [method get_packet] and [method get_var]).
+ </description>
+ </method>
+ <method name="get_var" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Get a Variant.
+ </description>
+ </method>
+ <method name="is_object_decoding_allowed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="put_packet">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="PoolByteArray">
+ </argument>
+ <description>
+ Send a raw packet.
+ </description>
+ </method>
+ <method name="put_var">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ Send a Variant as a packet.
+ </description>
+ </method>
+ <method name="set_allow_object_decoding">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
new file mode 100644
index 0000000000..531046a4ba
--- /dev/null
+++ b/doc/classes/PacketPeerStream.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Wrapper to use a PacketPeer over a StreamPeer.
+ </brief_description>
+ <description>
+ PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_input_buffer_max_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_output_buffer_max_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_input_buffer_max_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_output_buffer_max_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stream_peer">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer" type="Reference">
+ </argument>
+ <description>
+ Set the [StreamPeer] object to be wrapped.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
new file mode 100644
index 0000000000..9bff0c9b5e
--- /dev/null
+++ b/doc/classes/PacketPeerUDP.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ UDP packet peer.
+ </brief_description>
+ <description>
+ UDP packet peer. Can be used to send raw UDP packets as well as [Variant]\ s.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="close">
+ <return type="void">
+ </return>
+ <description>
+ Close the UDP socket the [PacketPeerUDP] is currently listening on.
+ </description>
+ </method>
+ <method name="get_packet_ip" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
+ </description>
+ </method>
+ <method name="get_packet_port" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]).
+ </description>
+ </method>
+ <method name="is_listening" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this [PacketPeerUDP] is listening.
+ </description>
+ </method>
+ <method name="listen">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
+ </argument>
+ <argument index="2" name="recv_buf_size" type="int" default="65536">
+ </argument>
+ <description>
+ Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size".
+ If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6).
+ If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type.
+ If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).
+ </description>
+ </method>
+ <method name="set_dest_address">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <description>
+ Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid.
+ </description>
+ </method>
+ <method name="wait">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Wait for a packet to arrive on the listening port, see [method listen].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
new file mode 100644
index 0000000000..8a57659c0c
--- /dev/null
+++ b/doc/classes/Panel.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Panel" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Provides an opaque background for [Control] children.
+ </brief_description>
+ <description>
+ Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="panelf" type="StyleBox">
+ </theme_item>
+ <theme_item name="panelnc" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
new file mode 100644
index 0000000000..29d5169b9e
--- /dev/null
+++ b/doc/classes/PanelContainer.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PanelContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Panel container type.
+ </brief_description>
+ <description>
+ Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml
new file mode 100644
index 0000000000..81f358461e
--- /dev/null
+++ b/doc/classes/PanoramaSky.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PanoramaSky" inherits="Sky" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_panorama" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_panorama">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
new file mode 100644
index 0000000000..a7d616129a
--- /dev/null
+++ b/doc/classes/ParallaxBackground.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_limit_begin" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the beginning limit.
+ </description>
+ </method>
+ <method name="get_limit_end" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the ending limit.
+ </description>
+ </method>
+ <method name="get_scroll_base_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the base offset.
+ </description>
+ </method>
+ <method name="get_scroll_base_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the base motion scale.
+ </description>
+ </method>
+ <method name="get_scroll_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_ignore_camera_zoom">
+ <return type="bool">
+ </return>
+ <description>
+ Return ignoring camera zoom.
+ </description>
+ </method>
+ <method name="set_ignore_camera_zoom">
+ <return type="void">
+ </return>
+ <argument index="0" name="ignore" type="bool">
+ </argument>
+ <description>
+ Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera.
+ </description>
+ </method>
+ <method name="set_limit_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis.
+ </description>
+ </method>
+ <method name="set_limit_end">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis.
+ </description>
+ </method>
+ <method name="set_scroll_base_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ Set the base offset in pixels of all children [ParallaxLayer] nodes.
+ </description>
+ </method>
+ <method name="set_scroll_base_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set the base motion scale of all children [ParallaxLayer] nodes.
+ </description>
+ </method>
+ <method name="set_scroll_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset">
+ </member>
+ <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale">
+ </member>
+ <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom">
+ </member>
+ <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin">
+ </member>
+ <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end">
+ </member>
+ <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
new file mode 100644
index 0000000000..6cf5549c8f
--- /dev/null
+++ b/doc/classes/ParallaxLayer.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_mirroring" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the mirroring of the ParallaxLayer.
+ </description>
+ </method>
+ <method name="get_motion_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_motion_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the motion scale of the ParallaxLayer.
+ </description>
+ </method>
+ <method name="set_mirroring">
+ <return type="void">
+ </return>
+ <argument index="0" name="mirror" type="Vector2">
+ </argument>
+ <description>
+ Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
+ </description>
+ </method>
+ <method name="set_motion_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_motion_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring">
+ </member>
+ <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset">
+ </member>
+ <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
new file mode 100644
index 0000000000..e17e60f2bc
--- /dev/null
+++ b/doc/classes/Particles.xml
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Particles" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="capture_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_amount" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_draw_order" qualifiers="const">
+ <return type="int" enum="Particles.DrawOrder">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_draw_pass_mesh" qualifiers="const">
+ <return type="Mesh">
+ </return>
+ <argument index="0" name="pass" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_draw_passes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_explosiveness_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fixed_fps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fractional_delta" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lifetime" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_one_shot" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pre_process_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_process_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_randomness_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_speed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_local_coordinates" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_visibility_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_emitting" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="restart">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_order">
+ <return type="void">
+ </return>
+ <argument index="0" name="order" type="int" enum="Particles.DrawOrder">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_pass_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="pass" type="int">
+ </argument>
+ <argument index="1" name="mesh" type="Mesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_passes">
+ <return type="void">
+ </return>
+ <argument index="0" name="passes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emitting">
+ <return type="void">
+ </return>
+ <argument index="0" name="emitting" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_explosiveness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fixed_fps">
+ <return type="void">
+ </return>
+ <argument index="0" name="fps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fractional_delta">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lifetime">
+ <return type="void">
+ </return>
+ <argument index="0" name="secs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_one_shot">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pre_process_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="secs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_process_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_randomness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_speed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_local_coordinates">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_visibility_aabb">
+ <return type="void">
+ </return>
+ <argument index="0" name="aabb" type="Rect3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="amount" type="int" setter="set_amount" getter="get_amount">
+ </member>
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder">
+ </member>
+ <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
+ </member>
+ <member name="draw_pass_2" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
+ </member>
+ <member name="draw_pass_3" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
+ </member>
+ <member name="draw_pass_4" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh">
+ </member>
+ <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes">
+ </member>
+ <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting">
+ </member>
+ <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio">
+ </member>
+ <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps">
+ </member>
+ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta">
+ </member>
+ <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime">
+ </member>
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates">
+ </member>
+ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot">
+ </member>
+ <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time">
+ </member>
+ <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
+ </member>
+ <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio">
+ </member>
+ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
+ </member>
+ <member name="visibility_aabb" type="Rect3" setter="set_visibility_aabb" getter="get_visibility_aabb">
+ </member>
+ </members>
+ <constants>
+ <constant name="DRAW_ORDER_INDEX" value="0">
+ </constant>
+ <constant name="DRAW_ORDER_LIFETIME" value="1">
+ </constant>
+ <constant name="DRAW_ORDER_VIEW_DEPTH" value="2">
+ </constant>
+ <constant name="MAX_DRAW_PASSES" value="4" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
new file mode 100644
index 0000000000..d837d6eb62
--- /dev/null
+++ b/doc/classes/Particles2D.xml
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Particles2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ 2D Particle emitter
+ </brief_description>
+ <description>
+ Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="capture_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_amount" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the amount of particles spawned at each emission
+ </description>
+ </method>
+ <method name="get_draw_order" qualifiers="const">
+ <return type="int" enum="Particles2D.DrawOrder">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_explosiveness_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fixed_fps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fractional_delta" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_h_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_lifetime" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Gets the amount of seconds that each particle will be visible.
+ </description>
+ </method>
+ <method name="get_normal_map" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_one_shot" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pre_process_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_process_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_randomness_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_speed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ Returns the texture for emitted particles
+ </description>
+ </method>
+ <method name="get_use_local_coordinates" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_visibility_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_emitting" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this emitter is currently emitting or not
+ </description>
+ </method>
+ <method name="restart">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Sets the amount of particles spawned at each emission
+ </description>
+ </method>
+ <method name="set_draw_order">
+ <return type="void">
+ </return>
+ <argument index="0" name="order" type="int" enum="Particles2D.DrawOrder">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emitting">
+ <return type="void">
+ </return>
+ <argument index="0" name="emitting" type="bool">
+ </argument>
+ <description>
+ If this is set to true then the particle emitter will emit particles, if its false it will not.
+ </description>
+ </method>
+ <method name="set_explosiveness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fixed_fps">
+ <return type="void">
+ </return>
+ <argument index="0" name="fps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fractional_delta">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lifetime">
+ <return type="void">
+ </return>
+ <argument index="0" name="secs" type="float">
+ </argument>
+ <description>
+ Sets the amount of seconds that each particle will be visible.
+ </description>
+ </method>
+ <method name="set_normal_map">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_one_shot">
+ <return type="void">
+ </return>
+ <argument index="0" name="secs" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pre_process_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="secs" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_process_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_randomness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_speed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_local_coordinates">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_visibility_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="aabb" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="amount" type="int" setter="set_amount" getter="get_amount">
+ </member>
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder">
+ </member>
+ <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting">
+ </member>
+ <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio">
+ </member>
+ <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps">
+ </member>
+ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta">
+ </member>
+ <member name="h_frames" type="int" setter="set_h_frames" getter="get_h_frames">
+ </member>
+ <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime">
+ </member>
+ <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates">
+ </member>
+ <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ </member>
+ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot">
+ </member>
+ <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time">
+ </member>
+ <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
+ </member>
+ <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio">
+ </member>
+ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames">
+ </member>
+ <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect">
+ </member>
+ </members>
+ <constants>
+ <constant name="DRAW_ORDER_INDEX" value="0">
+ </constant>
+ <constant name="DRAW_ORDER_LIFETIME" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
new file mode 100644
index 0000000000..1767a19a9f
--- /dev/null
+++ b/doc/classes/ParticlesMaterial.xml
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_color_ramp" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_box_extents" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_color_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_normal_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_point_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_point_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_shape" qualifiers="const">
+ <return type="int" enum="ParticlesMaterial.EmissionShape">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_sphere_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_flatness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_gravity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param_randomness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_param_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_spread" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_trail_color_modifier" qualifiers="const">
+ <return type="GradientTexture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_trail_divisor" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_trail_size_modifier" qualifiers="const">
+ <return type="CurveTexture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_color_ramp">
+ <return type="void">
+ </return>
+ <argument index="0" name="ramp" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_box_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_color_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_normal_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_point_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="point_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_point_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="int" enum="ParticlesMaterial.EmissionShape">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_sphere_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flatness">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="accel_vec" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param_randomness">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <argument index="1" name="randomness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_spread">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_trail_color_modifier">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="GradientTexture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_trail_divisor">
+ <return type="void">
+ </return>
+ <argument index="0" name="divisor" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_trail_size_modifier">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="CurveTexture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angle" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="angular_velocity" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="anim_loop" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="anim_offset" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="anim_speed" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="color" type="Color" setter="set_color" getter="get_color">
+ </member>
+ <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp">
+ </member>
+ <member name="damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
+ </member>
+ <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture">
+ </member>
+ <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
+ </member>
+ <member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count">
+ </member>
+ <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture">
+ </member>
+ <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape">
+ </member>
+ <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
+ </member>
+ <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flatness" type="float" setter="set_flatness" getter="get_flatness">
+ </member>
+ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity">
+ </member>
+ <member name="hue_variation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="initial_velocity" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="linear_accel" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="radial_accel" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="scale" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="spread" type="float" setter="set_spread" getter="get_spread">
+ </member>
+ <member name="tangential_accel" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture">
+ </member>
+ <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
+ </member>
+ <member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier">
+ </member>
+ <member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor">
+ </member>
+ <member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0">
+ </constant>
+ <constant name="PARAM_ANGULAR_VELOCITY" value="1">
+ </constant>
+ <constant name="PARAM_ORBIT_VELOCITY" value="2">
+ </constant>
+ <constant name="PARAM_LINEAR_ACCEL" value="3">
+ </constant>
+ <constant name="PARAM_RADIAL_ACCEL" value="4">
+ </constant>
+ <constant name="PARAM_TANGENTIAL_ACCEL" value="5">
+ </constant>
+ <constant name="PARAM_DAMPING" value="6">
+ </constant>
+ <constant name="PARAM_ANGLE" value="7">
+ </constant>
+ <constant name="PARAM_SCALE" value="8">
+ </constant>
+ <constant name="PARAM_HUE_VARIATION" value="9">
+ </constant>
+ <constant name="PARAM_ANIM_SPEED" value="10">
+ </constant>
+ <constant name="PARAM_ANIM_OFFSET" value="11">
+ </constant>
+ <constant name="PARAM_MAX" value="12">
+ </constant>
+ <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0">
+ </constant>
+ <constant name="FLAG_ROTATE_Y" value="1">
+ </constant>
+ <constant name="FLAG_MAX" value="4">
+ </constant>
+ <constant name="EMISSION_SHAPE_POINT" value="0">
+ </constant>
+ <constant name="EMISSION_SHAPE_SPHERE" value="1">
+ </constant>
+ <constant name="EMISSION_SHAPE_BOX" value="2">
+ </constant>
+ <constant name="EMISSION_SHAPE_POINTS" value="3">
+ </constant>
+ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml
new file mode 100644
index 0000000000..97543418b9
--- /dev/null
+++ b/doc/classes/Path.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Path" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Container for a [Curve3D].
+ </brief_description>
+ <description>
+ This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_curve" qualifiers="const">
+ <return type="Curve3D">
+ </return>
+ <description>
+ Returns the [Curve3D] contained.
+ </description>
+ </method>
+ <method name="set_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="Curve3D">
+ </argument>
+ <description>
+ Sets the [Curve3D].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="curve" type="Curve3D" setter="set_curve" getter="get_curve">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
new file mode 100644
index 0000000000..839e617375
--- /dev/null
+++ b/doc/classes/Path2D.xml
@@ -0,0 +1,37 @@
+<?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].
+ </brief_description>
+ <description>
+ This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_curve" qualifiers="const">
+ <return type="Curve2D">
+ </return>
+ <description>
+ Returns the [Curve2D] contained.
+ </description>
+ </method>
+ <method name="set_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="Curve2D">
+ </argument>
+ <description>
+ Sets the [Curve2D].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="curve" type="Curve2D" setter="set_curve" getter="get_curve">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml
new file mode 100644
index 0000000000..86f55a2aaf
--- /dev/null
+++ b/doc/classes/PathFollow.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PathFollow" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Point sampler for a [Path].
+ </brief_description>
+ <description>
+ This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cubic_interpolation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
+ </description>
+ </method>
+ <method name="get_h_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the X displacement this node has from its parent [Path].
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance along the path in 3D units.
+ </description>
+ </method>
+ <method name="get_rotation_mode" qualifiers="const">
+ <return type="int" enum="PathFollow.RotationMode">
+ </return>
+ <description>
+ Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode.
+ </description>
+ </method>
+ <method name="get_unit_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
+ </description>
+ </method>
+ <method name="get_v_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the Y displacement this node has from its parent [Path].
+ </description>
+ </method>
+ <method name="has_loop" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this node wraps its offsets around, or truncates them to the path ends.
+ </description>
+ </method>
+ <method name="set_cubic_interpolation">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ This method controls whether the position between two cached points is interpolated linearly, or cubicly.
+ </description>
+ </method>
+ <method name="set_h_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="h_offset" type="float">
+ </argument>
+ <description>
+ Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
+ A similar effect may be achieved moving the this node's descendants.
+ </description>
+ </method>
+ <method name="set_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop" type="bool">
+ </argument>
+ <description>
+ If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
+ </description>
+ </method>
+ <method name="set_rotation_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation_mode" type="int" enum="PathFollow.RotationMode">
+ </argument>
+ <description>
+ Allows or forbids rotation on one or more axes, per the constants below.
+ </description>
+ </method>
+ <method name="set_unit_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="unit_offset" type="float">
+ </argument>
+ <description>
+ Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ </description>
+ </method>
+ <method name="set_v_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="v_offset" type="float">
+ </argument>
+ <description>
+ Moves this node in the Y axis, for the same reasons of [method set_h_offset].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="ROTATION_NONE" value="0">
+ Forbids the PathFollow to rotate.
+ </constant>
+ <constant name="ROTATION_Y" value="1">
+ Allows the PathFollow to rotate in the Y axis only.
+ </constant>
+ <constant name="ROTATION_XY" value="2">
+ Allows the PathFollow to rotate in both the X, and Y axes.
+ </constant>
+ <constant name="ROTATION_XYZ" value="3">
+ Allows the PathFollow to rotate in any axis.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
new file mode 100644
index 0000000000..850b81c046
--- /dev/null
+++ b/doc/classes/PathFollow2D.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Point sampler for a [Path2D].
+ </brief_description>
+ <description>
+ This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_cubic_interpolation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
+ </description>
+ </method>
+ <method name="get_h_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the horizontal displacement this node has from its parent [Path2D].
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance along the path in pixels.
+ </description>
+ </method>
+ <method name="get_unit_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
+ </description>
+ </method>
+ <method name="get_v_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the vertical displacement this node has from its parent [Path2D].
+ </description>
+ </method>
+ <method name="has_loop" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this node wraps its offsets around, or truncates them to the path ends.
+ </description>
+ </method>
+ <method name="is_rotating" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this node rotates to follow the path.
+ </description>
+ </method>
+ <method name="set_cubic_interpolation">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ This method controls whether the position between two cached points is interpolated linearly, or cubicly.
+ </description>
+ </method>
+ <method name="set_h_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="h_offset" type="float">
+ </argument>
+ <description>
+ Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
+ A similar effect may be achieved moving this node's descendants.
+ </description>
+ </method>
+ <method name="set_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop" type="bool">
+ </argument>
+ <description>
+ If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <description>
+ Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path.
+ </description>
+ </method>
+ <method name="set_rotate">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ If set, this node rotates to follow the path, making its descendants rotate.
+ </description>
+ </method>
+ <method name="set_unit_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="unit_offset" type="float">
+ </argument>
+ <description>
+ Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ </description>
+ </method>
+ <method name="set_v_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="v_offset" type="float">
+ </argument>
+ <description>
+ Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
new file mode 100644
index 0000000000..71987ace9e
--- /dev/null
+++ b/doc/classes/Performance.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Performance" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_monitor" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="monitor" type="int" enum="Performance.Monitor">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="TIME_FPS" value="0">
+ </constant>
+ <constant name="TIME_PROCESS" value="1">
+ </constant>
+ <constant name="TIME_FIXED_PROCESS" value="2">
+ </constant>
+ <constant name="MEMORY_STATIC" value="3">
+ </constant>
+ <constant name="MEMORY_DYNAMIC" value="4">
+ </constant>
+ <constant name="MEMORY_STATIC_MAX" value="5">
+ </constant>
+ <constant name="MEMORY_DYNAMIC_MAX" value="6">
+ </constant>
+ <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7">
+ </constant>
+ <constant name="OBJECT_COUNT" value="8">
+ </constant>
+ <constant name="OBJECT_RESOURCE_COUNT" value="9">
+ </constant>
+ <constant name="OBJECT_NODE_COUNT" value="10">
+ </constant>
+ <constant name="RENDER_OBJECTS_IN_FRAME" value="11">
+ </constant>
+ <constant name="RENDER_VERTICES_IN_FRAME" value="12">
+ </constant>
+ <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="13">
+ </constant>
+ <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="14">
+ </constant>
+ <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="15">
+ </constant>
+ <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16">
+ </constant>
+ <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
+ </constant>
+ <constant name="RENDER_VIDEO_MEM_USED" value="17">
+ </constant>
+ <constant name="RENDER_TEXTURE_MEM_USED" value="18">
+ </constant>
+ <constant name="RENDER_VERTEX_MEM_USED" value="19">
+ </constant>
+ <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21">
+ </constant>
+ <constant name="PHYSICS_2D_COLLISION_PAIRS" value="22">
+ </constant>
+ <constant name="PHYSICS_2D_ISLAND_COUNT" value="23">
+ </constant>
+ <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24">
+ </constant>
+ <constant name="PHYSICS_3D_COLLISION_PAIRS" value="25">
+ </constant>
+ <constant name="PHYSICS_3D_ISLAND_COUNT" value="26">
+ </constant>
+ <constant name="MONITOR_MAX" value="27">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml
new file mode 100644
index 0000000000..9b6fe69b4a
--- /dev/null
+++ b/doc/classes/Physics2DDirectBodyState.xml
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Direct access object to a physics body in the [Physics2DServer].
+ </brief_description>
+ <description>
+ Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_angular_velocity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the angular velocity of the body.
+ </description>
+ </method>
+ <method name="get_contact_collider" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the [RID] of the collider.
+ </description>
+ </method>
+ <method name="get_contact_collider_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the object id of the collider.
+ </description>
+ </method>
+ <method name="get_contact_collider_object" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the collider object, this depends on how it was created (will return a scene node if such was used to create it).
+ </description>
+ </method>
+ <method name="get_contact_collider_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the contact position in the collider.
+ </description>
+ </method>
+ <method name="get_contact_collider_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the collider shape index.
+ </description>
+ </method>
+ <method name="get_contact_collider_shape_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ </description>
+ </method>
+ <method name="get_contact_collider_velocity_at_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the linear velocity vector at contact point of the collider.
+ </description>
+ </method>
+ <method name="get_contact_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts.
+ </description>
+ </method>
+ <method name="get_contact_local_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the local normal (of this body) of the contact point.
+ </description>
+ </method>
+ <method name="get_contact_local_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the local position (of this body) of the contact point.
+ </description>
+ </method>
+ <method name="get_contact_local_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ Return the local shape index of the collision.
+ </description>
+ </method>
+ <method name="get_inverse_inertia" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the inverse of the inertia of the body.
+ </description>
+ </method>
+ <method name="get_inverse_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the inverse of the mass of the body.
+ </description>
+ </method>
+ <method name="get_linear_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the current linear velocity of the body.
+ </description>
+ </method>
+ <method name="get_space_state">
+ <return type="Physics2DDirectSpaceState">
+ </return>
+ <description>
+ Return the current state of space, useful for queries.
+ </description>
+ </method>
+ <method name="get_step" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the timestep (delta) used for the simulation.
+ </description>
+ </method>
+ <method name="get_total_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the rate at which the body stops rotating, if there are not any other forces moving it.
+ </description>
+ </method>
+ <method name="get_total_gravity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the total gravity vector being currently applied to this body.
+ </description>
+ </method>
+ <method name="get_total_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the rate at which the body stops moving, if there are not any other forces moving it.
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Return the transform matrix of the body.
+ </description>
+ </method>
+ <method name="integrate_forces">
+ <return type="void">
+ </return>
+ <description>
+ Call the built-in force integration code.
+ </description>
+ </method>
+ <method name="is_sleeping" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if this body is currently sleeping (not active).
+ </description>
+ </method>
+ <method name="set_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="float">
+ </argument>
+ <description>
+ Change the angular velocity of the body.
+ </description>
+ </method>
+ <method name="set_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="Vector2">
+ </argument>
+ <description>
+ Change the linear velocity of the body.
+ </description>
+ </method>
+ <method name="set_sleep_state">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the sleeping state of the body, only affects character/rigid bodies.
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Change the transform matrix of the body.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml
new file mode 100644
index 0000000000..c2444d4795
--- /dev/null
+++ b/doc/classes/Physics2DDirectBodyStateSW.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Software implementation of [Physics2DDirectBodyState].
+ </brief_description>
+ <description>
+ Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
new file mode 100644
index 0000000000..9399227d27
--- /dev/null
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Direct access object to a space in the [Physics2DServer].
+ </brief_description>
+ <description>
+ Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="cast_motion">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ </argument>
+ <description>
+ Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide.
+ If the shape can not move, the array will be empty.
+ </description>
+ </method>
+ <method name="collide_shape">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ </argument>
+ <argument index="1" name="max_results" type="int" default="32">
+ </argument>
+ <description>
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
+ </description>
+ </method>
+ <method name="get_rest_info">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ </argument>
+ <description>
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
+ pointo: Place where the shapes intersect.
+ normal: Normal of the object at the point where the shapes intersect.
+ shape: Shape index within the object against which the shape intersected.
+ metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object against which the shape intersected.
+ collider: Object against which the shape intersected.
+ rid: [RID] of the object against which the shape intersected.
+ linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0).
+ If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ </description>
+ </method>
+ <method name="intersect_point">
+ <return type="Array">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <argument index="1" name="max_results" type="int" default="32">
+ </argument>
+ <argument index="2" name="exclude" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="collision_layer" type="int" default="2147483647">
+ </argument>
+ <argument index="4" name="type_mask" type="int" default="15">
+ </argument>
+ <description>
+ Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ shape: Shape index within the object the point is in.
+ metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object the point is in.
+ collider: Object the point is inside of.
+ rid: [RID] of the object the point is in.
+ Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ </description>
+ </method>
+ <method name="intersect_ray">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <argument index="1" name="to" type="Vector2">
+ </argument>
+ <argument index="2" name="exclude" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="collision_layer" type="int" default="2147483647">
+ </argument>
+ <argument index="4" name="type_mask" type="int" default="15">
+ </argument>
+ <description>
+ Intersect a ray in a given space. The returned object is a dictionary with the following fields:
+ position: Place where ray is stopped.
+ normal: Normal of the object at the point where the ray was stopped.
+ shape: Shape index within the object against which the ray was stopped.
+ metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object against which the ray was stopped.
+ collider: Object against which the ray was stopped.
+ rid: [RID] of the object against which the ray was stopped.
+ If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ </description>
+ </method>
+ <method name="intersect_shape">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="Physics2DShapeQueryParameters">
+ </argument>
+ <argument index="1" name="max_results" type="int" default="32">
+ </argument>
+ <description>
+ Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
+ shape: Shape index within the object the shape intersected.
+ metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ collider_id: Id of the object the shape intersected.
+ collider: Object the shape intersected.
+ rid: [RID] of the object the shape intersected.
+ The number of intersections can be limited with the second parameter, to reduce the processing time.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="TYPE_MASK_STATIC_BODY" value="1">
+ Check for collisions with static bodies.
+ </constant>
+ <constant name="TYPE_MASK_KINEMATIC_BODY" value="2">
+ Check for collisions with kinematic bodies.
+ </constant>
+ <constant name="TYPE_MASK_RIGID_BODY" value="4">
+ Check for collisions with rigid bodies.
+ </constant>
+ <constant name="TYPE_MASK_CHARACTER_BODY" value="8">
+ Check for collisions with rigid bodies in character mode.
+ </constant>
+ <constant name="TYPE_MASK_AREA" value="16">
+ Check for collisions with areas.
+ </constant>
+ <constant name="TYPE_MASK_COLLISION" value="15">
+ Check for collisions with any kind of bodies (but not areas).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
new file mode 100644
index 0000000000..ab63089691
--- /dev/null
+++ b/doc/classes/Physics2DServer.xml
@@ -0,0 +1,1121 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Physics 2D Server.
+ </brief_description>
+ <description>
+ Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="area_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape" type="RID">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ </argument>
+ <description>
+ Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
+ </description>
+ </method>
+ <method name="area_attach_object_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ Assign the area to a descendant of [Object], so it can exist in the node tree.
+ </description>
+ </method>
+ <method name="area_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later.
+ </description>
+ </method>
+ <method name="area_create">
+ <return type="RID">
+ </return>
+ <description>
+ Create an [Area2D].
+ </description>
+ </method>
+ <method name="area_get_object_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Get the instance ID of the object the area is assigned to.
+ </description>
+ </method>
+ <method name="area_get_param" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
+ </argument>
+ <description>
+ Return an area parameter value.
+ </description>
+ </method>
+ <method name="area_get_shape" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Return the [RID] of the nth shape of an area.
+ </description>
+ </method>
+ <method name="area_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Return the number of shapes assigned to an area.
+ </description>
+ </method>
+ <method name="area_get_shape_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Return the transform matrix of a shape within an area.
+ </description>
+ </method>
+ <method name="area_get_space" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Return the space assigned to the area.
+ </description>
+ </method>
+ <method name="area_get_space_override_mode" qualifiers="const">
+ <return type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Return the space override mode for the area.
+ </description>
+ </method>
+ <method name="area_get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ Return the transform matrix for an area.
+ </description>
+ </method>
+ <method name="area_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Remove a shape from an area. It does not delete the shape, so it can be reassigned later.
+ </description>
+ </method>
+ <method name="area_set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ Assign the area to one or many physics layers.
+ </description>
+ </method>
+ <method name="area_set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ Set which physics layers the area will monitor.
+ </description>
+ </method>
+ <method name="area_set_monitor_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <description>
+ Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
+ 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area.
+ 2: [RID] of the object that entered/exited the area.
+ 3: Instance ID of the object that entered/exited the area.
+ 4: The shape index of the object that entered/exited the area.
+ 5: The shape index of the area where the object entered/exited.
+ </description>
+ </method>
+ <method name="area_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants.
+ </description>
+ </method>
+ <method name="area_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="shape" type="RID">
+ </argument>
+ <description>
+ Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID].
+ </description>
+ </method>
+ <method name="area_set_shape_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_shape_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Set the transform matrix for an area shape.
+ </description>
+ </method>
+ <method name="area_set_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="space" type="RID">
+ </argument>
+ <description>
+ Assign a space to the area.
+ </description>
+ </method>
+ <method name="area_set_space_override_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
+ </argument>
+ <description>
+ Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*.
+ </description>
+ </method>
+ <method name="area_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Set the transform matrix for an area.
+ </description>
+ </method>
+ <method name="body_add_collision_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="excepted_body" type="RID">
+ </argument>
+ <description>
+ Add a body to the list of bodies exempt from collisions.
+ </description>
+ </method>
+ <method name="body_add_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="Vector2">
+ </argument>
+ <argument index="2" name="force" type="Vector2">
+ </argument>
+ <description>
+ Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
+ </description>
+ </method>
+ <method name="body_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape" type="RID">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ </argument>
+ <description>
+ Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
+ </description>
+ </method>
+ <method name="body_apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="impulse" type="Vector2">
+ </argument>
+ <description>
+ Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
+ <method name="body_attach_object_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ Assign the area to a descendant of [Object], so it can exist in the node tree.
+ </description>
+ </method>
+ <method name="body_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Remove all shapes from a body.
+ </description>
+ </method>
+ <method name="body_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Physics2DServer.BodyMode" default="2">
+ </argument>
+ <argument index="1" name="init_sleeping" type="bool" default="false">
+ </argument>
+ <description>
+ Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
+ </description>
+ </method>
+ <method name="body_get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the physics layer or layers a body belongs to.
+ </description>
+ </method>
+ <method name="body_get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the physics layer or layers a body can collide with.
+ </description>
+ </method>
+ <method name="body_get_continuous_collision_detection_mode" qualifiers="const">
+ <return type="int" enum="Physics2DServer.CCDMode">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the continuous collision detection mode.
+ </description>
+ </method>
+ <method name="body_get_max_contacts_reported" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
+ </description>
+ </method>
+ <method name="body_get_mode" qualifiers="const">
+ <return type="int" enum="Physics2DServer.BodyMode">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the body mode.
+ </description>
+ </method>
+ <method name="body_get_object_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Get the instance ID of the object the area is assigned to.
+ </description>
+ </method>
+ <method name="body_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
+ </argument>
+ <description>
+ Return the value of a body parameter.
+ </description>
+ </method>
+ <method name="body_get_shape" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Return the [RID] of the nth shape of a body.
+ </description>
+ </method>
+ <method name="body_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the number of shapes assigned to a body.
+ </description>
+ </method>
+ <method name="body_get_shape_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Return the metadata of a shape of a body.
+ </description>
+ </method>
+ <method name="body_get_shape_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Return the transform matrix of a body shape.
+ </description>
+ </method>
+ <method name="body_get_space" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return the [RID] of the space assigned to a body.
+ </description>
+ </method>
+ <method name="body_get_state" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
+ </argument>
+ <description>
+ Return a body state.
+ </description>
+ </method>
+ <method name="body_is_omitting_force_integration" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
+ </description>
+ </method>
+ <method name="body_remove_collision_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="excepted_body" type="RID">
+ </argument>
+ <description>
+ Remove a body from the list of bodies exempt from collisions.
+ </description>
+ </method>
+ <method name="body_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ Remove a shape from a body. The shape is not deleted, so it can be reused afterwards.
+ </description>
+ </method>
+ <method name="body_set_axis_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="axis_velocity" type="Vector2">
+ </argument>
+ <description>
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ </description>
+ </method>
+ <method name="body_set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ Set the physics layer or layers a body belongs to.
+ </description>
+ </method>
+ <method name="body_set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ Set the physics layer or layers a body can collide with.
+ </description>
+ </method>
+ <method name="body_set_continuous_collision_detection_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.CCDMode">
+ </argument>
+ <description>
+ Set the continuous collision detection mode from any of the CCD_MODE_* constants.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
+ </description>
+ </method>
+ <method name="body_set_force_integration_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <argument index="3" name="userdata" type="Variant" default="null">
+ </argument>
+ <description>
+ Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]).
+ </description>
+ </method>
+ <method name="body_set_max_contacts_reported">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="amount" type="int">
+ </argument>
+ <description>
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ </description>
+ </method>
+ <method name="body_set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.BodyMode">
+ </argument>
+ <description>
+ Set the body mode, from one of the constants BODY_MODE*.
+ </description>
+ </method>
+ <method name="body_set_omit_force_integration">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
+ </description>
+ </method>
+ <method name="body_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Set a body parameter (see BODY_PARAM* constants).
+ </description>
+ </method>
+ <method name="body_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="shape" type="RID">
+ </argument>
+ <description>
+ Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID].
+ </description>
+ </method>
+ <method name="body_set_shape_as_one_way_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_shape_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_shape_metadata">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="metadata" type="Variant">
+ </argument>
+ <description>
+ Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries.
+ </description>
+ </method>
+ <method name="body_set_shape_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Set the transform matrix for a body shape.
+ </description>
+ </method>
+ <method name="body_set_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="space" type="RID">
+ </argument>
+ <description>
+ Assign a space to the body (see [method create_space]).
+ </description>
+ </method>
+ <method name="body_set_state">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Set a body state (see BODY_STATE* constants).
+ </description>
+ </method>
+ <method name="body_test_motion">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="from" type="Transform2D">
+ </argument>
+ <argument index="2" name="motion" type="Vector2">
+ </argument>
+ <argument index="3" name="margin" type="float" default="0.08">
+ </argument>
+ <argument index="4" name="result" type="Physics2DTestMotionResult" default="null">
+ </argument>
+ <description>
+ Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
+ </description>
+ </method>
+ <method name="damped_spring_joint_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="anchor_a" type="Vector2">
+ </argument>
+ <argument index="1" name="anchor_b" type="Vector2">
+ </argument>
+ <argument index="2" name="body_a" type="RID">
+ </argument>
+ <argument index="3" name="body_b" type="RID">
+ </argument>
+ <description>
+ Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
+ </description>
+ </method>
+ <method name="damped_string_joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
+ </argument>
+ <description>
+ Return the value of a damped spring joint parameter.
+ </description>
+ </method>
+ <method name="damped_string_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants.
+ </description>
+ </method>
+ <method name="free_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console.
+ </description>
+ </method>
+ <method name="get_process_info">
+ <return type="int">
+ </return>
+ <argument index="0" name="process_info" type="int" enum="Physics2DServer.ProcessInfo">
+ </argument>
+ <description>
+ Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants.
+ </description>
+ </method>
+ <method name="groove_joint_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="groove1_a" type="Vector2">
+ </argument>
+ <argument index="1" name="groove2_a" type="Vector2">
+ </argument>
+ <argument index="2" name="anchor_b" type="Vector2">
+ </argument>
+ <argument index="3" name="body_a" type="RID">
+ </argument>
+ <argument index="4" name="body_b" type="RID">
+ </argument>
+ <description>
+ Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself.
+ </description>
+ </method>
+ <method name="joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
+ </argument>
+ <description>
+ Return the value of a joint parameter.
+ </description>
+ </method>
+ <method name="joint_get_type" qualifiers="const">
+ <return type="int" enum="Physics2DServer.JointType">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <description>
+ Return the type of a joint (see JOINT_* constants).
+ </description>
+ </method>
+ <method name="joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants.
+ </description>
+ </method>
+ <method name="pin_joint_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="anchor" type="Vector2">
+ </argument>
+ <argument index="1" name="body_a" type="RID">
+ </argument>
+ <argument index="2" name="body_b" type="RID">
+ </argument>
+ <description>
+ Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ Activate or deactivate the 2D physics engine.
+ </description>
+ </method>
+ <method name="shape_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="type" type="int" enum="Physics2DServer.ShapeType">
+ </argument>
+ <description>
+ Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
+ </description>
+ </method>
+ <method name="shape_get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ Return the shape data.
+ </description>
+ </method>
+ <method name="shape_get_type" qualifiers="const">
+ <return type="int" enum="Physics2DServer.ShapeType">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ Return the type of shape (see SHAPE_* constants).
+ </description>
+ </method>
+ <method name="shape_set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
+ </description>
+ </method>
+ <method name="space_create">
+ <return type="RID">
+ </return>
+ <description>
+ Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space].
+ </description>
+ </method>
+ <method name="space_get_direct_state">
+ <return type="Physics2DDirectSpaceState">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <description>
+ Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries.
+ </description>
+ </method>
+ <method name="space_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
+ </argument>
+ <description>
+ Return the value of a space parameter.
+ </description>
+ </method>
+ <method name="space_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <description>
+ Return whether the space is active.
+ </description>
+ </method>
+ <method name="space_set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="active" type="bool">
+ </argument>
+ <description>
+ Mark a space as active. It will not have an effect, unless it is assigned to an area or body.
+ </description>
+ </method>
+ <method name="space_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0">
+ Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
+ </constant>
+ <constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1">
+ Constant to set/get the maximum distance a shape can be from another before they are considered separated.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2">
+ Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5">
+ Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
+ </constant>
+ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6">
+ Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
+ </constant>
+ <constant name="SHAPE_LINE" value="0">
+ This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks.
+ </constant>
+ <constant name="SHAPE_SEGMENT" value="2">
+ This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections.
+ </constant>
+ <constant name="SHAPE_CIRCLE" value="3">
+ This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks.
+ </constant>
+ <constant name="SHAPE_RECTANGLE" value="4">
+ This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks.
+ </constant>
+ <constant name="SHAPE_CAPSULE" value="5">
+ This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks.
+ </constant>
+ <constant name="SHAPE_CONVEX_POLYGON" value="6">
+ This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form, in fact, a convex polygon.
+ </constant>
+ <constant name="SHAPE_CONCAVE_POLYGON" value="7">
+ This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks.
+ </constant>
+ <constant name="SHAPE_CUSTOM" value="8">
+ This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="0">
+ Constant to set/get gravity strength in an area.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1">
+ Constant to set/get gravity vector/center in an area.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2">
+ Constant to set/get whether the gravity vector of an area is a direction, or a center point.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3">
+ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4">
+ This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE.
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="5">
+ Constant to set/get the linear dampening factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="6">
+ Constant to set/get the angular dampening factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_PRIORITY" value="7">
+ Constant to set/get the priority (order of processing) of an area.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0">
+ This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1">
+ This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_REPLACE" value="3">
+ This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ </constant>
+ <constant name="BODY_MODE_STATIC" value="0">
+ Constant for static bodies.
+ </constant>
+ <constant name="BODY_MODE_KINEMATIC" value="1">
+ Constant for kinematic bodies.
+ </constant>
+ <constant name="BODY_MODE_RIGID" value="2">
+ Constant for rigid bodies.
+ </constant>
+ <constant name="BODY_MODE_CHARACTER" value="3">
+ Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
+ </constant>
+ <constant name="BODY_PARAM_BOUNCE" value="0">
+ Constant to set/get a body's bounce factor.
+ </constant>
+ <constant name="BODY_PARAM_FRICTION" value="1">
+ Constant to set/get a body's friction.
+ </constant>
+ <constant name="BODY_PARAM_MASS" value="2">
+ Constant to set/get a body's mass.
+ </constant>
+ <constant name="BODY_PARAM_INERTIA" value="3">
+ Constant to set/get a body's inertia.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="4">
+ Constant to set/get a body's gravity multiplier.
+ </constant>
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="5">
+ Constant to set/get a body's linear dampening factor.
+ </constant>
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="6">
+ Constant to set/get a body's angular dampening factor.
+ </constant>
+ <constant name="BODY_PARAM_MAX" value="7">
+ This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0.
+ </constant>
+ <constant name="BODY_STATE_TRANSFORM" value="0">
+ Constant to set/get the current transform matrix of the body.
+ </constant>
+ <constant name="BODY_STATE_LINEAR_VELOCITY" value="1">
+ Constant to set/get the current linear velocity of the body.
+ </constant>
+ <constant name="BODY_STATE_ANGULAR_VELOCITY" value="2">
+ Constant to set/get the current angular velocity of the body.
+ </constant>
+ <constant name="BODY_STATE_SLEEPING" value="3">
+ Constant to sleep/wake up a body, or to get whether it is sleeping.
+ </constant>
+ <constant name="BODY_STATE_CAN_SLEEP" value="4">
+ Constant to set/get whether the body can sleep.
+ </constant>
+ <constant name="JOINT_PIN" value="0">
+ Constant to create pin joints.
+ </constant>
+ <constant name="JOINT_GROOVE" value="1">
+ Constant to create groove joints.
+ </constant>
+ <constant name="JOINT_DAMPED_SPRING" value="2">
+ Constant to create damped spring joints.
+ </constant>
+ <constant name="DAMPED_STRING_REST_LENGTH" value="0">
+ Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
+ </constant>
+ <constant name="DAMPED_STRING_STIFFNESS" value="1">
+ Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
+ </constant>
+ <constant name="DAMPED_STRING_DAMPING" value="2">
+ Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
+ </constant>
+ <constant name="CCD_MODE_DISABLED" value="0">
+ Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
+ </constant>
+ <constant name="CCD_MODE_CAST_RAY" value="1">
+ Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise.
+ </constant>
+ <constant name="CCD_MODE_CAST_SHAPE" value="2">
+ Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise.
+ </constant>
+ <constant name="AREA_BODY_ADDED" value="0">
+ The value of the first parameter and area callback function receives, when an object enters one of its shapes.
+ </constant>
+ <constant name="AREA_BODY_REMOVED" value="1">
+ The value of the first parameter and area callback function receives, when an object exits one of its shapes.
+ </constant>
+ <constant name="INFO_ACTIVE_OBJECTS" value="0">
+ Constant to get the number of objects that are not sleeping.
+ </constant>
+ <constant name="INFO_COLLISION_PAIRS" value="1">
+ Constant to get the number of possible collisions.
+ </constant>
+ <constant name="INFO_ISLAND_COUNT" value="2">
+ Constant to get the number of space regions where a collision could occur.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml
new file mode 100644
index 0000000000..a8645c0b96
--- /dev/null
+++ b/doc/classes/Physics2DServerSW.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Software implementation of [Physics2DServer].
+ </brief_description>
+ <description>
+ Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml
new file mode 100644
index 0000000000..78d12e0b73
--- /dev/null
+++ b/doc/classes/Physics2DShapeQueryParameters.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Parameters to be sent to a 2D shape physics query.
+ </brief_description>
+ <description>
+ This class contains the shape and other parameters for intersection/collision queries.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layer the shape belongs to.
+ </description>
+ </method>
+ <method name="get_exclude" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return the list of objects, or object [RID]\ s, that will be excluded from collisions.
+ </description>
+ </method>
+ <method name="get_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the collision margin for the shape.
+ </description>
+ </method>
+ <method name="get_motion" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the current movement speed of the shape.
+ </description>
+ </method>
+ <method name="get_object_type_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the type of object the shape belongs to.
+ </description>
+ </method>
+ <method name="get_shape_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return the [RID] of the shape queried.
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Return the transform matrix of the shape queried.
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_layer" type="int">
+ </argument>
+ <description>
+ Set the physics layer the shape belongs to.
+ </description>
+ </method>
+ <method name="set_exclude">
+ <return type="void">
+ </return>
+ <argument index="0" name="exclude" type="Array">
+ </argument>
+ <description>
+ Set the list of objects, or object [RID]\ s, that will be excluded from collisions.
+ </description>
+ </method>
+ <method name="set_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="float">
+ </argument>
+ <description>
+ Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
+ </description>
+ </method>
+ <method name="set_motion">
+ <return type="void">
+ </return>
+ <argument index="0" name="motion" type="Vector2">
+ </argument>
+ <description>
+ Set the current movement speed of the shape.
+ </description>
+ </method>
+ <method name="set_object_type_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="object_type_mask" type="int">
+ </argument>
+ <description>
+ Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).
+ </description>
+ </method>
+ <method name="set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Resource">
+ </argument>
+ <description>
+ Set the [Shape2D] that will be used for collision/intersection queries.
+ </description>
+ </method>
+ <method name="set_shape_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ Set the [RID] of the shape to be used in queries.
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml
new file mode 100644
index 0000000000..9786a6aa75
--- /dev/null
+++ b/doc/classes/Physics2DShapeQueryResult.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_result_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml
new file mode 100644
index 0000000000..a71d58faa7
--- /dev/null
+++ b/doc/classes/Physics2DTestMotionResult.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_motion" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_motion_remainder" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
new file mode 100644
index 0000000000..e75fbb8e2d
--- /dev/null
+++ b/doc/classes/PhysicsBody.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all objects affected by physics in 3D space.
+ </brief_description>
+ <description>
+ PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_collision_exception_with">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Adds a body to the list of bodies that this body can't collide with.
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_layer_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_collision_exception_with">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Removes a body from the list of bodies that this body can't collide with.
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this area can scan for collisions.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
new file mode 100644
index 0000000000..748506baa9
--- /dev/null
+++ b/doc/classes/PhysicsBody2D.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all objects affected by physics in 2D space.
+ </brief_description>
+ <description>
+ PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_collision_exception_with">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Adds a body to the list of bodies that this body can't collide with.
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layer this area is in.
+ </description>
+ </method>
+ <method name="get_collision_layer_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the collision mask.
+ </description>
+ </method>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the physics layers this area can scan for collisions.
+ </description>
+ </method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ Return an individual bit on the collision mask.
+ </description>
+ </method>
+ <method name="remove_collision_exception_with">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
+ </argument>
+ <description>
+ Removes a body from the list of bodies that this body can't collide with.
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ </description>
+ </method>
+ <method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ Set the physics layers this area can scan for collisions.
+ </description>
+ </method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this area can scan for collisions.
+ </member>
+ <member name="layers" type="int" setter="_set_layers" getter="_get_layers">
+ Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layers and collision_mask when modified.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
new file mode 100644
index 0000000000..de51d0e958
--- /dev/null
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="Vector3">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <argument index="1" name="j" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="apply_torqe_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="j" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_angular_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_center_of_mass" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider_object" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider_pos" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_collider_velocity_at_pos" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_local_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_local_pos" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_contact_local_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="contact_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_inverse_inertia" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_inverse_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_linear_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_principal_inertia_axes" qualifiers="const">
+ <return type="Basis">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_space_state">
+ <return type="PhysicsDirectSpaceState">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_step" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_total_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_total_gravity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_total_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="integrate_forces">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_sleeping" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="velocity" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sleep_state">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsDirectBodyStateSW.xml b/doc/classes/PhysicsDirectBodyStateSW.xml
new file mode 100644
index 0000000000..6d283f307e
--- /dev/null
+++ b/doc/classes/PhysicsDirectBodyStateSW.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsDirectBodyStateSW" inherits="PhysicsDirectBodyState" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
new file mode 100644
index 0000000000..1e4354fa7e
--- /dev/null
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="cast_motion">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ </argument>
+ <argument index="1" name="motion" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="collide_shape">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ </argument>
+ <argument index="1" name="max_results" type="int" default="32">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_rest_info">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="intersect_ray">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="exclude" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="collision_layer" type="int" default="2147483647">
+ </argument>
+ <argument index="4" name="type_mask" type="int" default="15">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="intersect_shape">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shape" type="PhysicsShapeQueryParameters">
+ </argument>
+ <argument index="1" name="max_results" type="int" default="32">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="TYPE_MASK_STATIC_BODY" value="1">
+ </constant>
+ <constant name="TYPE_MASK_KINEMATIC_BODY" value="2">
+ </constant>
+ <constant name="TYPE_MASK_RIGID_BODY" value="4">
+ </constant>
+ <constant name="TYPE_MASK_CHARACTER_BODY" value="8">
+ </constant>
+ <constant name="TYPE_MASK_AREA" value="16">
+ </constant>
+ <constant name="TYPE_MASK_COLLISION" value="15">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
new file mode 100644
index 0000000000..0076625ebd
--- /dev/null
+++ b/doc/classes/PhysicsServer.xml
@@ -0,0 +1,1276 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="area_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape" type="RID">
+ </argument>
+ <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_attach_object_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_object_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_param" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_shape" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_shape_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_space" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_space_override_mode" qualifiers="const">
+ <return type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_is_ray_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_monitor_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_ray_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="shape" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_shape_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="space" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_space_override_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="area_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="area" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_add_collision_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="excepted_body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape" type="RID">
+ </argument>
+ <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector3">
+ </argument>
+ <argument index="2" name="impulse" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_apply_torque_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="impulse" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_attach_object_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_clear_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="mode" type="int" enum="PhysicsServer.BodyMode" default="2">
+ </argument>
+ <argument index="1" name="init_sleeping" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_axis_lock" qualifiers="const">
+ <return type="int" enum="PhysicsServer.BodyAxisLock">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_max_contacts_reported" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_mode" qualifiers="const">
+ <return type="int" enum="PhysicsServer.BodyMode">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_object_instance_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_shape" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_shape_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_space" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_get_state" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_is_continuous_collision_detection_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_is_omitting_force_integration" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_is_ray_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_remove_collision_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="excepted_body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_remove_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_axis_lock">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="axis" type="int" enum="PhysicsServer.BodyAxisLock">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_axis_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="axis_velocity" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_enable_continuous_collision_detection">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_force_integration_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="receiver" type="Object">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <argument index="3" name="userdata" type="Variant" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_max_contacts_reported">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_omit_force_integration">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_ray_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="shape" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_shape_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="shape_idx" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="space" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="body_set_state">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cone_twist_joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cone_twist_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="free_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="generic_6dof_joint_get_flag">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
+ </argument>
+ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="generic_6dof_joint_get_param">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
+ </argument>
+ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="generic_6dof_joint_set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
+ </argument>
+ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
+ </argument>
+ <argument index="3" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="generic_6dof_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
+ </argument>
+ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
+ </argument>
+ <argument index="3" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_process_info">
+ <return type="int">
+ </return>
+ <argument index="0" name="process_info" type="int" enum="PhysicsServer.ProcessInfo">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hinge_joint_get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hinge_joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hinge_joint_set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
+ </argument>
+ <argument index="2" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hinge_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_create_cone_twist">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body_A" type="RID">
+ </argument>
+ <argument index="1" name="local_ref_A" type="Transform">
+ </argument>
+ <argument index="2" name="body_B" type="RID">
+ </argument>
+ <argument index="3" name="local_ref_B" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_create_generic_6dof">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body_A" type="RID">
+ </argument>
+ <argument index="1" name="local_ref_A" type="Transform">
+ </argument>
+ <argument index="2" name="body_B" type="RID">
+ </argument>
+ <argument index="3" name="local_ref_B" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_create_hinge">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body_A" type="RID">
+ </argument>
+ <argument index="1" name="hinge_A" type="Transform">
+ </argument>
+ <argument index="2" name="body_B" type="RID">
+ </argument>
+ <argument index="3" name="hinge_B" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_create_pin">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body_A" type="RID">
+ </argument>
+ <argument index="1" name="local_A" type="Vector3">
+ </argument>
+ <argument index="2" name="body_B" type="RID">
+ </argument>
+ <argument index="3" name="local_B" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_create_slider">
+ <return type="RID">
+ </return>
+ <argument index="0" name="body_A" type="RID">
+ </argument>
+ <argument index="1" name="local_ref_A" type="Transform">
+ </argument>
+ <argument index="2" name="body_B" type="RID">
+ </argument>
+ <argument index="3" name="local_ref_B" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_get_solver_priority" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_get_type" qualifiers="const">
+ <return type="int" enum="PhysicsServer.JointType">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="joint_set_solver_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="priority" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_get_local_a" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_get_local_b" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_set_local_a">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="local_A" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_set_local_b">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="local_B" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pin_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_create">
+ <return type="RID">
+ </return>
+ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_get_type" qualifiers="const">
+ <return type="int" enum="PhysicsServer.ShapeType">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="slider_joint_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="slider_joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="space_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="space_get_direct_state">
+ <return type="PhysicsDirectSpaceState">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="space_get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="space_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="space_set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="active" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="space_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="space" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="JOINT_PIN" value="0">
+ </constant>
+ <constant name="JOINT_HINGE" value="1">
+ </constant>
+ <constant name="JOINT_SLIDER" value="2">
+ </constant>
+ <constant name="JOINT_CONE_TWIST" value="3">
+ </constant>
+ <constant name="JOINT_6DOF" value="4">
+ </constant>
+ <constant name="PIN_JOINT_BIAS" value="0">
+ </constant>
+ <constant name="PIN_JOINT_DAMPING" value="1">
+ </constant>
+ <constant name="PIN_JOINT_IMPULSE_CLAMP" value="2">
+ </constant>
+ <constant name="HINGE_JOINT_BIAS" value="0">
+ </constant>
+ <constant name="HINGE_JOINT_LIMIT_UPPER" value="1">
+ </constant>
+ <constant name="HINGE_JOINT_LIMIT_LOWER" value="2">
+ </constant>
+ <constant name="HINGE_JOINT_LIMIT_BIAS" value="3">
+ </constant>
+ <constant name="HINGE_JOINT_LIMIT_SOFTNESS" value="4">
+ </constant>
+ <constant name="HINGE_JOINT_LIMIT_RELAXATION" value="5">
+ </constant>
+ <constant name="HINGE_JOINT_MOTOR_TARGET_VELOCITY" value="6">
+ </constant>
+ <constant name="HINGE_JOINT_MOTOR_MAX_IMPULSE" value="7">
+ </constant>
+ <constant name="HINGE_JOINT_FLAG_USE_LIMIT" value="0">
+ </constant>
+ <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_LIMIT_LOWER" value="1">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS" value="2">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION" value="3">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_LIMIT_DAMPING" value="4">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_MOTION_SOFTNESS" value="5">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_MOTION_RESTITUTION" value="6">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_MOTION_DAMPING" value="7">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS" value="8">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION" value="9">
+ </constant>
+ <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING" value="10">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_LIMIT_UPPER" value="11">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_LIMIT_LOWER" value="12">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS" value="13">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION" value="14">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_LIMIT_DAMPING" value="15">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS" value="16">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION" value="17">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_MOTION_DAMPING" value="18">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS" value="19">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION" value="20">
+ </constant>
+ <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING" value="21">
+ </constant>
+ <constant name="SLIDER_JOINT_MAX" value="22">
+ </constant>
+ <constant name="CONE_TWIST_JOINT_SWING_SPAN" value="0">
+ </constant>
+ <constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1">
+ </constant>
+ <constant name="CONE_TWIST_JOINT_BIAS" value="2">
+ </constant>
+ <constant name="CONE_TWIST_JOINT_SOFTNESS" value="3">
+ </constant>
+ <constant name="CONE_TWIST_JOINT_RELAXATION" value="4">
+ </constant>
+ <constant name="G6DOF_JOINT_LINEAR_LOWER_LIMIT" value="0">
+ </constant>
+ <constant name="G6DOF_JOINT_LINEAR_UPPER_LIMIT" value="1">
+ </constant>
+ <constant name="G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS" value="2">
+ </constant>
+ <constant name="G6DOF_JOINT_LINEAR_RESTITUTION" value="3">
+ </constant>
+ <constant name="G6DOF_JOINT_LINEAR_DAMPING" value="4">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_LOWER_LIMIT" value="5">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_UPPER_LIMIT" value="6">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS" value="7">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_DAMPING" value="8">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_RESTITUTION" value="9">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_FORCE_LIMIT" value="10">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_ERP" value="11">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY" value="12">
+ </constant>
+ <constant name="G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT" value="13">
+ </constant>
+ <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0">
+ </constant>
+ <constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1">
+ </constant>
+ <constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="2">
+ </constant>
+ <constant name="SHAPE_PLANE" value="0">
+ </constant>
+ <constant name="SHAPE_RAY" value="1">
+ </constant>
+ <constant name="SHAPE_SPHERE" value="2">
+ </constant>
+ <constant name="SHAPE_BOX" value="3">
+ </constant>
+ <constant name="SHAPE_CAPSULE" value="4">
+ </constant>
+ <constant name="SHAPE_CONVEX_POLYGON" value="5">
+ </constant>
+ <constant name="SHAPE_CONCAVE_POLYGON" value="6">
+ </constant>
+ <constant name="SHAPE_HEIGHTMAP" value="7">
+ </constant>
+ <constant name="SHAPE_CUSTOM" value="8">
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="0">
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1">
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2">
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3">
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4">
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="5">
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="6">
+ </constant>
+ <constant name="AREA_PARAM_PRIORITY" value="7">
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0">
+ This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1">
+ This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_REPLACE" value="3">
+ This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ </constant>
+ <constant name="AREA_SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ </constant>
+ <constant name="BODY_MODE_STATIC" value="0">
+ </constant>
+ <constant name="BODY_MODE_KINEMATIC" value="1">
+ </constant>
+ <constant name="BODY_MODE_RIGID" value="2">
+ </constant>
+ <constant name="BODY_MODE_CHARACTER" value="3">
+ </constant>
+ <constant name="BODY_PARAM_BOUNCE" value="0">
+ </constant>
+ <constant name="BODY_PARAM_FRICTION" value="1">
+ </constant>
+ <constant name="BODY_PARAM_MASS" value="2">
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="3">
+ </constant>
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="5">
+ </constant>
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="4">
+ </constant>
+ <constant name="BODY_PARAM_MAX" value="6">
+ </constant>
+ <constant name="BODY_STATE_TRANSFORM" value="0">
+ </constant>
+ <constant name="BODY_STATE_LINEAR_VELOCITY" value="1">
+ </constant>
+ <constant name="BODY_STATE_ANGULAR_VELOCITY" value="2">
+ </constant>
+ <constant name="BODY_STATE_SLEEPING" value="3">
+ </constant>
+ <constant name="BODY_STATE_CAN_SLEEP" value="4">
+ </constant>
+ <constant name="AREA_BODY_ADDED" value="0">
+ </constant>
+ <constant name="AREA_BODY_REMOVED" value="1">
+ </constant>
+ <constant name="INFO_ACTIVE_OBJECTS" value="0">
+ </constant>
+ <constant name="INFO_COLLISION_PAIRS" value="1">
+ </constant>
+ <constant name="INFO_ISLAND_COUNT" value="2">
+ </constant>
+ <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0">
+ </constant>
+ <constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO" value="6">
+ </constant>
+ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_DISABLED" value="0">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_X" value="1">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_Y" value="2">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_Z" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsServerSW.xml b/doc/classes/PhysicsServerSW.xml
new file mode 100644
index 0000000000..7bffc23258
--- /dev/null
+++ b/doc/classes/PhysicsServerSW.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsServerSW" inherits="PhysicsServer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml
new file mode 100644
index 0000000000..f2e8b1986a
--- /dev/null
+++ b/doc/classes/PhysicsShapeQueryParameters.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_exclude" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_object_type_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shape_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_exclude">
+ <return type="void">
+ </return>
+ <argument index="0" name="exclude" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_object_type_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="object_type_mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml
new file mode 100644
index 0000000000..4c4a283688
--- /dev/null
+++ b/doc/classes/PhysicsShapeQueryResult.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Result of a shape query in Physics2DServer.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_result_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_object_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_result_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml
new file mode 100644
index 0000000000..22aa35a0a4
--- /dev/null
+++ b/doc/classes/PinJoint.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PinJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="PinJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="PinJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="params/bias" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="params/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="params/impulse_clamp" type="float" setter="set_param" getter="get_param">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_BIAS" value="0">
+ </constant>
+ <constant name="PARAM_DAMPING" value="1">
+ </constant>
+ <constant name="PARAM_IMPULSE_CLAMP" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
new file mode 100644
index 0000000000..826a1684a4
--- /dev/null
+++ b/doc/classes/PinJoint2D.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Pin Joint for 2D Shapes.
+ </brief_description>
+ <description>
+ Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_softness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_softness">
+ <return type="void">
+ </return>
+ <argument index="0" name="softness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="softness" type="float" setter="set_softness" getter="get_softness">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
new file mode 100644
index 0000000000..5c4eb984db
--- /dev/null
+++ b/doc/classes/Plane.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Plane" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Plane in hessian form.
+ </brief_description>
+ <description>
+ Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Plane">
+ <return type="Plane">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <argument index="2" name="c" type="float">
+ </argument>
+ <argument index="3" name="d" type="float">
+ </argument>
+ <description>
+ Creates a plane from the three parameters "a", "b", "c" and "d".
+ </description>
+ </method>
+ <method name="Plane">
+ <return type="Plane">
+ </return>
+ <argument index="0" name="v1" type="Vector3">
+ </argument>
+ <argument index="1" name="v2" type="Vector3">
+ </argument>
+ <argument index="2" name="v3" type="Vector3">
+ </argument>
+ <description>
+ Creates a plane from three points.
+ </description>
+ </method>
+ <method name="Plane">
+ <return type="Plane">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <argument index="1" name="d" type="float">
+ </argument>
+ <description>
+ Creates a plane from the normal and the plane's distance to the origin.
+ </description>
+ </method>
+ <method name="center">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the center of the plane.
+ </description>
+ </method>
+ <method name="distance_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <description>
+ Returns the shortest distance from the plane to the position "point".
+ </description>
+ </method>
+ <method name="get_any_point">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns a point on the plane.
+ </description>
+ </method>
+ <method name="has_point">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <argument index="1" name="epsilon" type="float" default="0.00001">
+ </argument>
+ <description>
+ Returns true if "point" is inside the plane (by a very minimum threshold).
+ </description>
+ </method>
+ <method name="intersect_3">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="b" type="Plane">
+ </argument>
+ <argument index="1" name="c" type="Plane">
+ </argument>
+ <description>
+ Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned.
+ </description>
+ </method>
+ <method name="intersects_ray">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="dir" type="Vector3">
+ </argument>
+ <description>
+ Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned.
+ </description>
+ </method>
+ <method name="intersects_segment">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="begin" type="Vector3">
+ </argument>
+ <argument index="1" name="end" type="Vector3">
+ </argument>
+ <description>
+ Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned.
+ </description>
+ </method>
+ <method name="is_point_over">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <description>
+ Returns true if "point" is located above the plane.
+ </description>
+ </method>
+ <method name="normalized">
+ <return type="Plane">
+ </return>
+ <description>
+ Returns a copy of the plane, normalized.
+ </description>
+ </method>
+ <method name="project">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <description>
+ Returns the orthogonal projection of point "p" into a point in the plane.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="d" type="float" setter="" getter="">
+ </member>
+ <member name="normal" type="Vector3" setter="" getter="">
+ </member>
+ <member name="x" type="float" setter="" getter="">
+ </member>
+ <member name="y" type="float" setter="" getter="">
+ </member>
+ <member name="z" type="float" setter="" getter="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
new file mode 100644
index 0000000000..034bc391a6
--- /dev/null
+++ b/doc/classes/PlaneMesh.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a planar [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_depth" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="subdivide" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="subdivide" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size">
+ Size of the generated plane. Defaults to (2.0, 2.0).
+ </member>
+ <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth">
+ Number of subdivision along the z-axis. Defaults to 0.
+ </member>
+ <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width">
+ Number of subdivision along the x-axis. Defaults to 0.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml
new file mode 100644
index 0000000000..7e7bde4db3
--- /dev/null
+++ b/doc/classes/PlaneShape.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PlaneShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_plane" qualifiers="const">
+ <return type="Plane">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_plane">
+ <return type="void">
+ </return>
+ <argument index="0" name="plane" type="Plane">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="plane" type="Plane" setter="set_plane" getter="get_plane">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
new file mode 100644
index 0000000000..05869c514e
--- /dev/null
+++ b/doc/classes/Polygon2D.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Polygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ 2D polygon representation
+ </brief_description>
+ <description>
+ A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_antialiased" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ Return the polygon fill color.
+ </description>
+ </method>
+ <method name="get_invert" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this polygon is inverted or not.
+ </description>
+ </method>
+ <method name="get_invert_border" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the added padding around the bounding box.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the offset for the polygon vertices.
+ </description>
+ </method>
+ <method name="get_polygon" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Return the set of vertices that defines this polygon.
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ Return the polygon texture
+ </description>
+ </method>
+ <method name="get_texture_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the polygon texture offset.
+ </description>
+ </method>
+ <method name="get_texture_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the rotation in radians of the texture polygon.
+ </description>
+ </method>
+ <method name="get_texture_scale" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the uv coordinate multiplier.
+ </description>
+ </method>
+ <method name="get_uv" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <description>
+ Return the texture coordinates associated with every vertex of the polygon.
+ </description>
+ </method>
+ <method name="get_vertex_colors" qualifiers="const">
+ <return type="PoolColorArray">
+ </return>
+ <description>
+ Return the list of vertex colors.
+ </description>
+ </method>
+ <method name="set_antialiased">
+ <return type="void">
+ </return>
+ <argument index="0" name="antialiased" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors].
+ </description>
+ </method>
+ <method name="set_invert">
+ <return type="void">
+ </return>
+ <argument index="0" name="invert" type="bool">
+ </argument>
+ <description>
+ Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon).
+ </description>
+ </method>
+ <method name="set_invert_border">
+ <return type="void">
+ </return>
+ <argument index="0" name="invert_border" type="float">
+ </argument>
+ <description>
+ Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision.
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom.
+ </description>
+ </method>
+ <method name="set_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="polygon" type="PoolVector2Array">
+ </argument>
+ <description>
+ Define the set of vertices that will represent the polygon.
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_offset" type="Vector2">
+ </argument>
+ <description>
+ Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top.
+ </description>
+ </method>
+ <method name="set_texture_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_rotation" type="float">
+ </argument>
+ <description>
+ Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation.
+ </description>
+ </method>
+ <method name="set_texture_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_scale" type="Vector2">
+ </argument>
+ <description>
+ Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa.
+ </description>
+ </method>
+ <method name="set_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="PoolVector2Array">
+ </argument>
+ <description>
+ Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored.
+ </description>
+ </method>
+ <method name="set_vertex_colors">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertex_colors" type="PoolColorArray">
+ </argument>
+ <description>
+ Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored.
+ Colors are interpolated between vertices, resulting in smooth gradients when they differ.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased">
+ </member>
+ <member name="color" type="Color" setter="set_color" getter="get_color">
+ </member>
+ <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border">
+ </member>
+ <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert">
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ </member>
+ <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset">
+ </member>
+ <member name="texture_rotation" type="float" setter="_set_texture_rotationd" getter="_get_texture_rotationd">
+ </member>
+ <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale">
+ </member>
+ <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv">
+ </member>
+ <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
new file mode 100644
index 0000000000..a0d1284a85
--- /dev/null
+++ b/doc/classes/PolygonPathFinder.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="find_path">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <argument index="1" name="to" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bounds" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_closest_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_intersections" qualifiers="const">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <argument index="1" name="to" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_penalty" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_point_inside" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_penalty">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="penalty" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="setup">
+ <return type="void">
+ </return>
+ <argument index="0" name="points" type="PoolVector2Array">
+ </argument>
+ <argument index="1" name="connections" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml
new file mode 100644
index 0000000000..2640b5118f
--- /dev/null
+++ b/doc/classes/PoolByteArray.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolByteArray" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Raw byte array.
+ </brief_description>
+ <description>
+ Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolByteArray">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Create from a generic array.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="byte" type="int">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolByteArray">
+ </argument>
+ <description>
+ Append a [PoolByteArray] at the end of this array.
+ </description>
+ </method>
+ <method name="compress">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants.
+ </description>
+ </method>
+ <method name="decompress">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="buffer_size" type="int">
+ </argument>
+ <argument index="1" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants.
+ </description>
+ </method>
+ <method name="get_string_from_ascii">
+ <return type="String">
+ </return>
+ <description>
+ Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8].
+ </description>
+ </method>
+ <method name="get_string_from_utf8">
+ <return type="String">
+ </return>
+ <description>
+ Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="byte" type="int">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="byte" type="int">
+ </argument>
+ <description>
+ Append an element at the end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="byte" type="int">
+ </argument>
+ <description>
+ Change the byte at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ <method name="subarray">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <argument index="1" name="to" type="int">
+ </argument>
+ <description>
+ Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml
new file mode 100644
index 0000000000..644256e765
--- /dev/null
+++ b/doc/classes/PoolColorArray.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolColorArray" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Array of Colors
+ </brief_description>
+ <description>
+ Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolColorArray">
+ <return type="PoolColorArray">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Create from a generic array.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolColorArray">
+ </argument>
+ <description>
+ Append a [PoolColorArray] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Append a value to the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Change the [Color] at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml
new file mode 100644
index 0000000000..17772b6e2a
--- /dev/null
+++ b/doc/classes/PoolIntArray.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolIntArray" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Integer Array.
+ </brief_description>
+ <description>
+ Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolIntArray">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Create from a generic array.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolIntArray">
+ </argument>
+ <description>
+ Append an [PoolIntArray] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Append a value to the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Change the int at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the array size.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml
new file mode 100644
index 0000000000..ee2740e92a
--- /dev/null
+++ b/doc/classes/PoolRealArray.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolRealArray" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Real Array.
+ </brief_description>
+ <description>
+ Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolRealArray">
+ <return type="PoolRealArray">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Create from a generic array.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolRealArray">
+ </argument>
+ <description>
+ Append an [RealArray] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Append an element at the end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Change the float at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml
new file mode 100644
index 0000000000..ace4f732da
--- /dev/null
+++ b/doc/classes/PoolStringArray.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolStringArray" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ String Array.
+ </brief_description>
+ <description>
+ String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolStringArray">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Create from a generic array.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolStringArray">
+ </argument>
+ <description>
+ Append an [StringArray] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="string" type="String">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="join">
+ <return type="String">
+ </return>
+ <argument index="0" name="delimiter" type="String">
+ </argument>
+ <description>
+ Returns a [String] with each element of the array joined with the delimiter.
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Append a string element at end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="string" type="String">
+ </argument>
+ <description>
+ Change the [String] at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml
new file mode 100644
index 0000000000..e5df38483a
--- /dev/null
+++ b/doc/classes/PoolVector2Array.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolVector2Array" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ An Array of Vector2.
+ </brief_description>
+ <description>
+ An Array specifically designed to hold Vector2.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolVector2Array">
+ <return type="PoolVector2Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Construct a new [PoolVector2Array]. Optionally, you can pass in an Array that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="vector2" type="Vector2">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolVector2Array">
+ </argument>
+ <description>
+ Append an [PoolVector2Array] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vector2" type="Vector2">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="vector2" type="Vector2">
+ </argument>
+ <description>
+ Insert a [Vector2] at the end.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vector2" type="Vector2">
+ </argument>
+ <description>
+ Change the [Vector2] at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml
new file mode 100644
index 0000000000..13a8290531
--- /dev/null
+++ b/doc/classes/PoolVector3Array.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PoolVector3Array" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ An Array of Vector3.
+ </brief_description>
+ <description>
+ An Array specifically designed to hold Vector3.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="PoolVector3Array">
+ <return type="PoolVector3Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <argument index="0" name="vector3" type="Vector3">
+ </argument>
+ <description>
+ Append an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <argument index="0" name="array" type="PoolVector3Array">
+ </argument>
+ <description>
+ Append an [PoolVector3Array] at the end of this array.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vector3" type="Vector3">
+ </argument>
+ <description>
+ Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
+ </description>
+ </method>
+ <method name="invert">
+ <description>
+ Reverse the order of the elements in the array (so first element will now be the last).
+ </description>
+ </method>
+ <method name="push_back">
+ <argument index="0" name="vector3" type="Vector3">
+ </argument>
+ <description>
+ Insert a [Vector3] at the end.
+ </description>
+ </method>
+ <method name="remove">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Remove an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="vector3" type="Vector3">
+ </argument>
+ <description>
+ Change the [Vector3] at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Return the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
new file mode 100644
index 0000000000..7e87c9fcc0
--- /dev/null
+++ b/doc/classes/Popup.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Popup" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base container control for popups and dialogs.
+ </brief_description>
+ <description>
+ Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_exclusive" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the popup will hide other popups when shown on the screen.
+ </description>
+ </method>
+ <method name="popup">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ Popup (show the control in modal form).
+ </description>
+ </method>
+ <method name="popup_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
+ </description>
+ </method>
+ <method name="popup_centered_minsize">
+ <return type="void">
+ </return>
+ <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code].
+ </description>
+ </method>
+ <method name="popup_centered_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="float" default="0.75">
+ </argument>
+ <description>
+ Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
+ </description>
+ </method>
+ <method name="set_exclusive">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Make the popup hide other popups when shown on the screen.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive">
+ </member>
+ </members>
+ <signals>
+ <signal name="about_to_show">
+ <description>
+ This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
+ </description>
+ </signal>
+ <signal name="popup_hide">
+ <description>
+ This signal is emitted when a popup is hidden.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_POST_POPUP" value="80" enum="">
+ Notification sent right after the popup is shown.
+ </constant>
+ <constant name="NOTIFICATION_POPUP_HIDE" value="81" enum="">
+ Notification sent right after the popup is hidden.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml
new file mode 100644
index 0000000000..c51c5b6d21
--- /dev/null
+++ b/doc/classes/PopupDialog.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PopupDialog" inherits="Popup" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for Popup Dialogs.
+ </brief_description>
+ <description>
+ PopupDialog is a base class for popup dialogs, along with [WindowDialog].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
new file mode 100644
index 0000000000..086eb8e34d
--- /dev/null
+++ b/doc/classes/PopupMenu.xml
@@ -0,0 +1,509 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PopupMenu" inherits="Popup" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ PopupMenu displays a list of options.
+ </brief_description>
+ <description>
+ PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_check_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="label" type="String">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <argument index="2" name="accel" type="int" default="0">
+ </argument>
+ <description>
+ Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ </description>
+ </method>
+ <method name="add_check_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <argument index="2" name="global" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_icon_check_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <argument index="3" name="accel" type="int" default="0">
+ </argument>
+ <description>
+ Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be
+ created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ </description>
+ </method>
+ <method name="add_icon_check_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <argument index="3" name="global" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_icon_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="label" type="String">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <argument index="3" name="accel" type="int" default="0">
+ </argument>
+ <description>
+ Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
+ </description>
+ </method>
+ <method name="add_icon_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <argument index="3" name="global" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="label" type="String">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <argument index="2" name="accel" type="int" default="0">
+ </argument>
+ <description>
+ Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
+ </description>
+ </method>
+ <method name="add_separator">
+ <return type="void">
+ </return>
+ <description>
+ Add a separator between items. Separators also occupy an index.
+ </description>
+ </method>
+ <method name="add_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
+ <argument index="2" name="global" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_submenu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="label" type="String">
+ </argument>
+ <argument index="1" name="submenu" type="String">
+ </argument>
+ <argument index="2" name="id" type="int" default="-1">
+ </argument>
+ <description>
+ Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the popup menu, in effect removing all items.
+ </description>
+ </method>
+ <method name="get_item_accelerator" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ </description>
+ </method>
+ <method name="get_item_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of items.
+ </description>
+ </method>
+ <method name="get_item_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the icon of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the id of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Find and return the index of the item containing a given id.
+ </description>
+ </method>
+ <method name="get_item_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
+ </description>
+ </method>
+ <method name="get_item_shortcut" qualifiers="const">
+ <return type="ShortCut">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_submenu" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the submenu name of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the text of the item at index "idx".
+ </description>
+ </method>
+ <method name="get_item_tooltip" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_hide_on_checkable_item_selection">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indicates whether or not the PopupMenu will hide on checkable item selection.
+ </description>
+ </method>
+ <method name="is_hide_on_item_selection">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indicates whether or not the PopupMenu will hide on item selection.
+ </description>
+ </method>
+ <method name="is_item_checkable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ </description>
+ </method>
+ <method name="is_item_checked" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the checkstate status of the item at index "idx".
+ </description>
+ </method>
+ <method name="is_item_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked.
+ </description>
+ </method>
+ <method name="is_item_separator" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return whether the item is a seperator. If it is, it would be displayed as a line.
+ </description>
+ </method>
+ <method name="remove_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
+ </description>
+ </method>
+ <method name="set_hide_on_checkable_item_selection">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Sets whether or not the PopupMenu will hide on checkable item selection.
+ </description>
+ </method>
+ <method name="set_hide_on_item_selection">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Sets whether or not the PopupMenu will hide on item selection.
+ </description>
+ </method>
+ <method name="set_item_accelerator">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="accel" type="int">
+ </argument>
+ <description>
+ Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ </description>
+ </method>
+ <method name="set_item_as_checkable">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ </description>
+ </method>
+ <method name="set_item_as_separator">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line.
+ </description>
+ </method>
+ <method name="set_item_checked">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="checked" type="bool">
+ </argument>
+ <description>
+ Set the checkstate status of the item at index "idx".
+ </description>
+ </method>
+ <method name="set_item_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked.
+ </description>
+ </method>
+ <method name="set_item_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="icon" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ Set the id of the item at index "idx".
+ </description>
+ </method>
+ <method name="set_item_metadata">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="metadata" type="Variant">
+ </argument>
+ <description>
+ Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
+ </description>
+ </method>
+ <method name="set_item_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="global" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_submenu">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="submenu" type="String">
+ </argument>
+ <description>
+ Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked.
+ </description>
+ </method>
+ <method name="set_item_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ Set the text of the item at index "idx".
+ </description>
+ </method>
+ <method name="set_item_tooltip">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tooltip" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="toggle_item_checked">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection">
+ </member>
+ <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection">
+ </member>
+ <member name="items" type="Array" setter="_set_items" getter="_get_items">
+ </member>
+ </members>
+ <signals>
+ <signal name="id_pressed">
+ <argument index="0" name="ID" type="int">
+ </argument>
+ <description>
+ This event is emitted when an item of some id is pressed or its accelerator is activated.
+ </description>
+ </signal>
+ <signal name="index_pressed">
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ This event is emitted when an item of some index is pressed or its accelerator is activated.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="checked" type="Texture">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_accel" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="panel_disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="separator" type="StyleBox">
+ </theme_item>
+ <theme_item name="submenu" type="Texture">
+ </theme_item>
+ <theme_item name="unchecked" type="Texture">
+ </theme_item>
+ <theme_item name="vseparation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
new file mode 100644
index 0000000000..f8060ab4f6
--- /dev/null
+++ b/doc/classes/PopupPanel.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PopupPanel" inherits="Popup" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class for displaying popups with a panel background.
+ </brief_description>
+ <description>
+ Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
new file mode 100644
index 0000000000..ffb1c62d0f
--- /dev/null
+++ b/doc/classes/Position2D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Position2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generic 2D Position hint for editing.
+ </brief_description>
+ <description>
+ Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
new file mode 100644
index 0000000000..a544e59ddc
--- /dev/null
+++ b/doc/classes/Position3D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Position3D" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Generic 3D Position hint for editing
+ </brief_description>
+ <description>
+ Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
new file mode 100644
index 0000000000..34141edbe7
--- /dev/null
+++ b/doc/classes/PrimitiveMesh.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
+ </brief_description>
+ <description>
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mesh_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="material" type="Material" setter="set_material" getter="get_material">
+ The current [Material] of the primitive mesh.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
new file mode 100644
index 0000000000..21fa67bc82
--- /dev/null
+++ b/doc/classes/PrismMesh.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a prism-shaped [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a prism-shaped [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_left_to_right" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_depth" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subdivide_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_left_to_right">
+ <return type="void">
+ </return>
+ <argument index="0" name="left_to_right" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subdivide_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right">
+ Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint).
+ </member>
+ <member name="size" type="Vector3" setter="set_size" getter="get_size">
+ Size of the prism. Defaults to (2.0, 2.0, 2.0).
+ </member>
+ <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth">
+ Number of added edge loops along the z-axis. Defaults to 0.
+ </member>
+ <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height">
+ Number of added edge loops along the y-axis. Defaults to 0.
+ </member>
+ <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width">
+ Number of added edge loops along the x-axis. Defaults to 0.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml
new file mode 100644
index 0000000000..032ce9def2
--- /dev/null
+++ b/doc/classes/ProceduralSky.xml
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ProceduralSky" inherits="Sky" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_ground_bottom_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ground_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ground_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ground_horizon_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky_horizon_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sky_top_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_angle_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_angle_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_curve" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_latitude" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_sun_longitude" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture_size" qualifiers="const">
+ <return type="int" enum="ProceduralSky.TextureSize">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_ground_bottom_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ground_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ground_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ground_horizon_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky_horizon_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sky_top_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_angle_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_angle_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_curve">
+ <return type="void">
+ </return>
+ <argument index="0" name="curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_latitude">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_sun_longitude">
+ <return type="void">
+ </return>
+ <argument index="0" name="degrees" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int" enum="ProceduralSky.TextureSize">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color">
+ </member>
+ <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve">
+ </member>
+ <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy">
+ </member>
+ <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color">
+ </member>
+ <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve">
+ </member>
+ <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy">
+ </member>
+ <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color">
+ </member>
+ <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color">
+ </member>
+ <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max">
+ </member>
+ <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min">
+ </member>
+ <member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color">
+ </member>
+ <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve">
+ </member>
+ <member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy">
+ </member>
+ <member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude">
+ </member>
+ <member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude">
+ </member>
+ <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize">
+ </member>
+ </members>
+ <constants>
+ <constant name="TEXTURE_SIZE_256" value="0">
+ </constant>
+ <constant name="TEXTURE_SIZE_512" value="1">
+ </constant>
+ <constant name="TEXTURE_SIZE_1024" value="2">
+ </constant>
+ <constant name="TEXTURE_SIZE_2048" value="3">
+ </constant>
+ <constant name="TEXTURE_SIZE_4096" value="4">
+ </constant>
+ <constant name="TEXTURE_SIZE_MAX" value="5">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
new file mode 100644
index 0000000000..f6be04cc19
--- /dev/null
+++ b/doc/classes/ProgressBar.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ProgressBar" inherits="Range" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ General purpose progress bar.
+ </brief_description>
+ <description>
+ General purpose progress bar. Shows fill percentage from right to left.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_percent_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_percent_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible">
+ </member>
+ </members>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="fg" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_shadow" type="Color">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
new file mode 100644
index 0000000000..bec9525a45
--- /dev/null
+++ b/doc/classes/ProjectSettings.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ProjectSettings" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Contains global variables accessible from everywhere.
+ </brief_description>
+ <description>
+ Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_property_info">
+ <return type="void">
+ </return>
+ <argument index="0" name="hint" type="Dictionary">
+ </argument>
+ <description>
+ Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
+ Example:
+ [codeblock]
+ ProjectSettings.set("category/property_name", 0)
+
+ var property_info = {
+ "name": "category/property_name",
+ "type": TYPE_INT,
+ "hint": PROPERTY_HINT_ENUM,
+ "hint_string": "one,two,three"
+ }
+
+ ProjectSettings.add_property_info(property_info)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Clear the whole configuration (not recommended, may break things).
+ </description>
+ </method>
+ <method name="get_order" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return the order of a configuration value (influences when saved to the config file).
+ </description>
+ </method>
+ <method name="get_singleton" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="globalize_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Convert a localized path (res://) to a full native OS path.
+ </description>
+ </method>
+ <method name="has" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return true if a configuration value is present.
+ </description>
+ </method>
+ <method name="has_singleton" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_resource_pack">
+ <return type="bool">
+ </return>
+ <argument index="0" name="pack" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="localize_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Convert a path to a localized path (res:// path).
+ </description>
+ </method>
+ <method name="property_can_revert">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="property_get_revert">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="save_custom">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_initial_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_order">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="pos" type="int">
+ </argument>
+ <description>
+ Set the order of a configuration value (influences when saved to the config file).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml
new file mode 100644
index 0000000000..9b4b564900
--- /dev/null
+++ b/doc/classes/ProximityGroup.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ General purpose proximity-detection node.
+ </brief_description>
+ <description>
+ General purpose proximity-detection node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="broadcast">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="parameters" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_grid_radius" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_dispatch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_grid_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_group_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius">
+ </member>
+ </members>
+ <signals>
+ <signal name="broadcast">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="parameters" type="Array">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
new file mode 100644
index 0000000000..b7c66b04de
--- /dev/null
+++ b/doc/classes/QuadMesh.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a square mesh.
+ </brief_description>
+ <description>
+ Class representing a square mesh with size (2,2,0). Consider using a [PlaneMesh] if you require a differently sized plane.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
new file mode 100644
index 0000000000..f07e143aa0
--- /dev/null
+++ b/doc/classes/Quat.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Quat" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Quat">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <argument index="2" name="z" type="float">
+ </argument>
+ <argument index="3" name="w" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="Quat">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="angle" type="float">
+ </argument>
+ <description>
+ Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
+ </description>
+ </method>
+ <method name="Quat">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="from" type="Basis">
+ </argument>
+ <description>
+ Returns the rotation matrix corresponding to the given quaternion.
+ </description>
+ </method>
+ <method name="cubic_slerp">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="b" type="Quat">
+ </argument>
+ <argument index="1" name="pre_a" type="Quat">
+ </argument>
+ <argument index="2" name="post_b" type="Quat">
+ </argument>
+ <argument index="3" name="t" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="dot">
+ <return type="float">
+ </return>
+ <argument index="0" name="b" type="Quat">
+ </argument>
+ <description>
+ Returns the dot product of two quaternions.
+ </description>
+ </method>
+ <method name="inverse">
+ <return type="Quat">
+ </return>
+ <description>
+ Returns the inverse of the quaternion.
+ </description>
+ </method>
+ <method name="is_normalized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the quaternion is normalized or not.
+ </description>
+ </method>
+ <method name="length">
+ <return type="float">
+ </return>
+ <description>
+ Returns the length of the quaternion.
+ </description>
+ </method>
+ <method name="length_squared">
+ <return type="float">
+ </return>
+ <description>
+ Returns the length of the quaternion, squared.
+ </description>
+ </method>
+ <method name="normalized">
+ <return type="Quat">
+ </return>
+ <description>
+ Returns a copy of the quaternion, normalized to unit length.
+ </description>
+ </method>
+ <method name="slerp">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="b" type="Quat">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Perform a spherical-linear interpolation with another quaternion.
+ </description>
+ </method>
+ <method name="slerpni">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="b" type="Quat">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="xform">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="v" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="float" setter="" getter="">
+ </member>
+ <member name="x" type="float" setter="" getter="">
+ </member>
+ <member name="y" type="float" setter="" getter="">
+ </member>
+ <member name="z" type="float" setter="" getter="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
new file mode 100644
index 0000000000..89005b0d3b
--- /dev/null
+++ b/doc/classes/RID.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RID" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Handle for a [Resource]'s unique ID.
+ </brief_description>
+ <description>
+ The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="RID">
+ <return type="RID">
+ </return>
+ <argument index="0" name="from" type="Object">
+ </argument>
+ <description>
+ Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0.
+ </description>
+ </method>
+ <method name="get_id">
+ <return type="int">
+ </return>
+ <description>
+ Retrieve the ID of the referenced resource.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
new file mode 100644
index 0000000000..9af6abf7b8
--- /dev/null
+++ b/doc/classes/Range.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Range" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Abstract base class for range-based controls.
+ </brief_description>
+ <description>
+ Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_as_ratio" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return value mapped to 0 to 1 range.
+ </description>
+ </method>
+ <method name="get_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the maximum value.
+ </description>
+ </method>
+ <method name="get_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the minimum value.
+ </description>
+ </method>
+ <method name="get_page" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the page size, if page is 0, paging is disabled.
+ </description>
+ </method>
+ <method name="get_step" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the stepping, if step is 0, stepping is disabled.
+ </description>
+ </method>
+ <method name="get_value" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_ratio_exp" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_using_rounded_values" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_as_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
+ </description>
+ </method>
+ <method name="set_exp_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="maximum" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="minimum" type="float">
+ </argument>
+ <description>
+ Set minimum value, clamped range value to it if it's less.
+ </description>
+ </method>
+ <method name="set_page">
+ <return type="void">
+ </return>
+ <argument index="0" name="pagesize" type="float">
+ </argument>
+ <description>
+ Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
+ </description>
+ </method>
+ <method name="set_step">
+ <return type="void">
+ </return>
+ <argument index="0" name="step" type="float">
+ </argument>
+ <description>
+ Set step value. If step is 0, stepping will be disabled.
+ </description>
+ </method>
+ <method name="set_use_rounded_values">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="share">
+ <return type="void">
+ </return>
+ <argument index="0" name="with" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unshare">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp">
+ </member>
+ <member name="max_value" type="float" setter="set_max" getter="get_max">
+ </member>
+ <member name="min_value" type="float" setter="set_min" getter="get_min">
+ </member>
+ <member name="page" type="float" setter="set_page" getter="get_page">
+ </member>
+ <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values">
+ </member>
+ <member name="step" type="float" setter="set_step" getter="get_step">
+ </member>
+ <member name="value" type="float" setter="set_value" getter="get_value">
+ </member>
+ </members>
+ <signals>
+ <signal name="changed">
+ <description>
+ This signal is emitted when min, max, range or step change.
+ </description>
+ </signal>
+ <signal name="value_changed">
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ This signal is emitted when value changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
new file mode 100644
index 0000000000..2e6efff769
--- /dev/null
+++ b/doc/classes/RayCast.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RayCast" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Query the closest object intersecting a ray.
+ </brief_description>
+ <description>
+ A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray.
+
+ RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks.
+
+ Only enabled raycasts will be able to query the space and report collisions.
+
+ RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ Adds a collision exception so the ray does not report collisions with the specified node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Adds a collision exception so the ray does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void">
+ </return>
+ <description>
+ Removes all collision exceptions for this ray.
+ </description>
+ </method>
+ <method name="force_raycast_update">
+ <return type="void">
+ </return>
+ <description>
+ Updates the collision information for the ray.
+ Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_cast_to" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the destination point of this ray object.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast.is_colliding():
+ var collider = RayCast.get_collider()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast.is_colliding():
+ var shape = RayCast.get_collider_shape()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision layer for this ray.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the normal of the intersecting object's shape at the collision point.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="get_type_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [PhysicsDirectSpaceState].
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
+ </description>
+ </method>
+ <method name="is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the ray is enabled or not.
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ Removes a collision exception so the ray does report collisions with the specified node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Removes a collision exception so the ray does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="set_cast_to">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_point" type="Vector3">
+ </argument>
+ <description>
+ Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code].
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the mask to filter objects. Only objects with at least the same mask element set will be detected.
+ </description>
+ </method>
+ <method name="set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
+ </description>
+ </method>
+ <method name="set_type_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [PhysicsDirectSpaceState], eg. [code]PhysicsDirectSpaceState.TYPE_MASK_STATIC_BODY | PhysicsDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to">
+ The ray's destination point, relative to the RayCast's [code]position[/code].
+ </member>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ If [code]true[/code], collisions will be reported. Default value: [code]false[/code].
+ </member>
+ <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask">
+ Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState].
+ Example:
+ [codeblock]
+ RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY
+ [/codeblock]
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
new file mode 100644
index 0000000000..5520abe050
--- /dev/null
+++ b/doc/classes/RayCast2D.xml
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RayCast2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Query the closest object intersecting a ray.
+ </brief_description>
+ <description>
+ A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray.
+ RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks.
+ Only enabled raycasts will be able to query the space and report collisions.
+ RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ Adds a collision exception so the ray does not report collisions with the specified node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Adds a collision exception so the ray does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void">
+ </return>
+ <description>
+ Removes all collision exceptions for this ray.
+ </description>
+ </method>
+ <method name="force_raycast_update">
+ <return type="void">
+ </return>
+ <description>
+ Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_cast_to" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the destination point of this ray object.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object">
+ </return>
+ <description>
+ Returns the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast2D.is_colliding():
+ var collider = RayCast2D.get_collider()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast2D.is_colliding():
+ var shape = RayCast2D.get_collider_shape()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision layer for this ray.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the normal of the intersecting object's shape at the collision point.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="get_exclude_parent_body" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this ray should hit your parent node, if it's a body.
+ </description>
+ </method>
+ <method name="get_type_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [Physics2DDirectSpaceState].
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length).
+ </description>
+ </method>
+ <method name="is_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this raycast is enabled or not.
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ Removes a collision exception so the ray does report collisions with the specified node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Removes a collision exception so the ray does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="set_cast_to">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_point" type="Vector2">
+ </argument>
+ <description>
+ Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the mask to filter objects. Only objects with at least the same mask element set will be detected.
+ </description>
+ </method>
+ <method name="set_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions.
+ </description>
+ </method>
+ <method name="set_exclude_parent_body">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="bool">
+ </argument>
+ <description>
+ Toggle whether this ray should hit your parent node, if it's a body.
+ </description>
+ </method>
+ <method name="set_type_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [Physics2DDirectSpaceState], eg. [code]Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to">
+ The ray's destination point, relative to the RayCast's [code]position[/code].
+ </member>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The RayCast2D's collison layer(s). Only bodies in the same collision layer(s) will be detected.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ If [code]true[/code], collisions will be reported. Default value: [code]false[/code].
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body">
+ If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code].
+ </member>
+ <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask">
+ Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState].
+ Example:
+ [codeblock]
+ RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY
+ [/codeblock]
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
new file mode 100644
index 0000000000..7fab9c3949
--- /dev/null
+++ b/doc/classes/RayShape.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RayShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
new file mode 100644
index 0000000000..4f6313a1d2
--- /dev/null
+++ b/doc/classes/RayShape2D.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Ray shape for 2D collisions.
+ </brief_description>
+ <description>
+ Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the length of the ray.
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Set the length of the ray.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length">
+ The ray's length.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
new file mode 100644
index 0000000000..1a467861b3
--- /dev/null
+++ b/doc/classes/Rect2.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Rect2" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Rect2">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <description>
+ Construct a [Rect2] by position and size.
+ </description>
+ </method>
+ <method name="Rect2">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <argument index="2" name="width" type="float">
+ </argument>
+ <argument index="3" name="height" type="float">
+ </argument>
+ <description>
+ Construct a [Rect2] by x, y, width and height.
+ </description>
+ </method>
+ <method name="clip">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ Returns the intersection of this [Rect2] and b.
+ </description>
+ </method>
+ <method name="encloses">
+ <return type="bool">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ Returns true if this [Rect2] completely encloses another one.
+ </description>
+ </method>
+ <method name="expand">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Return this [Rect2] expanded to include a given point.
+ </description>
+ </method>
+ <method name="get_area">
+ <return type="float">
+ </return>
+ <description>
+ Get the area of the [Rect2].
+ </description>
+ </method>
+ <method name="grow">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="by" type="float">
+ </argument>
+ <description>
+ Return a copy of the [Rect2] grown a given amount of units towards all the sides.
+ </description>
+ </method>
+ <method name="grow_individual">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="left" type="float">
+ </argument>
+ <argument index="1" name="top" type="float">
+ </argument>
+ <argument index="2" name="right" type="float">
+ </argument>
+ <argument index="3" name=" bottom" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="grow_margin">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="margin" type="int">
+ </argument>
+ <argument index="1" name="by" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_no_area">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the [Rect2] is flat or empty.
+ </description>
+ </method>
+ <method name="has_point">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Return true if the [Rect2] contains a point.
+ </description>
+ </method>
+ <method name="intersects">
+ <return type="bool">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ Return true if the [Rect2] overlaps with another.
+ </description>
+ </method>
+ <method name="merge">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ Combine this [Rect2] with another, a larger one is returned that contains both.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="end" type="Vector2" setter="" getter="">
+ Ending corner.
+ </member>
+ <member name="position" type="Vector2" setter="" getter="">
+ Position (starting corner).
+ </member>
+ <member name="size" type="Vector2" setter="" getter="">
+ Size from position to end.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml
new file mode 100644
index 0000000000..8837b8f812
--- /dev/null
+++ b/doc/classes/Rect3.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Rect3" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Rect3">
+ <return type="Rect3">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <argument index="1" name="size" type="Vector3">
+ </argument>
+ <description>
+ Optional constructor, accepts position and size.
+ </description>
+ </method>
+ <method name="encloses">
+ <return type="bool">
+ </return>
+ <argument index="0" name="with" type="Rect3">
+ </argument>
+ <description>
+ Return true if this [Rect3] completely encloses another one.
+ </description>
+ </method>
+ <method name="expand">
+ <return type="Rect3">
+ </return>
+ <argument index="0" name="to_point" type="Vector3">
+ </argument>
+ <description>
+ Return this [Rect3] expanded to include a given point.
+ </description>
+ </method>
+ <method name="get_area">
+ <return type="float">
+ </return>
+ <description>
+ Get the area of the [Rect3].
+ </description>
+ </method>
+ <method name="get_endpoint">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the position of the 8 endpoints of the [Rect3] in space.
+ </description>
+ </method>
+ <method name="get_longest_axis">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the normalized longest axis of the [Rect3].
+ </description>
+ </method>
+ <method name="get_longest_axis_index">
+ <return type="int">
+ </return>
+ <description>
+ Return the index of the longest axis of the [Rect3] (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 [Rect3].
+ </description>
+ </method>
+ <method name="get_shortest_axis">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the normalized shortest axis of the [Rect3].
+ </description>
+ </method>
+ <method name="get_shortest_axis_index">
+ <return type="int">
+ </return>
+ <description>
+ Return the index of the shortest axis of the [Rect3] (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 [Rect3].
+ </description>
+ </method>
+ <method name="get_support">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="dir" type="Vector3">
+ </argument>
+ <description>
+ Return the support point in a given direction. This is useful for collision detection algorithms.
+ </description>
+ </method>
+ <method name="grow">
+ <return type="Rect3">
+ </return>
+ <argument index="0" name="by" type="float">
+ </argument>
+ <description>
+ Return a copy of the [Rect3] 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 [Rect3] is flat or empty.
+ </description>
+ </method>
+ <method name="has_no_surface">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the [Rect3] is empty.
+ </description>
+ </method>
+ <method name="has_point">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector3">
+ </argument>
+ <description>
+ Return true if the [Rect3] contains a point.
+ </description>
+ </method>
+ <method name="intersection">
+ <return type="Rect3">
+ </return>
+ <argument index="0" name="with" type="Rect3">
+ </argument>
+ <description>
+ Return the intersection between two [Rect3]. An empty Rect3 (size 0,0,0) is returned on failure.
+ </description>
+ </method>
+ <method name="intersects">
+ <return type="bool">
+ </return>
+ <argument index="0" name="with" type="Rect3">
+ </argument>
+ <description>
+ Return true if the [Rect3] overlaps with another.
+ </description>
+ </method>
+ <method name="intersects_plane">
+ <return type="bool">
+ </return>
+ <argument index="0" name="plane" type="Plane">
+ </argument>
+ <description>
+ Return true if the [Rect3] is at both sides of a plane.
+ </description>
+ </method>
+ <method name="intersects_segment">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <description>
+ Return true if the [Rect3] intersects the line segment between from and to
+ </description>
+ </method>
+ <method name="merge">
+ <return type="Rect3">
+ </return>
+ <argument index="0" name="with" type="Rect3">
+ </argument>
+ <description>
+ Combine this [Rect3] with another, a larger one is returned that contains both.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="end" type="Vector3" setter="" getter="">
+ Ending corner.
+ </member>
+ <member name="position" type="Vector3" setter="" getter="">
+ </member>
+ <member name="size" type="Vector3" setter="" getter="">
+ Size from position to end.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
new file mode 100644
index 0000000000..7a1aec2021
--- /dev/null
+++ b/doc/classes/RectangleShape2D.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Rectangle shape for 2D collisions.
+ </brief_description>
+ <description>
+ Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_extents" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the half extents, the actual width and height of this shape is twice the half extents.
+ </description>
+ </method>
+ <method name="set_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="extents" type="Vector2">
+ </argument>
+ <description>
+ Set the half extents, the actual width and height of this shape is twice the half extents.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="extents" type="Vector2" setter="set_extents" getter="get_extents">
+ The rectangle's half extents. The width and height of this shape is twice the half extents.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
new file mode 100644
index 0000000000..2531ea88ad
--- /dev/null
+++ b/doc/classes/Reference.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Reference" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for anything that keeps a reference count.
+ </brief_description>
+ <description>
+ Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="init_ref">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="reference">
+ <return type="bool">
+ </return>
+ <description>
+ Increase the internal reference counter. Use this only if you really know what you are doing.
+ </description>
+ </method>
+ <method name="unreference">
+ <return type="bool">
+ </return>
+ <description>
+ Decrease the internal reference counter. Use this only if you really know what you are doing.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
new file mode 100644
index 0000000000..e8de910cc8
--- /dev/null
+++ b/doc/classes/ReferenceRect.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ReferenceRect" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Reference frame for GUI.
+ </brief_description>
+ <description>
+ Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="border" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
new file mode 100644
index 0000000000..c3d95e5a62
--- /dev/null
+++ b/doc/classes/ReflectionProbe.xml
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="are_shadows_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cull_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_extents" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_intensity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_interior_ambient" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_interior_ambient_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_interior_ambient_probe_contribution" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_origin_offset" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_mode" qualifiers="const">
+ <return type="int" enum="ReflectionProbe.UpdateMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_box_projection_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_set_as_interior" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_as_interior">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="layers" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_enable_box_projection">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_enable_shadows">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="extents" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_intensity">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_interior_ambient">
+ <return type="void">
+ </return>
+ <argument index="0" name="ambient" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_interior_ambient_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="ambient_energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_interior_ambient_probe_contribution">
+ <return type="void">
+ </return>
+ <argument index="0" name="ambient_probe_contribution" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_origin_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="origin_offset" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ReflectionProbe.UpdateMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled">
+ </member>
+ <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask">
+ </member>
+ <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled">
+ </member>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+ </member>
+ <member name="intensity" type="float" setter="set_intensity" getter="get_intensity">
+ </member>
+ <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient">
+ </member>
+ <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution">
+ </member>
+ <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy">
+ </member>
+ <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior">
+ </member>
+ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
+ </member>
+ <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset">
+ </member>
+ <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode">
+ </member>
+ </members>
+ <constants>
+ <constant name="UPDATE_ONCE" value="0">
+ </constant>
+ <constant name="UPDATE_ALWAYS" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/RegEx.xml b/doc/classes/RegEx.xml
new file mode 100644
index 0000000000..626f8f1a93
--- /dev/null
+++ b/doc/classes/RegEx.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RegEx" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Simple regular expression matcher.
+ </brief_description>
+ <description>
+ Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations.
+ Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example:
+ [code]var exp = RegEx.new()[/code]
+ [code]exp.compile("\\d+")[/code]
+ would be read by RegEx as [code]\d+[/code]
+ Similarly:
+ [code]exp.compile("\"(?:\\\\.|[^\"])*\"")[/code]
+ would be read as [code]"(?:\\.|[^"])*"[/code]
+ Currently supported features:
+ * Capturing [code]()[/code] and non-capturing [code](?:)[/code] groups
+ * Named capturing groups [code](?P&lt;name&gt;)[/code]
+ * Any character [code].[/code]
+ * Shorthand character classes [code]\w \W \s \S \d \D[/code]
+ * User-defined character classes such as [code][A-Za-z][/code]
+ * Simple quantifiers [code]?[/code], [code]*[/code] and [code]+[/code]
+ * Range quantifiers [code]{x,y}[/code]
+ * Lazy (non-greedy) quantifiers [code]*?[/code]
+ * Beginning [code]^[/code] and end [code]$[/code] anchors
+ * Alternation [code]|[/code]
+ * Backreferences [code]\1[/code], [code]\g{1}[/code], and [code]\g&lt;name&gt;[/code]
+ * POSIX character classes [code][[:alnum:]][/code]
+ * Lookahead [code](?=)[/code], [code](?!)[/code] and lookbehind [code](?&lt;=)[/code], [code](?&lt;!)[/code]
+ * ASCII [code]\xFF[/code] and Unicode [code]\uFFFF[/code] code points (in a style similar to Python)
+ * Word boundaries [code]\b[/code], [code]\B[/code]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object.
+ </description>
+ </method>
+ <method name="compile">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="pattern" type="String">
+ </argument>
+ <description>
+ Compiles and assign the regular expression pattern to use.
+ </description>
+ </method>
+ <method name="get_group_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of numeric capturing groups.
+ </description>
+ </method>
+ <method name="get_names" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array of names of named capturing groups.
+ </description>
+ </method>
+ <method name="get_pattern" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the expression used to compile the code.
+ </description>
+ </method>
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this object has a valid regular expression assigned.
+ </description>
+ </method>
+ <method name="search" qualifiers="const">
+ <return type="RegExMatch">
+ </return>
+ <argument index="0" name="subject" type="String">
+ </argument>
+ <argument index="1" name="offset" type="int" default="0">
+ </argument>
+ <argument index="2" name="end" type="int" default="-1">
+ </argument>
+ <description>
+ Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be.
+ </description>
+ </method>
+ <method name="sub" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="subject" type="String">
+ </argument>
+ <argument index="1" name="replacement" type="String">
+ </argument>
+ <argument index="2" name="all" type="bool" default="false">
+ </argument>
+ <argument index="3" name="offset" type="int" default="0">
+ </argument>
+ <argument index="4" name="end" type="int" default="-1">
+ </argument>
+ <description>
+ Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]\1[/code] and [code]\g&lt;name&gt;[/code] expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml
new file mode 100644
index 0000000000..9e021ed6c8
--- /dev/null
+++ b/doc/classes/RegExMatch.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RegExMatch" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_end" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="Variant" default="0">
+ </argument>
+ <description>
+ Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ </description>
+ </method>
+ <method name="get_group_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of numeric capturing groups.
+ </description>
+ </method>
+ <method name="get_names" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Returns an array of names of named capturing groups.
+ </description>
+ </method>
+ <method name="get_start" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="Variant" default="0">
+ </argument>
+ <description>
+ Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ </description>
+ </method>
+ <method name="get_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="name" type="Variant" default="0">
+ </argument>
+ <description>
+ Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
+ </description>
+ </method>
+ <method name="get_strings" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subject" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml
new file mode 100644
index 0000000000..ecc136055e
--- /dev/null
+++ b/doc/classes/RemoteTransform.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_remote_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_position" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_rotation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_scale" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_global_coordinates" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_remote_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_position" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_rotation" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_scale" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_global_coordinates">
+ <return type="void">
+ </return>
+ <argument index="0" name="use_global_coordinates" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ </member>
+ <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ </member>
+ <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ </member>
+ <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ </member>
+ <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
new file mode 100644
index 0000000000..346b8de621
--- /dev/null
+++ b/doc/classes/RemoteTransform2D.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_remote_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_position" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_rotation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_update_scale" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_global_coordinates" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_remote_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_position" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_rotation" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_update_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="update_remote_scale" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_global_coordinates">
+ <return type="void">
+ </return>
+ <argument index="0" name="use_global_coordinates" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ </member>
+ <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ </member>
+ <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ </member>
+ <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ </member>
+ <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
new file mode 100644
index 0000000000..57497f5d78
--- /dev/null
+++ b/doc/classes/Resource.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Resource" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all resources.
+ </brief_description>
+ <description>
+ Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_setup_local_to_scene" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="duplicate" qualifiers="const">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="subresources" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_local_scene" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
+ </description>
+ </method>
+ <method name="get_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else.
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
+ </description>
+ </method>
+ <method name="is_local_to_scene" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_local_to_scene">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only.
+ </description>
+ </method>
+ <method name="set_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path".
+ </description>
+ </method>
+ <method name="setup_local_to_scene">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="take_over_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene">
+ </member>
+ <member name="resource_name" type="String" setter="set_name" getter="get_name">
+ </member>
+ <member name="resource_path" type="String" setter="set_path" getter="get_path">
+ </member>
+ </members>
+ <signals>
+ <signal name="changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
new file mode 100644
index 0000000000..419c4a84fb
--- /dev/null
+++ b/doc/classes/ResourceImporter.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourceImporter" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourceImporterOGGVorbis.xml b/doc/classes/ResourceImporterOGGVorbis.xml
new file mode 100644
index 0000000000..eef626cee7
--- /dev/null
+++ b/doc/classes/ResourceImporterOGGVorbis.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
new file mode 100644
index 0000000000..d508b0a532
--- /dev/null
+++ b/doc/classes/ResourceInteractiveLoader.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Interactive Resource Loader.
+ </brief_description>
+ <description>
+ Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_resource">
+ <return type="Resource">
+ </return>
+ <description>
+ Return the loaded resource (only if loaded). Otherwise, returns null.
+ </description>
+ </method>
+ <method name="get_stage" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the load stage. The total amount of stages can be queried with [method get_stage_count]
+ </description>
+ </method>
+ <method name="get_stage_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the total amount of stages (calls to [method poll]) needed to completely load this resource.
+ </description>
+ </method>
+ <method name="poll">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource].
+ </description>
+ </method>
+ <method name="wait">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
new file mode 100644
index 0000000000..6558a388c8
--- /dev/null
+++ b/doc/classes/ResourceLoader.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourceLoader" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Resource Loader.
+ </brief_description>
+ <description>
+ Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_dependencies">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_recognized_extensions_for_type">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ Return the list of recognized extensions for a resource type.
+ </description>
+ </method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="2" name="p_no_cache" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_interactive">
+ <return type="ResourceInteractiveLoader">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Load a resource interactively, the returned object allows to load with high granularity.
+ </description>
+ </method>
+ <method name="set_abort_on_missing_resources">
+ <return type="void">
+ </return>
+ <argument index="0" name="abort" type="bool">
+ </argument>
+ <description>
+ Change the behavior on missing sub-resources. Default is to abort load.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
new file mode 100644
index 0000000000..35ebeb1760
--- /dev/null
+++ b/doc/classes/ResourcePreloader.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourcePreloader" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Resource Preloader Node.
+ </brief_description>
+ <description>
+ Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource" qualifiers="const">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return the resource given a text-id.
+ </description>
+ </method>
+ <method name="get_resource_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return the list of resources inside the preloader.
+ </description>
+ </method>
+ <method name="has_resource" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return true if the preloader has a given resource.
+ </description>
+ </method>
+ <method name="remove_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Remove a resource from the preloader by text id.
+ </description>
+ </method>
+ <method name="rename_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="newname" type="String">
+ </argument>
+ <description>
+ Rename a resource inside the preloader, from a text-id to a new text-id.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resources" type="Array" setter="_set_resources" getter="_get_resources">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
new file mode 100644
index 0000000000..de296776ad
--- /dev/null
+++ b/doc/classes/ResourceSaver.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ResourceSaver" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Resource Saving Interface.
+ </brief_description>
+ <description>
+ Resource Saving Interface. This interface is used for saving resources to disk.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_recognized_extensions">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="Resource">
+ </argument>
+ <description>
+ Return the list of extensions available for saving a resource of a given type.
+ </description>
+ </method>
+ <method name="save">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="resource" type="Resource">
+ </argument>
+ <argument index="2" name="flags" type="int" default="0">
+ </argument>
+ <description>
+ Save a resource to disk, to a given path.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="FLAG_RELATIVE_PATHS" value="1">
+ </constant>
+ <constant name="FLAG_BUNDLE_RESOURCES" value="2">
+ </constant>
+ <constant name="FLAG_CHANGE_PATH" value="4">
+ </constant>
+ <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8">
+ </constant>
+ <constant name="FLAG_SAVE_BIG_ENDIAN" value="16">
+ </constant>
+ <constant name="FLAG_COMPRESS" value="32">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
new file mode 100644
index 0000000000..90ee76cb98
--- /dev/null
+++ b/doc/classes/RichTextLabel.xml
@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RichTextLabel" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Label that displays rich text.
+ </brief_description>
+ <description>
+ Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_image">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="append_bbcode">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="bbcode" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bbcode" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_percent_visible" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_text">
+ <return type="String">
+ </return>
+ <description>
+ Returns the raw text, stripping out the formatting information.
+ </description>
+ </method>
+ <method name="get_total_character_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_scroll">
+ <return type="VScrollBar">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_visible_characters" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_meta_underlined" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_scroll_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_scroll_following" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_selection_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if selecting the text inside this richtext is allowed.
+ </description>
+ </method>
+ <method name="is_using_bbcode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="newline">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="parse_bbcode">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="bbcode" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="pop">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="push_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_cell">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="push_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="Font">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_indent">
+ <return type="void">
+ </return>
+ <argument index="0" name="level" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_list">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="RichTextLabel.ListType">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_meta">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_table">
+ <return type="void">
+ </return>
+ <argument index="0" name="columns" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="push_underline">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_line">
+ <return type="bool">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="scroll_to_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bbcode">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_meta_underline">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_percent_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="percent_visible" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scroll_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_scroll_follow">
+ <return type="void">
+ </return>
+ <argument index="0" name="follow" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_selection_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set to true if selecting the text inside this richtext is allowed.
+ </description>
+ </method>
+ <method name="set_tab_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="spaces" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_table_column_expand">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="expand" type="bool">
+ </argument>
+ <argument index="2" name="ratio" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_bbcode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_visible_characters">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode">
+ </member>
+ <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode">
+ </member>
+ <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible">
+ </member>
+ <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters">
+ </member>
+ </members>
+ <signals>
+ <signal name="meta_clicked">
+ <argument index="0" name="meta" type="Nil">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
+ <constant name="ALIGN_FILL" value="3">
+ </constant>
+ <constant name="LIST_NUMBERS" value="0">
+ </constant>
+ <constant name="LIST_LETTERS" value="1">
+ </constant>
+ <constant name="LIST_DOTS" value="2">
+ </constant>
+ <constant name="ITEM_FRAME" value="0">
+ </constant>
+ <constant name="ITEM_TEXT" value="1">
+ </constant>
+ <constant name="ITEM_IMAGE" value="2">
+ </constant>
+ <constant name="ITEM_NEWLINE" value="3">
+ </constant>
+ <constant name="ITEM_FONT" value="4">
+ </constant>
+ <constant name="ITEM_COLOR" value="5">
+ </constant>
+ <constant name="ITEM_UNDERLINE" value="6">
+ </constant>
+ <constant name="ITEM_ALIGN" value="7">
+ </constant>
+ <constant name="ITEM_INDENT" value="8">
+ </constant>
+ <constant name="ITEM_LIST" value="9">
+ </constant>
+ <constant name="ITEM_META" value="11">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="bold_font" type="Font">
+ </theme_item>
+ <theme_item name="bold_italics_font" type="Font">
+ </theme_item>
+ <theme_item name="default_color" type="Color">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font_color_selected" type="Color">
+ </theme_item>
+ <theme_item name="italics_font" type="Font">
+ </theme_item>
+ <theme_item name="line_separation" type="int">
+ </theme_item>
+ <theme_item name="mono_font" type="Font">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="normal_font" type="Font">
+ </theme_item>
+ <theme_item name="selection_color" type="Color">
+ </theme_item>
+ <theme_item name="table_hseparation" type="int">
+ </theme_item>
+ <theme_item name="table_vseparation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
new file mode 100644
index 0000000000..fc9d241e35
--- /dev/null
+++ b/doc/classes/RigidBody.xml
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Rigid body node.
+ </brief_description>
+ <description>
+ Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_integrate_forces" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="PhysicsDirectBodyState">
+ </argument>
+ <description>
+ Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
+ </description>
+ </method>
+ <method name="apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <argument index="1" name="impulse" type="Vector3">
+ </argument>
+ <description>
+ Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
+ <method name="get_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body angular damp. Default is -1.
+ </description>
+ </method>
+ <method name="get_angular_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the current body angular velocity.
+ </description>
+ </method>
+ <method name="get_axis_lock" qualifiers="const">
+ <return type="int" enum="RigidBody.AxisLock">
+ </return>
+ <description>
+ Return the current axis lock of the body. One of AXIS_LOCK_* enum.
+ </description>
+ </method>
+ <method name="get_bounce" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body bounciness.
+ </description>
+ </method>
+ <method name="get_colliding_bodies" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it.
+ </description>
+ </method>
+ <method name="get_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body friction, from 0 (frictionless) to 1 (max friction).
+ </description>
+ </method>
+ <method name="get_gravity_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body gravity scale.
+ </description>
+ </method>
+ <method name="get_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body linear damp. Default is -1.
+ </description>
+ </method>
+ <method name="get_linear_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the current body linear velocity.
+ </description>
+ </method>
+ <method name="get_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body mass.
+ </description>
+ </method>
+ <method name="get_max_contacts_reported" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="RigidBody.Mode">
+ </return>
+ <description>
+ Return the current body mode, see [method set_mode].
+ </description>
+ </method>
+ <method name="get_weight" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the current body weight, given standard earth-weight (gravity 9.8).
+ </description>
+ </method>
+ <method name="is_able_to_sleep" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep].
+ </description>
+ </method>
+ <method name="is_contact_monitor_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether contact monitoring is enabled.
+ </description>
+ </method>
+ <method name="is_sleeping" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the body is sleeping.
+ </description>
+ </method>
+ <method name="is_using_continuous_collision_detection" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this body is using continuous collision detection.
+ </description>
+ </method>
+ <method name="is_using_custom_integrator">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the body is using a custom integrator.
+ </description>
+ </method>
+ <method name="set_angular_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_damp" type="float">
+ </argument>
+ <description>
+ Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
+ </description>
+ </method>
+ <method name="set_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_velocity" type="Vector3">
+ </argument>
+ <description>
+ Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ </description>
+ </method>
+ <method name="set_axis_lock">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis_lock" type="int" enum="RigidBody.AxisLock">
+ </argument>
+ <description>
+ Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes.
+ </description>
+ </method>
+ <method name="set_axis_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis_velocity" type="Vector3">
+ </argument>
+ <description>
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ </description>
+ </method>
+ <method name="set_bounce">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounce" type="float">
+ </argument>
+ <description>
+ Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness).
+ </description>
+ </method>
+ <method name="set_can_sleep">
+ <return type="void">
+ </return>
+ <argument index="0" name="able_to_sleep" type="bool">
+ </argument>
+ <description>
+ Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
+ Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ </description>
+ </method>
+ <method name="set_contact_monitor">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enable contact monitoring. This allows the body to emit signals when it collides with another.
+ </description>
+ </method>
+ <method name="set_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="friction" type="float">
+ </argument>
+ <description>
+ Set the body friction, from 0 (frictionless) to 1 (max friction).
+ </description>
+ </method>
+ <method name="set_gravity_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="gravity_scale" type="float">
+ </argument>
+ <description>
+ Set the gravity factor. This factor multiplies gravity intensity just for this body.
+ </description>
+ </method>
+ <method name="set_linear_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_damp" type="float">
+ </argument>
+ <description>
+ Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ </description>
+ </method>
+ <method name="set_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_velocity" type="Vector3">
+ </argument>
+ <description>
+ Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ </description>
+ </method>
+ <method name="set_mass">
+ <return type="void">
+ </return>
+ <argument index="0" name="mass" type="float">
+ </argument>
+ <description>
+ Set the body mass.
+ </description>
+ </method>
+ <method name="set_max_contacts_reported">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody.Mode">
+ </argument>
+ <description>
+ Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
+ </description>
+ </method>
+ <method name="set_sleeping">
+ <return type="void">
+ </return>
+ <argument index="0" name="sleeping" type="bool">
+ </argument>
+ <description>
+ Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body.
+ </description>
+ </method>
+ <method name="set_use_continuous_collision_detection">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the continuous collision detection mode from the enum CCD_MODE_*.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ </description>
+ </method>
+ <method name="set_use_custom_integrator">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ </description>
+ </method>
+ <method name="set_weight">
+ <return type="void">
+ </return>
+ <argument index="0" name="weight" type="float">
+ </argument>
+ <description>
+ Set the body weight given standard earth-weight (gravity 9.8).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ Dampens rotational forces of the Rigid body by the 'angular_damp' rate.
+ </member>
+ <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity">
+ The current rotational velocity of the Rigid body
+ </member>
+ <member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" enum="RigidBody.AxisLock">
+ Locks the rotational forces to a particular axis, preventing rotations on other axes.
+ </member>
+ <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ Bounciness of the Rigid body.
+ </member>
+ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep">
+ If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used.
+ </member>
+ <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled">
+ If true, the Rigid body will emit signals when it collides with another Rigid body.
+ </member>
+ <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported">
+ The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ </member>
+ <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection">
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ </member>
+ <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator">
+ If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction">
+ The body friction, from 0 (frictionless) to 1 (max friction).
+ </member>
+ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale">
+ The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project &gt; Project Settings &gt; Physics &gt; 3d". A value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ </member>
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ </member>
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity">
+ The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass">
+ The body mass.
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody.Mode">
+ The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER.
+ </member>
+ <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping">
+ The current 'sleeping' state of the Rigid body.
+ </member>
+ <member name="weight" type="float" setter="set_weight" getter="get_weight">
+ The body weight given standard earth-weight (gravity 9.8).
+ </member>
+ </members>
+ <signals>
+ <signal name="body_entered">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ </description>
+ </signal>
+ <signal name="body_exited">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ </description>
+ </signal>
+ <signal name="body_shape_entered">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="local_shape" type="int">
+ </argument>
+ <description>
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
+ </description>
+ </signal>
+ <signal name="body_shape_exited">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="local_shape" type="int">
+ </argument>
+ <description>
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
+ </description>
+ </signal>
+ <signal name="sleeping_state_changed">
+ <description>
+ Emitted when the body changes its sleeping state. Either by sleeping or waking up.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MODE_STATIC" value="1">
+ Static mode. The body behaves like a [StaticBody], and can only move by user code.
+ </constant>
+ <constant name="MODE_KINEMATIC" value="3">
+ Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
+ </constant>
+ <constant name="MODE_RIGID" value="0">
+ Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ </constant>
+ <constant name="MODE_CHARACTER" value="2">
+ Character body. This behaves like a rigid body, but can not rotate.
+ </constant>
+ <constant name="AXIS_LOCK_DISABLED" value="0">
+ </constant>
+ <constant name="AXIS_LOCK_X" value="1">
+ </constant>
+ <constant name="AXIS_LOCK_Y" value="2">
+ </constant>
+ <constant name="AXIS_LOCK_Z" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
new file mode 100644
index 0000000000..e92c417323
--- /dev/null
+++ b/doc/classes/RigidBody2D.xml
@@ -0,0 +1,489 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Rigid body 2D node.
+ </brief_description>
+ <description>
+ Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static.
+ Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node.
+ As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_integrate_forces" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="Physics2DDirectBodyState">
+ </argument>
+ <description>
+ Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
+ </description>
+ </method>
+ <method name="add_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <argument index="1" name="force" type="Vector2">
+ </argument>
+ <description>
+ Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
+ <method name="apply_impulse">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <argument index="1" name="impulse" type="Vector2">
+ </argument>
+ <description>
+ Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
+ <method name="get_angular_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the angular damp for this body.
+ </description>
+ </method>
+ <method name="get_angular_velocity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity].
+ </description>
+ </method>
+ <method name="get_applied_force" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the applied force vector.
+ </description>
+ </method>
+ <method name="get_applied_torque" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the torque which is being applied to this body.
+ </description>
+ </method>
+ <method name="get_bounce" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body bounciness.
+ </description>
+ </method>
+ <method name="get_colliding_bodies" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. You must also enable contact monitor, see [method set_contact_monitor]
+ </description>
+ </method>
+ <method name="get_continuous_collision_detection_mode" qualifiers="const">
+ <return type="int" enum="RigidBody2D.CCDMode">
+ </return>
+ <description>
+ Return whether this body is using continuous collision detection.
+ </description>
+ </method>
+ <method name="get_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body friction.
+ </description>
+ </method>
+ <method name="get_gravity_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the gravity factor.
+ </description>
+ </method>
+ <method name="get_inertia" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet.
+ </description>
+ </method>
+ <method name="get_linear_damp" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the linear damp for this body.
+ </description>
+ </method>
+ <method name="get_linear_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity].
+ </description>
+ </method>
+ <method name="get_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body mass.
+ </description>
+ </method>
+ <method name="get_max_contacts_reported" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the maximum contacts that can be reported. See [method set_max_contacts_reported].
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="RigidBody2D.Mode">
+ </return>
+ <description>
+ Return the current body mode, see [method set_mode].
+ </description>
+ </method>
+ <method name="get_weight" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body weight given standard earth-weight (gravity 9.8).
+ </description>
+ </method>
+ <method name="is_able_to_sleep" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep].
+ </description>
+ </method>
+ <method name="is_contact_monitor_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether contact monitoring is enabled.
+ </description>
+ </method>
+ <method name="is_sleeping" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the body is sleeping.
+ </description>
+ </method>
+ <method name="is_using_custom_integrator">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the body is not doing any built-in force integration.
+ </description>
+ </method>
+ <method name="set_angular_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_damp" type="float">
+ </argument>
+ <description>
+ Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden.
+ </description>
+ </method>
+ <method name="set_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="angular_velocity" type="float">
+ </argument>
+ <description>
+ Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ </description>
+ </method>
+ <method name="set_applied_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="Vector2">
+ </argument>
+ <description>
+ Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly.
+ </description>
+ </method>
+ <method name="set_applied_torque">
+ <return type="void">
+ </return>
+ <argument index="0" name="torque" type="float">
+ </argument>
+ <description>
+ Set a constant torque which will be applied to this body.
+ </description>
+ </method>
+ <method name="set_axis_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis_velocity" type="Vector2">
+ </argument>
+ <description>
+ Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
+ </description>
+ </method>
+ <method name="set_bounce">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounce" type="float">
+ </argument>
+ <description>
+ Set the body bounciness, from 0 (no bounce) to 1 (full bounce).
+ </description>
+ </method>
+ <method name="set_can_sleep">
+ <return type="void">
+ </return>
+ <argument index="0" name="able_to_sleep" type="bool">
+ </argument>
+ <description>
+ Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene.
+ Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ </description>
+ </method>
+ <method name="set_contact_monitor">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enable contact monitoring. This allows the body to emit signals when it collides with another.
+ </description>
+ </method>
+ <method name="set_continuous_collision_detection_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody2D.CCDMode">
+ </argument>
+ <description>
+ Set the continuous collision detection mode from the enum CCD_MODE_*.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ </description>
+ </method>
+ <method name="set_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="friction" type="float">
+ </argument>
+ <description>
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
+ </description>
+ </method>
+ <method name="set_gravity_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="gravity_scale" type="float">
+ </argument>
+ <description>
+ Set the gravity factor. This factor multiplies gravity intensity just for this body.
+ </description>
+ </method>
+ <method name="set_inertia">
+ <return type="void">
+ </return>
+ <argument index="0" name="inertia" type="float">
+ </argument>
+ <description>
+ Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it.
+ </description>
+ </method>
+ <method name="set_linear_damp">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_damp" type="float">
+ </argument>
+ <description>
+ Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ </description>
+ </method>
+ <method name="set_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="linear_velocity" type="Vector2">
+ </argument>
+ <description>
+ Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state.
+ </description>
+ </method>
+ <method name="set_mass">
+ <return type="void">
+ </return>
+ <argument index="0" name="mass" type="float">
+ </argument>
+ <description>
+ Set the body mass.
+ </description>
+ </method>
+ <method name="set_max_contacts_reported">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody2D.Mode">
+ </argument>
+ <description>
+ Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
+ </description>
+ </method>
+ <method name="set_sleeping">
+ <return type="void">
+ </return>
+ <argument index="0" name="sleeping" type="bool">
+ </argument>
+ <description>
+ Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body.
+ </description>
+ </method>
+ <method name="set_use_custom_integrator">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ </description>
+ </method>
+ <method name="set_weight">
+ <return type="void">
+ </return>
+ <argument index="0" name="weight" type="float">
+ </argument>
+ <description>
+ Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels.
+ </description>
+ </method>
+ <method name="test_motion">
+ <return type="bool">
+ </return>
+ <argument index="0" name="motion" type="Vector2">
+ </argument>
+ <argument index="1" name="margin" type="float" default="0.08">
+ </argument>
+ <argument index="2" name="result" type="Physics2DTestMotionResult" default="null">
+ </argument>
+ <description>
+ Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ </member>
+ <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
+ </member>
+ <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ </member>
+ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep">
+ </member>
+ <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled">
+ </member>
+ <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported">
+ </member>
+ <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode">
+ </member>
+ <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator">
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction">
+ </member>
+ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale">
+ </member>
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ </member>
+ <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity">
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass">
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode">
+ </member>
+ <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping">
+ </member>
+ <member name="weight" type="float" setter="set_weight" getter="get_weight">
+ </member>
+ </members>
+ <signals>
+ <signal name="body_entered">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ </description>
+ </signal>
+ <signal name="body_exited">
+ <argument index="0" name="body" type="Object">
+ </argument>
+ <description>
+ Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ </description>
+ </signal>
+ <signal name="body_shape_entered">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="local_shape" type="int">
+ </argument>
+ <description>
+ Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with.
+ </description>
+ </signal>
+ <signal name="body_shape_exited">
+ <argument index="0" name="body_id" type="int">
+ </argument>
+ <argument index="1" name="body" type="Object">
+ </argument>
+ <argument index="2" name="body_shape" type="int">
+ </argument>
+ <argument index="3" name="local_shape" type="int">
+ </argument>
+ <description>
+ Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work.
+ This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with.
+ </description>
+ </signal>
+ <signal name="sleeping_state_changed">
+ <description>
+ Emitted when the body changes its sleeping state. Either by sleeping or waking up.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="MODE_STATIC" value="1">
+ Static mode. The body behaves like a [StaticBody2D], and can only move by user code.
+ </constant>
+ <constant name="MODE_KINEMATIC" value="3">
+ Kinematic body. The body behaves like a [KinematicBody2D], and can only move by user code.
+ </constant>
+ <constant name="MODE_RIGID" value="0">
+ Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ </constant>
+ <constant name="MODE_CHARACTER" value="2">
+ Character body. This behaves like a rigid body, but can not rotate.
+ </constant>
+ <constant name="CCD_MODE_DISABLED" value="0">
+ Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
+ </constant>
+ <constant name="CCD_MODE_CAST_RAY" value="1">
+ Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise.
+ </constant>
+ <constant name="CCD_MODE_CAST_SHAPE" value="2">
+ Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
new file mode 100644
index 0000000000..967c3fbad6
--- /dev/null
+++ b/doc/classes/SceneState.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SceneState" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_connection_binds" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_method" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_signal" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_source" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_connection_target" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_groups" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_instance" qualifiers="const">
+ <return type="PackedScene">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_instance_placeholder" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_owner_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="for_parent" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_property_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_property_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="prop_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_property_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="prop_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_node_instance_placeholder" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="GEN_EDIT_STATE_DISABLED" value="0">
+ </constant>
+ <constant name="GEN_EDIT_STATE_INSTANCE" value="1">
+ </constant>
+ <constant name="GEN_EDIT_STATE_MAIN" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
new file mode 100644
index 0000000000..c40d9339d1
--- /dev/null
+++ b/doc/classes/SceneTree.xml
@@ -0,0 +1,408 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SceneTree" inherits="MainLoop" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="call_group" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="call_group_flags" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <argument index="1" name="group" type="String">
+ </argument>
+ <argument index="2" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="change_scene">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="change_scene_to">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="packed_scene" type="PackedScene">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="create_timer">
+ <return type="SceneTreeTimer">
+ </return>
+ <argument index="0" name="time_sec" type="float">
+ </argument>
+ <argument index="1" name="pause_mode_process" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_current_scene" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edited_scene_root" qualifiers="const">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_network_connected_peers" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_network_unique_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_nodes_in_group">
+ <return type="Array">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_root" qualifiers="const">
+ <return type="Viewport">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rpc_sender_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_group" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_network_peer" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if there is a [NetworkedMultiplayerPeer] set (with [method SceneTree.set_network_peer]).
+ </description>
+ </method>
+ <method name="is_debugging_collisions_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_debugging_navigation_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_input_handled">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_network_server" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections).
+ </description>
+ </method>
+ <method name="is_paused" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_refusing_new_network_connections" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="notify_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <argument index="1" name="notification" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="notify_group_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="call_flags" type="int">
+ </argument>
+ <argument index="1" name="group" type="String">
+ </argument>
+ <argument index="2" name="notification" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="queue_delete">
+ <return type="void">
+ </return>
+ <argument index="0" name="obj" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="quit">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="reload_current_scene">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_auto_accept_quit">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_current_scene">
+ <return type="void">
+ </return>
+ <argument index="0" name="child_node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_debug_collisions_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_debug_navigation_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_edited_scene_root">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_group_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="call_flags" type="int">
+ </argument>
+ <argument index="1" name="group" type="String">
+ </argument>
+ <argument index="2" name="property" type="String">
+ </argument>
+ <argument index="3" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_input_as_handled">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_network_peer">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer" type="NetworkedMultiplayerPeer">
+ </argument>
+ <description>
+ Set the peer object to handle the RPC system (effectively enabling networking). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals.
+ </description>
+ </method>
+ <method name="set_pause">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_refuse_new_network_connections">
+ <return type="void">
+ </return>
+ <argument index="0" name="refuse" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_screen_stretch">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
+ </argument>
+ <argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
+ </argument>
+ <argument index="2" name="minsize" type="Vector2">
+ </argument>
+ <argument index="3" name="shrink" type="int" default="1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="connected_to_server">
+ <description>
+ </description>
+ </signal>
+ <signal name="connection_failed">
+ <description>
+ </description>
+ </signal>
+ <signal name="files_dropped">
+ <argument index="0" name="files" type="PoolStringArray">
+ </argument>
+ <argument index="1" name="screen" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="fixed_frame">
+ <description>
+ </description>
+ </signal>
+ <signal name="idle_frame">
+ <description>
+ </description>
+ </signal>
+ <signal name="network_peer_connected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="network_peer_disconnected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="node_configuration_warning_changed">
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="node_removed">
+ <argument index="0" name="node" type="Object">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="screen_resized">
+ <description>
+ </description>
+ </signal>
+ <signal name="server_disconnected">
+ <description>
+ </description>
+ </signal>
+ <signal name="tree_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="GROUP_CALL_DEFAULT" value="0">
+ </constant>
+ <constant name="GROUP_CALL_REVERSE" value="1">
+ </constant>
+ <constant name="GROUP_CALL_REALTIME" value="2">
+ </constant>
+ <constant name="GROUP_CALL_UNIQUE" value="4">
+ </constant>
+ <constant name="STRETCH_MODE_DISABLED" value="0">
+ </constant>
+ <constant name="STRETCH_MODE_2D" value="1">
+ </constant>
+ <constant name="STRETCH_MODE_VIEWPORT" value="2">
+ </constant>
+ <constant name="STRETCH_ASPECT_IGNORE" value="0">
+ </constant>
+ <constant name="STRETCH_ASPECT_KEEP" value="1">
+ </constant>
+ <constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2">
+ </constant>
+ <constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
new file mode 100644
index 0000000000..276c6857ae
--- /dev/null
+++ b/doc/classes/SceneTreeTimer.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_time_left" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_time_left">
+ <return type="void">
+ </return>
+ <argument index="0" name="time" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="timeout">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
new file mode 100644
index 0000000000..307afba8a7
--- /dev/null
+++ b/doc/classes/Script.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Script" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A class stored as a resource.
+ </brief_description>
+ <description>
+ A class stored as a resource. The script exends the functionality of all objects that instance it.
+ The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="can_instance" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the script can be instanced.
+ </description>
+ </method>
+ <method name="get_node_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_source_code" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the script source code, or an empty string if source code is not available.
+ </description>
+ </method>
+ <method name="has_script_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="signal_name" type="String">
+ </argument>
+ <description>
+ Returns true if the script, or a base class, defines a signal with the given name.
+ </description>
+ </method>
+ <method name="has_source_code" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the script contains non-empty source code.
+ </description>
+ </method>
+ <method name="instance_has" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="base_object" type="Object">
+ </argument>
+ <description>
+ Returns true if 'base_object' is an instance of this script.
+ </description>
+ </method>
+ <method name="is_tool" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the script is a tool script. A tool script can run in the editor.
+ </description>
+ </method>
+ <method name="reload">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="keep_state" type="bool" default="false">
+ </argument>
+ <description>
+ Reloads the script's class implementation. Returns an error code.
+ </description>
+ </method>
+ <method name="set_source_code">
+ <return type="void">
+ </return>
+ <argument index="0" name="source" type="String">
+ </argument>
+ <description>
+ Sets the script source code. Does not reload the class implementation.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
new file mode 100644
index 0000000000..e93a0eda0c
--- /dev/null
+++ b/doc/classes/ScriptEditor.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_current_script">
+ <return type="Script">
+ </return>
+ <description>
+ Returns a [Script] that is currently active in editor.
+ </description>
+ </method>
+ <method name="get_open_scripts" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array with all [Script] objects which are currently open in editor.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="editor_script_changed">
+ <argument index="0" name="script" type="Object">
+ </argument>
+ <description>
+ Emitted when user changed active script. Argument is a freshly activated [Script].
+ </description>
+ </signal>
+ <signal name="script_close">
+ <argument index="0" name="script" type="Object">
+ </argument>
+ <description>
+ Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
new file mode 100644
index 0000000000..7a10d3679e
--- /dev/null
+++ b/doc/classes/ScrollBar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ScrollBar" inherits="Range" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for scroll bars.
+ </brief_description>
+ <description>
+ Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_custom_step" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_step">
+ <return type="void">
+ </return>
+ <argument index="0" name="step" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step">
+ </member>
+ </members>
+ <signals>
+ <signal name="scrolling">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
new file mode 100644
index 0000000000..1ae06bde70
--- /dev/null
+++ b/doc/classes/ScrollContainer.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ScrollContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A helper node for displaying scrollable elements (e.g. lists).
+ </brief_description>
+ <description>
+ A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_h_scroll" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return current horizontal scroll value.
+ </description>
+ </method>
+ <method name="get_v_scroll" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return current vertical scroll value.
+ </description>
+ </method>
+ <method name="is_h_scroll_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if horizontal scroll is allowed.
+ </description>
+ </method>
+ <method name="is_v_scroll_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if vertical scroll is allowed.
+ </description>
+ </method>
+ <method name="set_enable_h_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set allows horizontal scroll.
+ </description>
+ </method>
+ <method name="set_enable_v_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set allows vertical scroll.
+ </description>
+ </method>
+ <method name="set_h_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Set horizontal scroll value.
+ </description>
+ </method>
+ <method name="set_v_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Set vertical scroll value.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="scroll_horizontal" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled">
+ </member>
+ <member name="scroll_vertical" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
new file mode 100644
index 0000000000..3b7a747bcb
--- /dev/null
+++ b/doc/classes/SegmentShape2D.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Segment shape for 2D collisions.
+ </brief_description>
+ <description>
+ Segment shape for 2D collisions. Consists of two points, [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_a" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the first point's position.
+ </description>
+ </method>
+ <method name="get_b" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the second point's position.
+ </description>
+ </method>
+ <method name="set_a">
+ <return type="void">
+ </return>
+ <argument index="0" name="a" type="Vector2">
+ </argument>
+ <description>
+ Set the first point's position.
+ </description>
+ </method>
+ <method name="set_b">
+ <return type="void">
+ </return>
+ <argument index="0" name="b" type="Vector2">
+ </argument>
+ <description>
+ Set the second point's position.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="a" type="Vector2" setter="set_a" getter="get_a">
+ The segment's first point position.
+ </member>
+ <member name="b" type="Vector2" setter="set_b" getter="get_b">
+ The segment's second point position.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
new file mode 100644
index 0000000000..0aeb6472af
--- /dev/null
+++ b/doc/classes/Semaphore.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Semaphore" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A synchronization Semaphore.
+ </brief_description>
+ <description>
+ A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="post">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Lowers the [Semaphore], allowing one more thread in.
+ </description>
+ </method>
+ <method name="wait">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
new file mode 100644
index 0000000000..4bbabe58aa
--- /dev/null
+++ b/doc/classes/Separator.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Separator" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for separators.
+ </brief_description>
+ <description>
+ Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
new file mode 100644
index 0000000000..75644c31ab
--- /dev/null
+++ b/doc/classes/Shader.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Shader" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ To be changed, ignore.
+ </brief_description>
+ <description>
+ To be changed, ignore.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_code" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_default_texture_param" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="param" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="Shader.Mode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_param" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_code">
+ <return type="void">
+ </return>
+ <argument index="0" name="code" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_default_texture_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="String">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="code" type="String" setter="set_code" getter="get_code">
+ </member>
+ </members>
+ <constants>
+ <constant name="MODE_SPATIAL" value="0">
+ </constant>
+ <constant name="MODE_CANVAS_ITEM" value="1">
+ </constant>
+ <constant name="MODE_PARTICLES" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
new file mode 100644
index 0000000000..8bd9f1039e
--- /dev/null
+++ b/doc/classes/ShaderMaterial.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShaderMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_shader" qualifiers="const">
+ <return type="Shader">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shader_param" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="param" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shader">
+ <return type="void">
+ </return>
+ <argument index="0" name="shader" type="Shader">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shader_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
new file mode 100644
index 0000000000..8e6e12a736
--- /dev/null
+++ b/doc/classes/Shape.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Shape" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
new file mode 100644
index 0000000000..d5e2984ba0
--- /dev/null
+++ b/doc/classes/Shape2D.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Shape2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for all 2D Shapes.
+ </brief_description>
+ <description>
+ Base class for all 2D Shapes. All 2D shape types inherit from this.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="collide">
+ <return type="bool">
+ </return>
+ <argument index="0" name="local_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="with_shape" type="Shape2D">
+ </argument>
+ <argument index="2" name="shape_xform" type="Transform2D">
+ </argument>
+ <description>
+ Return whether this shape is colliding with another.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ </description>
+ </method>
+ <method name="collide_and_get_contacts">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="local_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="with_shape" type="Shape2D">
+ </argument>
+ <argument index="2" name="shape_xform" type="Transform2D">
+ </argument>
+ <description>
+ Return a list of the points where this shape touches another. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ </description>
+ </method>
+ <method name="collide_with_motion">
+ <return type="bool">
+ </return>
+ <argument index="0" name="local_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="local_motion" type="Vector2">
+ </argument>
+ <argument index="2" name="with_shape" type="Shape2D">
+ </argument>
+ <argument index="3" name="shape_xform" type="Transform2D">
+ </argument>
+ <argument index="4" name="shape_motion" type="Vector2">
+ </argument>
+ <description>
+ Return whether this shape would collide with another, if a given movement was applied.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ </description>
+ </method>
+ <method name="collide_with_motion_and_get_contacts">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="local_xform" type="Transform2D">
+ </argument>
+ <argument index="1" name="local_motion" type="Vector2">
+ </argument>
+ <argument index="2" name="with_shape" type="Shape2D">
+ </argument>
+ <argument index="3" name="shape_xform" type="Transform2D">
+ </argument>
+ <argument index="4" name="shape_motion" type="Vector2">
+ </argument>
+ <description>
+ Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ </description>
+ </method>
+ <method name="get_custom_solver_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the custom solver bias.
+ </description>
+ </method>
+ <method name="set_custom_solver_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="float">
+ </argument>
+ <description>
+ Use a custom solver bias. No need to change this unless you really know what you are doing.
+ The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml
new file mode 100644
index 0000000000..e8b3b962d3
--- /dev/null
+++ b/doc/classes/ShortCut.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShortCut" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_as_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shortcut" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shortcut" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_shortcut">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml
new file mode 100644
index 0000000000..b5be340b77
--- /dev/null
+++ b/doc/classes/Skeleton.xml
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Skeleton" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Skeleton for characters and animated objects.
+ </brief_description>
+ <description>
+ Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_bone">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Add a bone, with name "name". [method get_bone_count] will become the bone index.
+ </description>
+ </method>
+ <method name="bind_child_node_to_bone">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="node" type="Node">
+ </argument>
+ <description>
+ Deprecated soon.
+ </description>
+ </method>
+ <method name="clear_bones">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the bones in this skeleton.
+ </description>
+ </method>
+ <method name="find_bone" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return the bone index that matches "name" as its name.
+ </description>
+ </method>
+ <method name="get_bone_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of bones in the skeleton.
+ </description>
+ </method>
+ <method name="get_bone_custom_pose" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_global_pose" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Return the name of the bone at index "index"
+ </description>
+ </method>
+ <method name="get_bone_parent" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
+ </description>
+ </method>
+ <method name="get_bone_pose" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Return the pose transform for bone "bone_idx".
+ </description>
+ </method>
+ <method name="get_bone_rest" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Return the rest transform for a bone "bone_idx".
+ </description>
+ </method>
+ <method name="get_bone_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_bound_child_nodes_to_bone" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Deprecated soon.
+ </description>
+ </method>
+ <method name="is_bone_rest_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_custom_pose">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="custom_pose" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_disable_rest">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_global_pose">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="pose" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_parent">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="parent_idx" type="int">
+ </argument>
+ <description>
+ Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
+ </description>
+ </method>
+ <method name="set_bone_pose">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="pose" type="Transform">
+ </argument>
+ <description>
+ Return the pose transform for bone "bone_idx".
+ </description>
+ </method>
+ <method name="set_bone_rest">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="rest" type="Transform">
+ </argument>
+ <description>
+ Set the rest transform for bone "bone_idx"
+ </description>
+ </method>
+ <method name="unbind_child_node_from_bone">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="node" type="Node">
+ </argument>
+ <description>
+ Deprecated soon.
+ </description>
+ </method>
+ <method name="unparent_bone_and_rest">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="NOTIFICATION_UPDATE_SKELETON" value="50" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
new file mode 100644
index 0000000000..3045167346
--- /dev/null
+++ b/doc/classes/Sky.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Sky" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_radiance_size" qualifiers="const">
+ <return type="int" enum="Sky.RadianceSize">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_radiance_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int" enum="Sky.RadianceSize">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize">
+ </member>
+ </members>
+ <constants>
+ <constant name="RADIANCE_SIZE_32" value="0">
+ </constant>
+ <constant name="RADIANCE_SIZE_64" value="1">
+ </constant>
+ <constant name="RADIANCE_SIZE_128" value="2">
+ </constant>
+ <constant name="RADIANCE_SIZE_256" value="3">
+ </constant>
+ <constant name="RADIANCE_SIZE_512" value="4">
+ </constant>
+ <constant name="RADIANCE_SIZE_1024" value="5">
+ </constant>
+ <constant name="RADIANCE_SIZE_2048" value="6">
+ </constant>
+ <constant name="RADIANCE_SIZE_MAX" value="7">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
new file mode 100644
index 0000000000..b9b2b98549
--- /dev/null
+++ b/doc/classes/Slider.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Slider" inherits="Range" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for GUI Sliders.
+ </brief_description>
+ <description>
+ Base class for GUI Sliders.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_ticks" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return amounts of ticks to display on slider.
+ </description>
+ </method>
+ <method name="get_ticks_on_borders" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if ticks are visible on borders.
+ </description>
+ </method>
+ <method name="is_editable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_editable">
+ <return type="void">
+ </return>
+ <argument index="0" name="editable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ticks">
+ <return type="void">
+ </return>
+ <argument index="0" name="count" type="int">
+ </argument>
+ <description>
+ Set amount of ticks to display in slider.
+ </description>
+ </method>
+ <method name="set_ticks_on_borders">
+ <return type="void">
+ </return>
+ <argument index="0" name="ticks_on_border" type="bool">
+ </argument>
+ <description>
+ Set true if ticks are visible on borders.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="editable" type="bool" setter="set_editable" getter="is_editable">
+ </member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode">
+ </member>
+ <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks">
+ </member>
+ <member name="ticks_on_borders" type="bool" setter="set_ticks_on_borders" getter="get_ticks_on_borders">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml
new file mode 100644
index 0000000000..617390b6a4
--- /dev/null
+++ b/doc/classes/SliderJoint.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SliderJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_param" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="param" type="int" enum="SliderJoint.Param">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="SliderJoint.Param">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_limit/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular">
+ </member>
+ <member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular">
+ </member>
+ <member name="angular_motion/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_motion/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_motion/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_ortho/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_ortho/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="angular_ortho/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_limit/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_limit/lower_distance" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_limit/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_limit/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_limit/upper_distance" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_motion/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_motion/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_motion/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_ortho/damping" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_ortho/restitution" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="linear_ortho/softness" type="float" setter="set_param" getter="get_param">
+ </member>
+ </members>
+ <constants>
+ <constant name="PARAM_LINEAR_LIMIT_UPPER" value="0">
+ </constant>
+ <constant name="PARAM_LINEAR_LIMIT_LOWER" value="1">
+ </constant>
+ <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2">
+ </constant>
+ <constant name="PARAM_LINEAR_LIMIT_RESTITUTION" value="3">
+ </constant>
+ <constant name="PARAM_LINEAR_LIMIT_DAMPING" value="4">
+ </constant>
+ <constant name="PARAM_LINEAR_MOTION_SOFTNESS" value="5">
+ </constant>
+ <constant name="PARAM_LINEAR_MOTION_RESTITUTION" value="6">
+ </constant>
+ <constant name="PARAM_LINEAR_MOTION_DAMPING" value="7">
+ </constant>
+ <constant name="PARAM_LINEAR_ORTHOGONAL_SOFTNESS" value="8">
+ </constant>
+ <constant name="PARAM_LINEAR_ORTHOGONAL_RESTITUTION" value="9">
+ </constant>
+ <constant name="PARAM_LINEAR_ORTHOGONAL_DAMPING" value="10">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_UPPER" value="11">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_LOWER" value="12">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="13">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_RESTITUTION" value="14">
+ </constant>
+ <constant name="PARAM_ANGULAR_LIMIT_DAMPING" value="15">
+ </constant>
+ <constant name="PARAM_ANGULAR_MOTION_SOFTNESS" value="16">
+ </constant>
+ <constant name="PARAM_ANGULAR_MOTION_RESTITUTION" value="17">
+ </constant>
+ <constant name="PARAM_ANGULAR_MOTION_DAMPING" value="18">
+ </constant>
+ <constant name="PARAM_ANGULAR_ORTHOGONAL_SOFTNESS" value="19">
+ </constant>
+ <constant name="PARAM_ANGULAR_ORTHOGONAL_RESTITUTION" value="20">
+ </constant>
+ <constant name="PARAM_ANGULAR_ORTHOGONAL_DAMPING" value="21">
+ </constant>
+ <constant name="PARAM_MAX" value="22">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
new file mode 100644
index 0000000000..e43e4dcc1b
--- /dev/null
+++ b/doc/classes/Spatial.xml
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Spatial" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Most basic 3D game object, parent of all 3D related nodes.
+ </brief_description>
+ <description>
+ Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_gizmo" qualifiers="const">
+ <return type="SpatialGizmo">
+ </return>
+ <description>
+ Returns the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
+ </description>
+ </method>
+ <method name="get_global_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the global transform, relative to worldspace.
+ </description>
+ </method>
+ <method name="get_parent_spatial" qualifiers="const">
+ <return type="Spatial">
+ </return>
+ <description>
+ Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
+ </description>
+ </method>
+ <method name="get_rotation" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the rotation (in radians).
+ </description>
+ </method>
+ <method name="get_rotation_deg" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the rotation (in degrees).
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the local transform, relative to the bone parent.
+ </description>
+ </method>
+ <method name="get_translation" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_world" qualifiers="const">
+ <return type="World">
+ </return>
+ <description>
+ Returns the current [World] resource this Spatial node is registered to.
+ </description>
+ </method>
+ <method name="global_rotate">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <argument index="1" name="radians" type="float">
+ </argument>
+ <description>
+ Rotates the current node along normal [Vector3] by angle in radians in Global space.
+ </description>
+ </method>
+ <method name="global_translate">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector3">
+ </argument>
+ <description>
+ Moves the node by [Vector3] offset in Global space.
+ </description>
+ </method>
+ <method name="hide">
+ <return type="void">
+ </return>
+ <description>
+ Disables rendering of this node. Change Spatial Visible property to false.
+ </description>
+ </method>
+ <method name="is_local_transform_notification_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether node notifies about its local transformation changes. Spatial will not propagate this by default.
+ </description>
+ </method>
+ <method name="is_set_as_toplevel" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations.
+ </description>
+ </method>
+ <method name="is_transform_notification_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default.
+ </description>
+ </method>
+ <method name="is_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the node is set to be visible.
+ </description>
+ </method>
+ <method name="is_visible_in_tree" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the node is visible, taking into consideration that its parents visibility.
+ </description>
+ </method>
+ <method name="look_at">
+ <return type="void">
+ </return>
+ <argument index="0" name="target" type="Vector3">
+ </argument>
+ <argument index="1" name="up" type="Vector3">
+ </argument>
+ <description>
+ Rotates itself to point into direction of target position. Operations take place in global space.
+ </description>
+ </method>
+ <method name="look_at_from_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector3">
+ </argument>
+ <argument index="1" name="target" type="Vector3">
+ </argument>
+ <argument index="2" name="up" type="Vector3">
+ </argument>
+ <description>
+ Moves the node to specified position and then rotates itself to point into direction of target position. Operations take place in global space.
+ </description>
+ </method>
+ <method name="orthonormalize">
+ <return type="void">
+ </return>
+ <description>
+ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D].
+ </description>
+ </method>
+ <method name="rotate">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <argument index="1" name="radians" type="float">
+ </argument>
+ <description>
+ Rotates the node in local space on given normal [Vector3] by angle in radians.
+ </description>
+ </method>
+ <method name="rotate_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Rotates the node in local space on X axis by angle in radians.
+ </description>
+ </method>
+ <method name="rotate_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Rotates the node in local space on Y axis by angle in radians.
+ </description>
+ </method>
+ <method name="rotate_z">
+ <return type="void">
+ </return>
+ <argument index="0" name="radians" type="float">
+ </argument>
+ <description>
+ Rotates the node in local space on Z axis by angle in radians.
+ </description>
+ </method>
+ <method name="set_as_toplevel">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Makes the node ignore its parents tranformations. Node tranformations are only in global space.
+ </description>
+ </method>
+ <method name="set_gizmo">
+ <return type="void">
+ </return>
+ <argument index="0" name="gizmo" type="SpatialGizmo">
+ </argument>
+ <description>
+ Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
+ </description>
+ </method>
+ <method name="set_global_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="global" type="Transform">
+ </argument>
+ <description>
+ Set the transform globally, relative to world space.
+ </description>
+ </method>
+ <method name="set_identity">
+ <return type="void">
+ </return>
+ <description>
+ Reset all tranformations for this node. Set its [Transform3D] to identity matrix.
+ </description>
+ </method>
+ <method name="set_ignore_transform_notification">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether the node ignores notification that its transformation (global or local) changed.
+ </description>
+ </method>
+ <method name="set_notify_local_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the node notifies about its local transformation changes. Spatial will not propagate this by default.
+ </description>
+ </method>
+ <method name="set_notify_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default.
+ </description>
+ </method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation_rad" type="Vector3">
+ </argument>
+ <description>
+ Set the rotation (in radians).
+ </description>
+ </method>
+ <method name="set_rotation_deg">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation_deg" type="Vector3">
+ </argument>
+ <description>
+ Set the rotation (in degrees).
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ Set the scale.
+ </description>
+ </method>
+ <method name="set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="local" type="Transform">
+ </argument>
+ <description>
+ Set the transform locally, relative to the parent spatial node.
+ </description>
+ </method>
+ <method name="set_translation">
+ <return type="void">
+ </return>
+ <argument index="0" name="translation" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="show">
+ <return type="void">
+ </return>
+ <description>
+ Enables rendering of this node. Change Spatial Visible property to "True".
+ </description>
+ </method>
+ <method name="to_global" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="local_point" type="Vector3">
+ </argument>
+ <description>
+ Tranforms [Vector3] "local_point" from this node's local space to world space.
+ </description>
+ </method>
+ <method name="to_local" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="global_point" type="Vector3">
+ </argument>
+ <description>
+ Tranforms [Vector3] "global_point" from world space to this node's local space.
+ </description>
+ </method>
+ <method name="translate">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector3">
+ </argument>
+ <description>
+ Changes the node's position by given offset [Vector3].
+ </description>
+ </method>
+ <method name="update_gizmo">
+ <return type="void">
+ </return>
+ <description>
+ Updates the [SpatialGizmo] of this node.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform">
+ World space (global) [Transform] of this node.
+ </member>
+ <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
+ Local euler rotation in radians of this node.
+ </member>
+ <member name="rotation_deg" type="Vector3" setter="set_rotation_deg" getter="get_rotation_deg">
+ Local euler rotation in degrees of this node.
+ </member>
+ <member name="scale" type="Vector3" setter="set_scale" getter="get_scale">
+ Local scale of this node.
+ </member>
+ <member name="transform" type="Transform" setter="set_transform" getter="get_transform">
+ Local space [Transform] of this node.
+ </member>
+ <member name="translation" type="Vector3" setter="set_translation" getter="get_translation">
+ Local translation of this node.
+ </member>
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible">
+ Visibility of this node. Toggles if this node is rendered.
+ </member>
+ </members>
+ <signals>
+ <signal name="visibility_changed">
+ <description>
+ Emitted when node visibility changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
+ Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
+ In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true).
+ </constant>
+ <constant name="NOTIFICATION_ENTER_WORLD" value="41" enum="">
+ Spatial nodes receives this notification when they are registered to new [World] resource.
+ </constant>
+ <constant name="NOTIFICATION_EXIT_WORLD" value="42" enum="">
+ Spatial nodes receives this notification when they are unregistered from current [World] resource.
+ </constant>
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum="">
+ Spatial nodes receives this notification when their visibility changes.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml
new file mode 100644
index 0000000000..1612e80500
--- /dev/null
+++ b/doc/classes/SpatialGizmo.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
new file mode 100644
index 0000000000..0f1c57e85b
--- /dev/null
+++ b/doc/classes/SpatialMaterial.xml
@@ -0,0 +1,1021 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpatialMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_albedo" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_alpha_scissor_threshold" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_anisotropy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_ao_texture_channel" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.TextureChannel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_billboard_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.BillboardMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.BlendMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_clearcoat" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_clearcoat_gloss" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cull_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.CullMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_depth_deep_parallax_max_layers" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_depth_deep_parallax_min_layers" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_depth_draw_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.DepthDrawMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_depth_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_detail_blend_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.BlendMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_detail_uv" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.DetailUV">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_diffuse_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.DiffuseMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_emission_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_feature" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_grow" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_line_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_metallic" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_metallic_texture_channel" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.TextureChannel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_particles_anim_h_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_particles_anim_loop" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_particles_anim_v_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_point_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_refraction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_refraction_texture_channel" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.TextureChannel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rim" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rim_tint" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_roughness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_roughness_texture_channel" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.TextureChannel">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_specular" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_specular_mode" qualifiers="const">
+ <return type="int" enum="SpatialMaterial.SpecularMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subsurface_scattering_strength" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_transmission" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv1_offset" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv1_scale" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv1_triplanar_blend_sharpness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv2_offset" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv2_scale" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_uv2_triplanar_blend_sharpness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_depth_deep_parallax_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_grow_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_albedo">
+ <return type="void">
+ </return>
+ <argument index="0" name="albedo" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_alpha_scissor_threshold">
+ <return type="void">
+ </return>
+ <argument index="0" name="threshold" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anisotropy">
+ <return type="void">
+ </return>
+ <argument index="0" name="anisotropy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ao_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_billboard_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SpatialMaterial.BillboardMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="blend_mode" type="int" enum="SpatialMaterial.BlendMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_clearcoat">
+ <return type="void">
+ </return>
+ <argument index="0" name="clearcoat" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_clearcoat_gloss">
+ <return type="void">
+ </return>
+ <argument index="0" name="clearcoat_gloss" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cull_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="cull_mode" type="int" enum="SpatialMaterial.CullMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth_deep_parallax">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth_deep_parallax_max_layers">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth_deep_parallax_min_layers">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth_draw_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth_draw_mode" type="int" enum="SpatialMaterial.DepthDrawMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_depth_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth_scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_detail_blend_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_blend_mode" type="int" enum="SpatialMaterial.BlendMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_detail_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_uv" type="int" enum="SpatialMaterial.DetailUV">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_diffuse_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="diffuse_mode" type="int" enum="SpatialMaterial.DiffuseMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission">
+ <return type="void">
+ </return>
+ <argument index="0" name="emission" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_emission_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="emission_energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_grow">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_grow_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_line_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="line_width" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_metallic">
+ <return type="void">
+ </return>
+ <argument index="0" name="metallic" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_metallic_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_normal_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal_scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_particles_anim_h_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_particles_anim_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_particles_anim_v_frames">
+ <return type="void">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_point_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="point_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_refraction">
+ <return type="void">
+ </return>
+ <argument index="0" name="refraction" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_refraction_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rim">
+ <return type="void">
+ </return>
+ <argument index="0" name="rim" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rim_tint">
+ <return type="void">
+ </return>
+ <argument index="0" name="rim_tint" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_roughness">
+ <return type="void">
+ </return>
+ <argument index="0" name="roughness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_roughness_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_specular">
+ <return type="void">
+ </return>
+ <argument index="0" name="specular" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_specular_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="specular_mode" type="int" enum="SpatialMaterial.SpecularMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_subsurface_scattering_strength">
+ <return type="void">
+ </return>
+ <argument index="0" name="strength" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_transmission">
+ <return type="void">
+ </return>
+ <argument index="0" name="transmission" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv1_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv1_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv1_triplanar_blend_sharpness">
+ <return type="void">
+ </return>
+ <argument index="0" name="sharpness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv2_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv2_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_uv2_triplanar_blend_sharpness">
+ <return type="void">
+ </return>
+ <argument index="0" name="sharpness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo">
+ </member>
+ <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy">
+ </member>
+ <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="SpatialMaterial.TextureChannel">
+ </member>
+ <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat">
+ </member>
+ <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss">
+ </member>
+ <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled">
+ </member>
+ <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers">
+ </member>
+ <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers">
+ </member>
+ <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale">
+ </member>
+ <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode">
+ </member>
+ <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV">
+ </member>
+ <member name="emission" type="Color" setter="set_emission" getter="get_emission">
+ </member>
+ <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy">
+ </member>
+ <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="metallic" type="float" setter="set_metallic" getter="get_metallic">
+ </member>
+ <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular">
+ </member>
+ <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel">
+ </member>
+ <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale">
+ </member>
+ <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold">
+ </member>
+ <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode">
+ </member>
+ <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="SpatialMaterial.BlendMode">
+ </member>
+ <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="SpatialMaterial.CullMode">
+ </member>
+ <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="SpatialMaterial.DepthDrawMode">
+ </member>
+ <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="SpatialMaterial.DiffuseMode">
+ </member>
+ <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled">
+ </member>
+ <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow">
+ </member>
+ <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width">
+ </member>
+ <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size">
+ </member>
+ <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="SpatialMaterial.SpecularMode">
+ </member>
+ <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
+ </member>
+ <member name="particles_anim_loop" type="int" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
+ </member>
+ <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
+ </member>
+ <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
+ </member>
+ <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="SpatialMaterial.TextureChannel">
+ </member>
+ <member name="rim" type="float" setter="set_rim" getter="get_rim">
+ </member>
+ <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint">
+ </member>
+ <member name="roughness" type="float" setter="set_roughness" getter="get_roughness">
+ </member>
+ <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel">
+ </member>
+ <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength">
+ </member>
+ <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission">
+ </member>
+ <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature">
+ </member>
+ <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset">
+ </member>
+ <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale">
+ </member>
+ <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness">
+ </member>
+ <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset">
+ </member>
+ <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale">
+ </member>
+ <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness">
+ </member>
+ <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag">
+ </member>
+ </members>
+ <constants>
+ <constant name="TEXTURE_ALBEDO" value="0">
+ </constant>
+ <constant name="TEXTURE_METALLIC" value="1">
+ </constant>
+ <constant name="TEXTURE_ROUGHNESS" value="2">
+ </constant>
+ <constant name="TEXTURE_EMISSION" value="3">
+ </constant>
+ <constant name="TEXTURE_NORMAL" value="4">
+ </constant>
+ <constant name="TEXTURE_RIM" value="5">
+ </constant>
+ <constant name="TEXTURE_CLEARCOAT" value="6">
+ </constant>
+ <constant name="TEXTURE_FLOWMAP" value="7">
+ </constant>
+ <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8">
+ </constant>
+ <constant name="TEXTURE_DEPTH" value="9">
+ </constant>
+ <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10">
+ </constant>
+ <constant name="TEXTURE_TRANSMISSION" value="11">
+ </constant>
+ <constant name="TEXTURE_REFRACTION" value="12">
+ </constant>
+ <constant name="TEXTURE_DETAIL_MASK" value="13">
+ </constant>
+ <constant name="TEXTURE_DETAIL_ALBEDO" value="14">
+ </constant>
+ <constant name="TEXTURE_DETAIL_NORMAL" value="15">
+ </constant>
+ <constant name="TEXTURE_MAX" value="16">
+ </constant>
+ <constant name="DETAIL_UV_1" value="0">
+ </constant>
+ <constant name="DETAIL_UV_2" value="1">
+ </constant>
+ <constant name="FEATURE_TRANSPARENT" value="0">
+ </constant>
+ <constant name="FEATURE_EMISSION" value="1">
+ </constant>
+ <constant name="FEATURE_NORMAL_MAPPING" value="2">
+ </constant>
+ <constant name="FEATURE_RIM" value="3">
+ </constant>
+ <constant name="FEATURE_CLEARCOAT" value="4">
+ </constant>
+ <constant name="FEATURE_ANISOTROPY" value="5">
+ </constant>
+ <constant name="FEATURE_AMBIENT_OCCLUSION" value="6">
+ </constant>
+ <constant name="FEATURE_DEPTH_MAPPING" value="7">
+ </constant>
+ <constant name="FEATURE_SUBSURACE_SCATTERING" value="8">
+ </constant>
+ <constant name="FEATURE_TRANSMISSION" value="9">
+ </constant>
+ <constant name="FEATURE_REFRACTION" value="10">
+ </constant>
+ <constant name="FEATURE_DETAIL" value="11">
+ </constant>
+ <constant name="FEATURE_MAX" value="12">
+ </constant>
+ <constant name="BLEND_MODE_MIX" value="0">
+ </constant>
+ <constant name="BLEND_MODE_ADD" value="1">
+ </constant>
+ <constant name="BLEND_MODE_SUB" value="2">
+ </constant>
+ <constant name="BLEND_MODE_MUL" value="3">
+ </constant>
+ <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0">
+ </constant>
+ <constant name="DEPTH_DRAW_ALWAYS" value="1">
+ </constant>
+ <constant name="DEPTH_DRAW_DISABLED" value="2">
+ </constant>
+ <constant name="DEPTH_DRAW_ALPHA_OPAQUE_PREPASS" value="3">
+ </constant>
+ <constant name="CULL_BACK" value="0">
+ </constant>
+ <constant name="CULL_FRONT" value="1">
+ </constant>
+ <constant name="CULL_DISABLED" value="2">
+ </constant>
+ <constant name="FLAG_UNSHADED" value="0">
+ </constant>
+ <constant name="FLAG_USE_VERTEX_LIGHTING" value="1">
+ </constant>
+ <constant name="FLAG_DISABLE_DEPTH_TEST" value="2">
+ </constant>
+ <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3">
+ </constant>
+ <constant name="FLAG_SRGB_VERTEX_COLOR" value="4">
+ </constant>
+ <constant name="FLAG_USE_POINT_SIZE" value="5">
+ </constant>
+ <constant name="FLAG_FIXED_SIZE" value="6">
+ </constant>
+ <constant name="FLAG_UV1_USE_TRIPLANAR" value="7">
+ </constant>
+ <constant name="FLAG_UV2_USE_TRIPLANAR" value="8">
+ </constant>
+ <constant name="FLAG_AO_ON_UV2" value="10">
+ </constant>
+ <constant name="FLAG_USE_ALPHA_SCISSOR" value="11">
+ </constant>
+ <constant name="FLAG_TRIPLANAR_USE_WORLD" value="9">
+ </constant>
+ <constant name="FLAG_MAX" value="12">
+ </constant>
+ <constant name="DIFFUSE_LAMBERT" value="0">
+ </constant>
+ <constant name="DIFFUSE_LAMBERT_WRAP" value="1">
+ </constant>
+ <constant name="DIFFUSE_OREN_NAYAR" value="2">
+ </constant>
+ <constant name="DIFFUSE_BURLEY" value="3">
+ </constant>
+ <constant name="DIFFUSE_TOON" value="4">
+ </constant>
+ <constant name="SPECULAR_SCHLICK_GGX" value="0">
+ </constant>
+ <constant name="SPECULAR_BLINN" value="1">
+ </constant>
+ <constant name="SPECULAR_PHONG" value="2">
+ </constant>
+ <constant name="SPECULAR_TOON" value="3">
+ </constant>
+ <constant name="SPECULAR_DISABLED" value="4">
+ </constant>
+ <constant name="BILLBOARD_DISABLED" value="0">
+ </constant>
+ <constant name="BILLBOARD_ENABLED" value="1">
+ </constant>
+ <constant name="BILLBOARD_FIXED_Y" value="2">
+ </constant>
+ <constant name="BILLBOARD_PARTICLES" value="3">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_RED" value="0">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GREEN" value="1">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_BLUE" value="2">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_ALPHA" value="3">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml
new file mode 100644
index 0000000000..2cbc2b9739
--- /dev/null
+++ b/doc/classes/SpatialVelocityTracker.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_tracked_linear_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_tracking_fixed_step" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="reset">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_track_fixed_step">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="update_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
new file mode 100644
index 0000000000..0ae48cb7d7
--- /dev/null
+++ b/doc/classes/SphereMesh.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class representing a spherical [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a spherical [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_is_hemisphere" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radial_segments" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rings" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_is_hemisphere">
+ <return type="void">
+ </return>
+ <argument index="0" name="is_hemisphere" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radial_segments">
+ <return type="void">
+ </return>
+ <argument index="0" name="radial_segments" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rings">
+ <return type="void">
+ </return>
+ <argument index="0" name="rings" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="height" type="float" setter="set_height" getter="get_height">
+ Full height of the sphere. Defaults to 2.0.
+ </member>
+ <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere">
+ Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere the height and radius of the sphere have to equal. Defaults to false.
+ </member>
+ <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments">
+ Number of radial segments on the sphere. Defaults to 64.
+ </member>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ Radius of sphere. Defaults to 1.0.
+ </member>
+ <member name="rings" type="int" setter="set_rings" getter="get_rings">
+ Number of segments along the height of the sphere. Defaults to 32.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml
new file mode 100644
index 0000000000..120c7fcc25
--- /dev/null
+++ b/doc/classes/SphereShape.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SphereShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
new file mode 100644
index 0000000000..31ef1865e9
--- /dev/null
+++ b/doc/classes/SpinBox.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpinBox" inherits="Range" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Numerical input text field.
+ </brief_description>
+ <description>
+ SpinBox is a numerical input text field. It allows entering integers and floats.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_line_edit">
+ <return type="LineEdit">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_prefix" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_suffix" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the specific suffix.
+ </description>
+ </method>
+ <method name="is_editable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return if the spinbox is editable.
+ </description>
+ </method>
+ <method name="set_editable">
+ <return type="void">
+ </return>
+ <argument index="0" name="editable" type="bool">
+ </argument>
+ <description>
+ Set whether the spinbox is editable.
+ </description>
+ </method>
+ <method name="set_prefix">
+ <return type="void">
+ </return>
+ <argument index="0" name="prefix" type="String">
+ </argument>
+ <description>
+ Set a prefix.
+ </description>
+ </method>
+ <method name="set_suffix">
+ <return type="void">
+ </return>
+ <argument index="0" name="suffix" type="String">
+ </argument>
+ <description>
+ Set a specific suffix.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="editable" type="bool" setter="set_editable" getter="is_editable">
+ </member>
+ <member name="prefix" type="String" setter="set_prefix" getter="get_prefix">
+ </member>
+ <member name="suffix" type="String" setter="set_suffix" getter="get_suffix">
+ </member>
+ </members>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="updown" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
new file mode 100644
index 0000000000..861a483f6d
--- /dev/null
+++ b/doc/classes/SplitContainer.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SplitContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Container for splitting and adjusting.
+ </brief_description>
+ <description>
+ Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_dragger_visibility" qualifiers="const">
+ <return type="int" enum="SplitContainer.DraggerVisibility">
+ </return>
+ <description>
+ Return visibility of the split dragger (one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
+ </description>
+ </method>
+ <method name="get_split_offset" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the split offset.
+ </description>
+ </method>
+ <method name="is_collapsed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the split is collapsed.
+ </description>
+ </method>
+ <method name="set_collapsed">
+ <return type="void">
+ </return>
+ <argument index="0" name="collapsed" type="bool">
+ </argument>
+ <description>
+ Set if the split must be collapsed.
+ </description>
+ </method>
+ <method name="set_dragger_visibility">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SplitContainer.DraggerVisibility">
+ </argument>
+ <description>
+ Set visibility of the split dragger ([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
+ </description>
+ </method>
+ <method name="set_split_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="int">
+ </argument>
+ <description>
+ Set the split offset.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed">
+ </member>
+ <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility">
+ </member>
+ <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset">
+ </member>
+ </members>
+ <signals>
+ <signal name="dragged">
+ <argument index="0" name="offset" type="int">
+ </argument>
+ <description>
+ Emitted when the dragger is dragged by user.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="DRAGGER_VISIBLE" value="0">
+ The split dragger is visible.
+ </constant>
+ <constant name="DRAGGER_HIDDEN" value="1">
+ The split dragger is invisible.
+ </constant>
+ <constant name="DRAGGER_HIDDEN_COLLAPSED" value="2">
+ The split dragger is invisible and collapsed.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
new file mode 100644
index 0000000000..430e7c4a26
--- /dev/null
+++ b/doc/classes/SpotLight.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpotLight" inherits="Light" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Spotlight [Light], such as a reflector spotlight or a lantern.
+ </brief_description>
+ <description>
+ A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <members>
+ <member name="spot_angle" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="spot_attenuation" type="float" setter="set_param" getter="get_param">
+ </member>
+ <member name="spot_range" type="float" setter="set_param" getter="get_param">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
new file mode 100644
index 0000000000..90ebe79666
--- /dev/null
+++ b/doc/classes/Sprite.xml
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Sprite" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ General purpose Sprite node.
+ </brief_description>
+ <description>
+ General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
+ </description>
+ </method>
+ <method name="get_hframes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of horizontal frames. See [method set_hframes].
+ </description>
+ </method>
+ <method name="get_normal_map" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return sprite draw offset.
+ </description>
+ </method>
+ <method name="get_region_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return the region rect to read from.
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ Return the base texture for the sprite.
+ </description>
+ </method>
+ <method name="get_vframes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of vertical frames. See [method set_vframes].
+ </description>
+ </method>
+ <method name="is_centered" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return if the sprite is centered at the local origin.
+ </description>
+ </method>
+ <method name="is_flipped_h" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the sprite is flipped horizontally.
+ </description>
+ </method>
+ <method name="is_flipped_v" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the sprite is flipped vertically.
+ </description>
+ </method>
+ <method name="is_region" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return if the sprite reads from a region.
+ </description>
+ </method>
+ <method name="is_region_filter_clip_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="centered" type="bool">
+ </argument>
+ <description>
+ Set whether the sprite should be centered on the origin.
+ </description>
+ </method>
+ <method name="set_flip_h">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_h" type="bool">
+ </argument>
+ <description>
+ Set true to flip the sprite horizontally.
+ </description>
+ </method>
+ <method name="set_flip_v">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_v" type="bool">
+ </argument>
+ <description>
+ Set true to flip the sprite vertically.
+ </description>
+ </method>
+ <method name="set_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="frame" type="int">
+ </argument>
+ <description>
+ Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1.
+ </description>
+ </method>
+ <method name="set_hframes">
+ <return type="void">
+ </return>
+ <argument index="0" name="hframes" type="int">
+ </argument>
+ <description>
+ Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation.
+ </description>
+ </method>
+ <method name="set_normal_map">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal_map" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Set the sprite draw offset, useful for setting rotation pivots.
+ </description>
+ </method>
+ <method name="set_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases.
+ </description>
+ </method>
+ <method name="set_region_filter_clip">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Set the region rect to read from.
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ Set the base texture for the sprite.
+ </description>
+ </method>
+ <method name="set_vframes">
+ <return type="void">
+ </return>
+ <argument index="0" name="vframes" type="int">
+ </argument>
+ <description>
+ Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="centered" type="bool" setter="set_centered" getter="is_centered">
+ </member>
+ <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
+ </member>
+ <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
+ </member>
+ <member name="frame" type="int" setter="set_frame" getter="get_frame">
+ </member>
+ <member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
+ </member>
+ <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ </member>
+ <member name="region_enabled" type="bool" setter="set_region" getter="is_region">
+ </member>
+ <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled">
+ </member>
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="vframes" type="int" setter="set_vframes" getter="get_vframes">
+ </member>
+ </members>
+ <signals>
+ <signal name="frame_changed">
+ <description>
+ </description>
+ </signal>
+ <signal name="texture_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
new file mode 100644
index 0000000000..f6f2f8f00c
--- /dev/null
+++ b/doc/classes/Sprite3D.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_frame" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_hframes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_region_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vframes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_region" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="frame" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_hframes">
+ <return type="void">
+ </return>
+ <argument index="0" name="hframes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_vframes">
+ <return type="void">
+ </return>
+ <argument index="0" name="vframes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="frame" type="int" setter="set_frame" getter="get_frame">
+ </member>
+ <member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
+ </member>
+ <member name="region_enabled" type="bool" setter="set_region" getter="is_region">
+ </member>
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="vframes" type="int" setter="set_vframes" getter="get_vframes">
+ </member>
+ </members>
+ <signals>
+ <signal name="frame_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
new file mode 100644
index 0000000000..1640e5dc9f
--- /dev/null
+++ b/doc/classes/SpriteBase3D.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_alpha_cut_mode" qualifiers="const">
+ <return type="int" enum="SpriteBase3D.AlphaCutMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_axis" qualifiers="const">
+ <return type="int" enum="Vector3.Axis">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_draw_flag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_modulate" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_opacity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pixel_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_centered" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_flipped_h" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_flipped_v" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_alpha_cut_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SpriteBase3D.AlphaCutMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_axis">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int" enum="Vector3.Axis">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="centered" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flip_h">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_h" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_flip_v">
+ <return type="void">
+ </return>
+ <argument index="0" name="flip_v" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_modulate">
+ <return type="void">
+ </return>
+ <argument index="0" name="modulate" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_opacity">
+ <return type="void">
+ </return>
+ <argument index="0" name="opacity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pixel_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="pixel_size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode">
+ </member>
+ <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis">
+ </member>
+ <member name="centered" type="bool" setter="set_centered" getter="is_centered">
+ </member>
+ <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ </member>
+ <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
+ </member>
+ <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate">
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ </member>
+ <member name="opacity" type="float" setter="set_opacity" getter="get_opacity">
+ </member>
+ <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size">
+ </member>
+ <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ </member>
+ <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag">
+ </member>
+ </members>
+ <constants>
+ <constant name="FLAG_TRANSPARENT" value="0">
+ </constant>
+ <constant name="FLAG_SHADED" value="1">
+ </constant>
+ <constant name="FLAG_DOUBLE_SIDED" value="2">
+ </constant>
+ <constant name="FLAG_MAX" value="3">
+ </constant>
+ <constant name="ALPHA_CUT_DISABLED" value="0">
+ </constant>
+ <constant name="ALPHA_CUT_DISCARD" value="1">
+ </constant>
+ <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
new file mode 100644
index 0000000000..1c5669b898
--- /dev/null
+++ b/doc/classes/SpriteFrames.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SpriteFrames" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Sprite frame library for AnimatedSprite.
+ </brief_description>
+ <description>
+ Sprite frame library for [AnimatedSprite].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="frame" type="Texture">
+ </argument>
+ <argument index="2" name="atpos" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_all">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_loop" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_frame" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_frame_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_animation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="rename_animation">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="newname" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_animation_loop">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="loop" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_animation_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="speed" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="anim" type="String">
+ </argument>
+ <argument index="1" name="idx" type="int">
+ </argument>
+ <argument index="2" name="txt" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="animations" type="Array" setter="_set_animations" getter="_get_animations">
+ </member>
+ <member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml
new file mode 100644
index 0000000000..6b5b007310
--- /dev/null
+++ b/doc/classes/StaticBody.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Static body for 3D Physics.
+ </brief_description>
+ <description>
+ Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision.
+ A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
+ Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bounce" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body bounciness.
+ </description>
+ </method>
+ <method name="get_constant_angular_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the constant angular velocity for the body.
+ </description>
+ </method>
+ <method name="get_constant_linear_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return the constant linear velocity for the body.
+ </description>
+ </method>
+ <method name="get_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body friction.
+ </description>
+ </method>
+ <method name="set_bounce">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounce" type="float">
+ </argument>
+ <description>
+ Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
+ </description>
+ </method>
+ <method name="set_constant_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="vel" type="Vector3">
+ </argument>
+ <description>
+ Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
+ </description>
+ </method>
+ <method name="set_constant_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="vel" type="Vector3">
+ </argument>
+ <description>
+ Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
+ </description>
+ </method>
+ <method name="set_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="friction" type="float">
+ </argument>
+ <description>
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ The body bounciness.
+ </member>
+ <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity">
+ The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
+ </member>
+ <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity">
+ The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction">
+ The body friction, from 0 (frictionless) to 1 (full friction).
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
new file mode 100644
index 0000000000..2f23ac588b
--- /dev/null
+++ b/doc/classes/StaticBody2D.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Static body for 2D Physics.
+ </brief_description>
+ <description>
+ Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision.
+ A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
+ Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_bounce" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body bounciness.
+ </description>
+ </method>
+ <method name="get_constant_angular_velocity" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the constant angular velocity for the body.
+ </description>
+ </method>
+ <method name="get_constant_linear_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the constant linear velocity for the body.
+ </description>
+ </method>
+ <method name="get_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body friction.
+ </description>
+ </method>
+ <method name="set_bounce">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounce" type="float">
+ </argument>
+ <description>
+ Set the body bounciness, from 0 (not bouncy) to 1 (bouncy).
+ </description>
+ </method>
+ <method name="set_constant_angular_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="vel" type="float">
+ </argument>
+ <description>
+ Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating.
+ </description>
+ </method>
+ <method name="set_constant_linear_velocity">
+ <return type="void">
+ </return>
+ <argument index="0" name="vel" type="Vector2">
+ </argument>
+ <description>
+ Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving.
+ </description>
+ </method>
+ <method name="set_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="friction" type="float">
+ </argument>
+ <description>
+ Set the body friction, from 0 (frictionless) to 1 (full friction).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ </member>
+ <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity">
+ </member>
+ <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity">
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
new file mode 100644
index 0000000000..2fdd4b07d5
--- /dev/null
+++ b/doc/classes/StreamPeer.xml
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeer" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Abstraction and base class for stream-based protocols.
+ </brief_description>
+ <description>
+ StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_16">
+ <return type="int">
+ </return>
+ <description>
+ Get a signed 16 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_32">
+ <return type="int">
+ </return>
+ <description>
+ Get a signed 32 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_64">
+ <return type="int">
+ </return>
+ <description>
+ Get a signed 64 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_8">
+ <return type="int">
+ </return>
+ <description>
+ Get a signed byte from the stream.
+ </description>
+ </method>
+ <method name="get_available_bytes" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of bytes this [StreamPeer] has available.
+ </description>
+ </method>
+ <method name="get_data">
+ <return type="Array">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array.
+ </description>
+ </method>
+ <method name="get_double">
+ <return type="float">
+ </return>
+ <description>
+ Get a double-precision float from the stream.
+ </description>
+ </method>
+ <method name="get_float">
+ <return type="float">
+ </return>
+ <description>
+ Get a single-precision float from the stream.
+ </description>
+ </method>
+ <method name="get_partial_data">
+ <return type="Array">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array.
+ </description>
+ </method>
+ <method name="get_string">
+ <return type="String">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Get a string with byte-length "bytes" from the stream.
+ </description>
+ </method>
+ <method name="get_u16">
+ <return type="int">
+ </return>
+ <description>
+ Get an unsigned 16 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_u32">
+ <return type="int">
+ </return>
+ <description>
+ Get an unsigned 32 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_u64">
+ <return type="int">
+ </return>
+ <description>
+ Get an unsigned 16 bit value from the stream.
+ </description>
+ </method>
+ <method name="get_u8">
+ <return type="int">
+ </return>
+ <description>
+ Get an unsigned byte from the stream.
+ </description>
+ </method>
+ <method name="get_utf8_string">
+ <return type="String">
+ </return>
+ <argument index="0" name="bytes" type="int">
+ </argument>
+ <description>
+ Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
+ </description>
+ </method>
+ <method name="get_var">
+ <return type="Variant">
+ </return>
+ <description>
+ Get a Variant from the stream.
+ </description>
+ </method>
+ <method name="is_big_endian_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this [StreamPeer] is using big-endian format.
+ </description>
+ </method>
+ <method name="put_16">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put a signed 16 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_32">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put a signed 32 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_64">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put a signed 64 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_8">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put a signed byte into the stream.
+ </description>
+ </method>
+ <method name="put_data">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code.
+ </description>
+ </method>
+ <method name="put_double">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="float">
+ </argument>
+ <description>
+ Put a double-precision float into the stream.
+ </description>
+ </method>
+ <method name="put_float">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="float">
+ </argument>
+ <description>
+ Put a single-precision float into the stream.
+ </description>
+ </method>
+ <method name="put_partial_data">
+ <return type="Array">
+ </return>
+ <argument index="0" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent.
+ </description>
+ </method>
+ <method name="put_u16">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put an unsigned 16 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_u32">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put an unsigned 32 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_u64">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put an unsigned 64 bit value into the stream.
+ </description>
+ </method>
+ <method name="put_u8">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="int">
+ </argument>
+ <description>
+ Put an unsigned byte into the stream.
+ </description>
+ </method>
+ <method name="put_utf8_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="String">
+ </argument>
+ <description>
+ Put a zero-terminated utf8 string into the stream.
+ </description>
+ </method>
+ <method name="put_var">
+ <return type="void">
+ </return>
+ <argument index="0" name="val" type="Variant">
+ </argument>
+ <description>
+ Put a Variant into the stream.
+ </description>
+ </method>
+ <method name="set_big_endian">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set this [StreamPeer] to use big-endian format. Default is false.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
new file mode 100644
index 0000000000..70a4c781c9
--- /dev/null
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="duplicate" qualifiers="const">
+ <return type="StreamPeerBuffer">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_data_array" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="seek">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_data_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
new file mode 100644
index 0000000000..7a2843ff47
--- /dev/null
+++ b/doc/classes/StreamPeerSSL.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ SSL Stream peer.
+ </brief_description>
+ <description>
+ SSL Stream peer. This object can be used to connect to SSL servers.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="accept_stream">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="stream" type="StreamPeer">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="connect_to_stream">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="stream" type="StreamPeer">
+ </argument>
+ <argument index="1" name="validate_certs" type="bool" default="false">
+ </argument>
+ <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
+ </description>
+ </method>
+ <method name="disconnect_from_stream">
+ <return type="void">
+ </return>
+ <description>
+ Disconnect from host.
+ </description>
+ </method>
+ <method name="get_status" qualifiers="const">
+ <return type="int" enum="StreamPeerSSL.Status">
+ </return>
+ <description>
+ Return the status of the connection, one of STATUS_* enum.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STATUS_DISCONNECTED" value="0">
+ A status representing a [StreamPeerSSL] that is disconnected.
+ </constant>
+ <constant name="STATUS_CONNECTED" value="1">
+ A status representing a [StreamPeerSSL] that is connected to a host.
+ </constant>
+ <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
+ An errot status that shows the peer did not present a SSL certificate and validation was requested.
+ </constant>
+ <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3">
+ An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
new file mode 100644
index 0000000000..3b2af330b3
--- /dev/null
+++ b/doc/classes/StreamPeerTCP.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ TCP Stream peer.
+ </brief_description>
+ <description>
+ TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="connect_to_host">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="host" type="String">
+ </argument>
+ <argument index="1" name="port" type="int">
+ </argument>
+ <description>
+ Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [OK] on success or [FAILED] on failure.
+ </description>
+ </method>
+ <method name="disconnect_from_host">
+ <return type="void">
+ </return>
+ <description>
+ Disconnect from host.
+ </description>
+ </method>
+ <method name="get_connected_host" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the IP of this peer.
+ </description>
+ </method>
+ <method name="get_connected_port" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the port of this peer.
+ </description>
+ </method>
+ <method name="get_status" qualifiers="const">
+ <return type="int" enum="StreamPeerTCP.Status">
+ </return>
+ <description>
+ Return the status of the connection, one of STATUS_* enum.
+ </description>
+ </method>
+ <method name="is_connected_to_host" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="STATUS_NONE" value="0">
+ The initial status of the [StreamPeerTCP], also the status after a disconnect.
+ </constant>
+ <constant name="STATUS_CONNECTING" value="1">
+ A status representing a [StreamPeerTCP] that is connecting to a host.
+ </constant>
+ <constant name="STATUS_CONNECTED" value="2">
+ A status representing a [StreamPeerTCP] that is connected to a host.
+ </constant>
+ <constant name="STATUS_ERROR" value="3">
+ A staus representing a [StreamPeerTCP] in error state.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml
new file mode 100644
index 0000000000..6e6f2e8056
--- /dev/null
+++ b/doc/classes/StreamTexture.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_load_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="load">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="load_path" type="String" setter="load" getter="get_load_path">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
new file mode 100644
index 0000000000..ce3dc1db2f
--- /dev/null
+++ b/doc/classes/String.xml
@@ -0,0 +1,730 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="String" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Built-in string class.
+ </brief_description>
+ <description>
+ This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Plane">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Quat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Rect3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Basis">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolRealArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolVector2Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolVector3Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PoolColorArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="begins_with">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Return true if the strings 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.
+ </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.
+ </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.
+ </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].
+ </description>
+ </method>
+ <method name="casecmp_to">
+ <return type="int">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the string is empty.
+ </description>
+ </method>
+ <method name="ends_with">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Return true if the strings ends with the given string.
+ </description>
+ </method>
+ <method name="erase">
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <argument index="1" name="chars" type="int">
+ </argument>
+ <description>
+ Erase [code]chars[/code] characters from the string starting from [code]pos[/code].
+ </description>
+ </method>
+ <method name="find">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="find_last">
+ <return type="int">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="findn">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="format">
+ <return type="String">
+ </return>
+ <argument index="0" name="values" type="var">
+ </argument>
+ <argument index="1" name="placeholder" type="String" default="{_}">
+ </argument>
+ <description>
+ </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.
+ </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.
+ </description>
+ </method>
+ <method name="get_extension">
+ <return type="String">
+ </return>
+ <description>
+ If the string is a path to a file, return 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.
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <description>
+ Hash the string and return a 32 bits integer.
+ </description>
+ </method>
+ <method name="hex_to_int">
+ <return type="int">
+ </return>
+ <description>
+ Convert a string containing a hexadecimal number into an int.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="String">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <argument index="1" name="what" type="String">
+ </argument>
+ <description>
+ Insert 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.
+ </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.
+ </description>
+ </method>
+ <method name="is_subsequence_of">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Check whether this string is a subsequence of the given string.
+ </description>
+ </method>
+ <method name="is_subsequence_ofi">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Check whether 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.
+ </description>
+ </method>
+ <method name="is_valid_html_color">
+ <return type="bool">
+ </return>
+ <description>
+ Check whether the 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.
+ </description>
+ </method>
+ <method name="is_valid_integer">
+ <return type="bool">
+ </return>
+ <description>
+ Check whether the 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.
+ </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.
+ </description>
+ </method>
+ <method name="left">
+ <return type="String">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Return an amount 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.
+ </description>
+ </method>
+ <method name="match">
+ <return type="bool">
+ </return>
+ <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 '.'.
+ </description>
+ </method>
+ <method name="matchn">
+ <return type="bool">
+ </return>
+ <argument index="0" name="expr" type="String">
+ </argument>
+ <description>
+ Do 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.
+ </description>
+ </method>
+ <method name="md5_text">
+ <return type="String">
+ </return>
+ <description>
+ Return the MD5 hash of the string as a string.
+ </description>
+ </method>
+ <method name="nocasecmp_to">
+ <return type="int">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="ord_at">
+ <return type="int">
+ </return>
+ <argument index="0" name="at" type="int">
+ </argument>
+ <description>
+ Return the character code at position [code]at[/code].
+ </description>
+ </method>
+ <method name="pad_decimals">
+ <return type="String">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="pad_zeros">
+ <return type="String">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="percent_decode">
+ <return type="String">
+ </return>
+ <description>
+ Decode a percent-encoded string. See [method percent_encode].
+ </description>
+ </method>
+ <method name="percent_encode">
+ <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.
+ </description>
+ </method>
+ <method name="plus_file">
+ <return type="String">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
+ </description>
+ </method>
+ <method name="replace">
+ <return type="String">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <argument index="1" name="forwhat" type="String">
+ </argument>
+ <description>
+ Replace occurrences of a substring for different ones inside the string.
+ </description>
+ </method>
+ <method name="replacen">
+ <return type="String">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <argument index="1" name="forwhat" type="String">
+ </argument>
+ <description>
+ Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
+ </description>
+ </method>
+ <method name="rfind">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="rfindn">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="right">
+ <return type="String">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Return the right side of the string from a given position.
+ </description>
+ </method>
+ <method name="sha256_buffer">
+ <return type="PoolByteArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="sha256_text">
+ <return type="String">
+ </return>
+ <description>
+ Return the SHA-256 hash of the string as a string.
+ </description>
+ </method>
+ <method name="similarity">
+ <return type="float">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="split">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="divisor" type="String">
+ </argument>
+ <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 ",".
+ </description>
+ </method>
+ <method name="split_floats">
+ <return type="PoolRealArray">
+ </return>
+ <argument index="0" name="divisor" type="String">
+ </argument>
+ <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 ",".
+ </description>
+ </method>
+ <method name="strip_edges">
+ <return type="String">
+ </return>
+ <argument index="0" name="left" type="bool" default="True">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="substr">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <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].
+ </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.
+ </description>
+ </method>
+ <method name="to_float">
+ <return type="float">
+ </return>
+ <description>
+ Convert 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].
+ </description>
+ </method>
+ <method name="to_lower">
+ <return type="String">
+ </return>
+ <description>
+ Return the string converted to lowercase.
+ </description>
+ </method>
+ <method name="to_upper">
+ <return type="String">
+ </return>
+ <description>
+ Return 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().
+ </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.
+ </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.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
new file mode 100644
index 0000000000..ab1ec1f997
--- /dev/null
+++ b/doc/classes/StyleBox.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StyleBox" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for drawing stylized boxes for the UI.
+ </brief_description>
+ <description>
+ StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_center_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_default_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
+ </description>
+ </method>
+ <method name="get_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return the offset of margin "margin" (see MARGIN_* enum).
+ </description>
+ </method>
+ <method name="get_minimum_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the minimum size that this stylebox can be shrunk to.
+ </description>
+ </method>
+ <method name="get_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code].
+ </description>
+ </method>
+ <method name="set_default_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="offset" type="float">
+ </argument>
+ <description>
+ Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
+ </description>
+ </method>
+ <method name="test_mask" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Test a position in a rectangle, return whether it passes the mask test.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin">
+ </member>
+ <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin">
+ </member>
+ <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin">
+ </member>
+ <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
new file mode 100644
index 0000000000..f11959c41d
--- /dev/null
+++ b/doc/classes/StyleBoxEmpty.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Empty stylebox (does not display anything).
+ </brief_description>
+ <description>
+ Empty stylebox (really does not display anything).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
new file mode 100644
index 0000000000..b09b9f0679
--- /dev/null
+++ b/doc/classes/StyleBoxFlat.xml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Customizable Stylebox with a given set of parameters. (no texture required)
+ </brief_description>
+ <description>
+ This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
+ - Color
+ - Border width (individual width for each border)
+ - Rounded corners (individual radius for each corner)
+ - Shadow
+ About corner radius:
+ Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
+ [codeblock]
+ height = 30
+ corner_radius_top_left = 50
+ corner_raidus_bottom_left = 100
+ [/codeblock]
+ The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result:
+ [codeblock]
+ corner_radius_top_left: 10
+ corner_raidus_bottom_left: 20
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_aa_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bg_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_blend" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_width_min" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_corner_detail" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_corner_radius" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="corner" type="int" enum="Corner">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_expand_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_anti_aliased" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_aa_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anti_aliased">
+ <return type="void">
+ </return>
+ <argument index="0" name="anti_aliased" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_border_blend">
+ <return type="void">
+ </return>
+ <argument index="0" name="blend" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_border_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_border_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_border_width_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_detail">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="corner" type="int" enum="Corner">
+ </argument>
+ <argument index="1" name="radius" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius_top_left" type="int">
+ </argument>
+ <argument index="1" name="radius_top_right" type="int">
+ </argument>
+ <argument index="2" name="radius_botton_right" type="int">
+ </argument>
+ <argument index="3" name="radius_bottom_left" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_center">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_center" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="size_left" type="float">
+ </argument>
+ <argument index="1" name="size_top" type="float">
+ </argument>
+ <argument index="2" name="size_right" type="float">
+ </argument>
+ <argument index="3" name="size_bottom" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased">
+ Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticable when using rounded corners.
+ </member>
+ <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size">
+ This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
+ </member>
+ <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color">
+ The background color of the stylebox.
+ </member>
+ <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend">
+ When set to true, the border will fade into the background color.
+ </member>
+ <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color">
+ Sets the color of the border.
+ </member>
+ <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width">
+ Border width for the bottom border.
+ </member>
+ <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width">
+ Border width for the left border.
+ </member>
+ <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width">
+ Border width for the right border.
+ </member>
+ <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width">
+ Border width for the top border.
+ </member>
+ <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail">
+ This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account.
+ For corner radius smaller than 10: 4-5 should be enough
+ For corner radius smaller than 30: 8-12 should be enough ...
+ </member>
+ <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius">
+ The corner radius of the bottom left corner. When set to 0 the corner is not rounded.
+ </member>
+ <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius">
+ The corner radius of the bottom right corner. When set to 0 the corner is not rounded.
+ </member>
+ <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius">
+ The corner radius of the top left corner. When set to 0 the corner is not rounded.
+ </member>
+ <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius">
+ The corner radius of the top right corner. When set to 0 the corner is not rounded.
+ </member>
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
+ Toggels drawing of the inner part of the stylebox.
+ </member>
+ <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin">
+ Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect.
+ </member>
+ <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin">
+ Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect.
+ </member>
+ <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin">
+ Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect.
+ </member>
+ <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin">
+ Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect.
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color">
+ The color of the shadow. (This has no effect when shadow_size &lt; 1)
+ </member>
+ <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size">
+ The shadow size in pixels.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
new file mode 100644
index 0000000000..458fdad99e
--- /dev/null
+++ b/doc/classes/StyleBoxTexture.xml
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Texture Based 3x3 scale style.
+ </brief_description>
+ <description>
+ Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_expand_margin_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_h_axis_stretch_mode" qualifiers="const">
+ <return type="int" enum="StyleBoxTexture.AxisStretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_margin_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_modulate" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal_map" qualifiers="const">
+ <return type="Resource">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_region_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Resource">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_axis_stretch_mode" qualifiers="const">
+ <return type="int" enum="StyleBoxTexture.AxisStretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_draw_center">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="size_left" type="float">
+ </argument>
+ <argument index="1" name="size_top" type="float">
+ </argument>
+ <argument index="2" name="size_right" type="float">
+ </argument>
+ <argument index="3" name="size_bottom" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_h_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_margin_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_modulate">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_normal_map">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal_map" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_region_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode">
+ </member>
+ <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode">
+ </member>
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
+ </member>
+ <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ </member>
+ <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ </member>
+ <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ </member>
+ <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ </member>
+ <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size">
+ </member>
+ <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size">
+ </member>
+ <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size">
+ </member>
+ <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size">
+ </member>
+ <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate">
+ </member>
+ <member name="normal_map" type="Resource" setter="set_normal_map" getter="get_normal_map">
+ </member>
+ <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ </member>
+ <member name="texture" type="Resource" setter="set_texture" getter="get_texture">
+ </member>
+ </members>
+ <signals>
+ <signal name="texture_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE" value="1">
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
new file mode 100644
index 0000000000..1e91ee402b
--- /dev/null
+++ b/doc/classes/SurfaceTool.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SurfaceTool" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Helper tool to create geometry.
+ </brief_description>
+ <description>
+ The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
+ [codeblock]
+ var st = SurfaceTool.new()
+ st.begin(Mesh.PRIMITIVE_TRIANGLES)
+ st.add_color(Color(1, 0, 0))
+ st.add_uv(Vector2(0, 0))
+ st.add_vertex(Vector3(0, 0, 0))
+ [/codeblock]
+ The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
+ It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_bones">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="PoolIntArray">
+ </argument>
+ <description>
+ Add an array of bones for the next Vertex to use.
+ </description>
+ </method>
+ <method name="add_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Specify a [Color] for the next Vertex to use.
+ </description>
+ </method>
+ <method name="add_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex.
+ </description>
+ </method>
+ <method name="add_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Specify a normal for the next Vertex to use.
+ </description>
+ </method>
+ <method name="add_smooth_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="smooth" type="bool">
+ </argument>
+ <description>
+ Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation.
+ </description>
+ </method>
+ <method name="add_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="tangent" type="Plane">
+ </argument>
+ <description>
+ Specify a Tangent for the next Vertex to use.
+ </description>
+ </method>
+ <method name="add_to_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_triangle_fan">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertexes" type="PoolVector3Array">
+ </argument>
+ <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
+ </argument>
+ <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )">
+ </argument>
+ <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )">
+ </argument>
+ <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )">
+ </argument>
+ <argument index="5" name="tangents" type="Array" default="[ ]">
+ </argument>
+ <description>
+ Insert a triangle fan made of array data into [Mesh] being constructed.
+ </description>
+ </method>
+ <method name="add_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="Vector2">
+ </argument>
+ <description>
+ Specify UV Coordinate for next Vertex to use.
+ </description>
+ </method>
+ <method name="add_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv2" type="Vector2">
+ </argument>
+ <description>
+ Specify an optional second set of UV coordinates for next Vertex to use.
+ </description>
+ </method>
+ <method name="add_vertex">
+ <return type="void">
+ </return>
+ <argument index="0" name="vertex" type="Vector3">
+ </argument>
+ <description>
+ Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
+ </description>
+ </method>
+ <method name="add_weights">
+ <return type="void">
+ </return>
+ <argument index="0" name="weights" type="PoolRealArray">
+ </argument>
+ <description>
+ Specify weight value for next Vertex to use.
+ </description>
+ </method>
+ <method name="append_from">
+ <return type="void">
+ </return>
+ <argument index="0" name="existing" type="Mesh">
+ </argument>
+ <argument index="1" name="surface" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <description>
+ Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES).
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear all information passed into the surface tool so far.
+ </description>
+ </method>
+ <method name="commit">
+ <return type="ArrayMesh">
+ </return>
+ <argument index="0" name="existing" type="ArrayMesh" default="null">
+ </argument>
+ <description>
+ Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
+ </description>
+ </method>
+ <method name="create_from">
+ <return type="void">
+ </return>
+ <argument index="0" name="existing" type="Mesh">
+ </argument>
+ <argument index="1" name="surface" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="deindex">
+ <return type="void">
+ </return>
+ <description>
+ Removes index array by expanding Vertex array.
+ </description>
+ </method>
+ <method name="generate_normals">
+ <return type="void">
+ </return>
+ <description>
+ Generates normals from Vertices so you do not have to do it manually.
+ </description>
+ </method>
+ <method name="generate_tangents">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="index">
+ <return type="void">
+ </return>
+ <description>
+ Shrinks Vertex array by creating an index array. Avoids reusing Vertices.
+ </description>
+ </method>
+ <method name="set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
+ </argument>
+ <description>
+ Sets [Material] to be used by the [Mesh] you are constructing.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml
new file mode 100644
index 0000000000..97115619ad
--- /dev/null
+++ b/doc/classes/TCP_Server.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TCP_Server" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ TCP Server.
+ </brief_description>
+ <description>
+ TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_connection_available" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if a connection is available for taking.
+ </description>
+ </method>
+ <method name="listen">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
+ </argument>
+ <description>
+ Listen on the "port" binding to "bind_address".
+ If "bind_address" is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6).
+ If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type.
+ If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stop listening.
+ </description>
+ </method>
+ <method name="take_connection">
+ <return type="StreamPeerTCP">
+ </return>
+ <description>
+ If a connection is available, return a StreamPeerTCP with the connection/
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
new file mode 100644
index 0000000000..ffe99eb82b
--- /dev/null
+++ b/doc/classes/TabContainer.xml
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TabContainer" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Tabbed Container.
+ </brief_description>
+ <description>
+ Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
+ Children controls of this one automatically.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="are_tabs_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the tabs should be visible or hidden.
+ </description>
+ </method>
+ <method name="get_current_tab" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the current tab index that is being shown.
+ </description>
+ </method>
+ <method name="get_current_tab_control" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_popup" qualifiers="const">
+ <return type="Popup">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_previous_tab" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the previous tab index that was being shown.
+ </description>
+ </method>
+ <method name="get_tab_align" qualifiers="const">
+ <return type="int" enum="TabContainer.TabAlign">
+ </return>
+ <description>
+ Return tab alignment, from the ALIGN_* enum.
+ </description>
+ </method>
+ <method name="get_tab_control" qualifiers="const">
+ <return type="Control">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the current tab control that is being shown.
+ </description>
+ </method>
+ <method name="get_tab_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of tabs.
+ </description>
+ </method>
+ <method name="get_tab_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Return the title for the tab. Tab titles are by default the children node name, but this can be overridden.
+ </description>
+ </method>
+ <method name="set_current_tab">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Bring a tab (and the Control it represents) to the front, and hide the rest.
+ </description>
+ </method>
+ <method name="set_popup">
+ <return type="void">
+ </return>
+ <argument index="0" name="popup" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="TabContainer.TabAlign">
+ </argument>
+ <description>
+ Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
+ </description>
+ </method>
+ <method name="set_tab_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="icon" type="Texture">
+ </argument>
+ <description>
+ Set an icon for a tab.
+ </description>
+ </method>
+ <method name="set_tab_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
+ <description>
+ Set a title for the tab. Tab titles are by default the children node name, but this can be overridden.
+ </description>
+ </method>
+ <method name="set_tabs_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ Set whether the tabs should be visible or hidden.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab">
+ </member>
+ <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign">
+ </member>
+ <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible">
+ </member>
+ </members>
+ <signals>
+ <signal name="pre_popup_pressed">
+ <description>
+ </description>
+ </signal>
+ <signal name="tab_changed">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ Emitted only when the current tab changes.
+ </description>
+ </signal>
+ <signal name="tab_selected">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ Emitted when a tab is being selected, even if it is the same tab.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="decrement" type="Texture">
+ </theme_item>
+ <theme_item name="decrement_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color_bg" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_fg" type="Color">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="increment" type="Texture">
+ </theme_item>
+ <theme_item name="increment_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="label_valign_bg" type="int">
+ </theme_item>
+ <theme_item name="label_valign_fg" type="int">
+ </theme_item>
+ <theme_item name="menu" type="Texture">
+ </theme_item>
+ <theme_item name="menu_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="side_margin" type="int">
+ </theme_item>
+ <theme_item name="tab_bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="tab_fg" type="StyleBox">
+ </theme_item>
+ <theme_item name="top_margin" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
new file mode 100644
index 0000000000..78821a244c
--- /dev/null
+++ b/doc/classes/Tabs.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Tabs" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Tabs Control.
+ </brief_description>
+ <description>
+ Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_tab">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="1" name="icon" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="ensure_tab_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_current_tab" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_align" qualifiers="const">
+ <return type="int" enum="Tabs.TabAlign">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_close_display_policy" qualifiers="const">
+ <return type="int" enum="Tabs.CloseButtonDisplayPolicy">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tab_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Returns tab [Rect2] with local position and size.
+ </description>
+ </method>
+ <method name="get_tab_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="move_tab">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <argument index="1" name="to" type="int">
+ </argument>
+ <description>
+ Rearrange tab.
+ </description>
+ </method>
+ <method name="remove_tab">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_current_tab">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Tabs.TabAlign">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_close_display_policy">
+ <return type="void">
+ </return>
+ <argument index="0" name="policy" type="int" enum="Tabs.CloseButtonDisplayPolicy">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_disabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="icon" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab">
+ </member>
+ <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy">
+ </member>
+ </members>
+ <signals>
+ <signal name="reposition_active_tab_request">
+ <argument index="0" name="idx_to" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="right_button_pressed">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tab_changed">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tab_clicked">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tab_close">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tab_hover">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
+ <constant name="ALIGN_MAX" value="3">
+ </constant>
+ <constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1">
+ </constant>
+ <constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2">
+ </constant>
+ <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0">
+ </constant>
+ <constant name="CLOSE_BUTTON_MAX" value="3">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="button" type="StyleBox">
+ </theme_item>
+ <theme_item name="button_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="close" type="Texture">
+ </theme_item>
+ <theme_item name="decrement" type="Texture">
+ </theme_item>
+ <theme_item name="decrement_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color_bg" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_fg" type="Color">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="increment" type="Texture">
+ </theme_item>
+ <theme_item name="increment_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="label_valign_bg" type="int">
+ </theme_item>
+ <theme_item name="label_valign_fg" type="int">
+ </theme_item>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="tab_bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="tab_fg" type="StyleBox">
+ </theme_item>
+ <theme_item name="top_margin" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
new file mode 100644
index 0000000000..d77cb69eef
--- /dev/null
+++ b/doc/classes/TextEdit.xml
@@ -0,0 +1,553 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextEdit" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Multiline text editing control.
+ </brief_description>
+ <description>
+ TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_color_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="begin_key" type="String">
+ </argument>
+ <argument index="1" name="end_key" type="String">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <argument index="3" name="line_only" type="bool" default="false">
+ </argument>
+ <description>
+ Add color region (given the delimiters) and its colors.
+ </description>
+ </method>
+ <method name="add_keyword_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="keyword" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Add a keyword and its color.
+ </description>
+ </method>
+ <method name="clear_colors">
+ <return type="void">
+ </return>
+ <description>
+ Clear all the syntax coloring information.
+ </description>
+ </method>
+ <method name="clear_undo_history">
+ <return type="void">
+ </return>
+ <description>
+ Clear the undo history.
+ </description>
+ </method>
+ <method name="copy">
+ <return type="void">
+ </return>
+ <description>
+ Copy the current selection.
+ </description>
+ </method>
+ <method name="cursor_get_blink_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Gets whether the text editor caret is blinking.
+ </description>
+ </method>
+ <method name="cursor_get_blink_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Gets the text editor caret blink speed.
+ </description>
+ </method>
+ <method name="cursor_get_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the column the editing cursor is at.
+ </description>
+ </method>
+ <method name="cursor_get_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the line the editing cursor is at.
+ </description>
+ </method>
+ <method name="cursor_is_block_mode" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Gets whether the text editor caret is in block mode.
+ </description>
+ </method>
+ <method name="cursor_set_blink_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the text editor caret to blink.
+ </description>
+ </method>
+ <method name="cursor_set_blink_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="blink_speed" type="float">
+ </argument>
+ <description>
+ Set the text editor caret blink speed. Cannot be less then or equal to 0.
+ </description>
+ </method>
+ <method name="cursor_set_block_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the text editor caret to block mode.
+ </description>
+ </method>
+ <method name="cursor_set_column">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="adjust_viewport" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cursor_set_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="adjust_viewport" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="cut">
+ <return type="void">
+ </return>
+ <description>
+ Cut the current selection.
+ </description>
+ </method>
+ <method name="get_line" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Return the text of a specific line.
+ </description>
+ </method>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the amount of total lines in the text.
+ </description>
+ </method>
+ <method name="get_menu" qualifiers="const">
+ <return type="PopupMenu">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_selection_from_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the selection begin column.
+ </description>
+ </method>
+ <method name="get_selection_from_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the selection begin line.
+ </description>
+ </method>
+ <method name="get_selection_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the text inside the selection.
+ </description>
+ </method>
+ <method name="get_selection_to_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the selection end column.
+ </description>
+ </method>
+ <method name="get_selection_to_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the selection end line.
+ </description>
+ </method>
+ <method name="get_text">
+ <return type="String">
+ </return>
+ <description>
+ Return the whole text.
+ </description>
+ </method>
+ <method name="get_v_scroll_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_word_under_cursor" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="insert_text_at_cursor">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Insert a given text at the cursor position.
+ </description>
+ </method>
+ <method name="is_highlight_all_occurrences_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if highlight all occurrences is enabled.
+ </description>
+ </method>
+ <method name="is_selection_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the selection is active.
+ </description>
+ </method>
+ <method name="is_show_line_numbers_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if line numbers are enabled.
+ </description>
+ </method>
+ <method name="is_smooth_scroll_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_syntax_coloring_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if the syntax coloring is enabled.
+ </description>
+ </method>
+ <method name="menu_option">
+ <return type="void">
+ </return>
+ <argument index="0" name="option" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="paste">
+ <return type="void">
+ </return>
+ <description>
+ Paste the current selection.
+ </description>
+ </method>
+ <method name="redo">
+ <return type="void">
+ </return>
+ <description>
+ Perform redo operation.
+ </description>
+ </method>
+ <method name="search" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="key" type="String">
+ </argument>
+ <argument index="1" name="flags" type="int">
+ </argument>
+ <argument index="2" name="from_line" type="int">
+ </argument>
+ <argument index="3" name="from_column" type="int">
+ </argument>
+ <description>
+ Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
+ </description>
+ </method>
+ <method name="select">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_line" type="int">
+ </argument>
+ <argument index="1" name="from_column" type="int">
+ </argument>
+ <argument index="2" name="to_line" type="int">
+ </argument>
+ <argument index="3" name="to_column" type="int">
+ </argument>
+ <description>
+ Perform selection, from line/column to line/column.
+ </description>
+ </method>
+ <method name="select_all">
+ <return type="void">
+ </return>
+ <description>
+ Select all the text.
+ </description>
+ </method>
+ <method name="set_highlight_all_occurrences">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to enable highlighting all occurrences of the current selection.
+ </description>
+ </method>
+ <method name="set_max_chars">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set the maximum amount of characters editable.
+ </description>
+ </method>
+ <method name="set_readonly">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the text editor as read-only. Text can be displayed but not edited.
+ </description>
+ </method>
+ <method name="set_show_line_numbers">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to enable showing line numbers.
+ </description>
+ </method>
+ <method name="set_smooth_scroll_enable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_syntax_coloring">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to enable the syntax coloring.
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ Set the entire text.
+ </description>
+ </method>
+ <method name="set_v_scroll_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_wrap">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enable text wrapping when it goes beyond he edge of what is visible.
+ </description>
+ </method>
+ <method name="undo">
+ <return type="void">
+ </return>
+ <description>
+ Perform undo operation.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
+ </member>
+ <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
+ </member>
+ <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode">
+ </member>
+ <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
+ </member>
+ <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled">
+ </member>
+ <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled">
+ </member>
+ <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled">
+ </member>
+ <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed">
+ </member>
+ </members>
+ <signals>
+ <signal name="breakpoint_toggled">
+ <argument index="0" name="row" type="int">
+ </argument>
+ <description>
+ Emitted when a breakpoint is placed via the breakpoint gutter.
+ </description>
+ </signal>
+ <signal name="cursor_changed">
+ <description>
+ Emitted when the cursor changes.
+ </description>
+ </signal>
+ <signal name="request_completion">
+ <description>
+ </description>
+ </signal>
+ <signal name="symbol_lookup">
+ <argument index="0" name="symbol" type="String">
+ </argument>
+ <argument index="1" name="row" type="int">
+ </argument>
+ <argument index="2" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="text_changed">
+ <description>
+ Emitted when the text changes.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="SEARCH_MATCH_CASE" value="1">
+ Match case when searching.
+ </constant>
+ <constant name="SEARCH_WHOLE_WORDS" value="2">
+ Match whole words when searching.
+ </constant>
+ <constant name="SEARCH_BACKWARDS" value="4">
+ Search from end to beginning.
+ </constant>
+ <constant name="MENU_CUT" value="0">
+ </constant>
+ <constant name="MENU_COPY" value="1">
+ </constant>
+ <constant name="MENU_PASTE" value="2">
+ </constant>
+ <constant name="MENU_CLEAR" value="3">
+ </constant>
+ <constant name="MENU_SELECT_ALL" value="4">
+ </constant>
+ <constant name="MENU_UNDO" value="5">
+ </constant>
+ <constant name="MENU_MAX" value="6">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="background_color" type="Color">
+ </theme_item>
+ <theme_item name="brace_mismatch_color" type="Color">
+ </theme_item>
+ <theme_item name="breakpoint_color" type="Color">
+ </theme_item>
+ <theme_item name="caret_background_color" type="Color">
+ </theme_item>
+ <theme_item name="caret_color" type="Color">
+ </theme_item>
+ <theme_item name="completion" type="StyleBox">
+ </theme_item>
+ <theme_item name="completion_background_color" type="Color">
+ </theme_item>
+ <theme_item name="completion_existing_color" type="Color">
+ </theme_item>
+ <theme_item name="completion_font_color" type="Color">
+ </theme_item>
+ <theme_item name="completion_lines" type="int">
+ </theme_item>
+ <theme_item name="completion_max_width" type="int">
+ </theme_item>
+ <theme_item name="completion_scroll_color" type="Color">
+ </theme_item>
+ <theme_item name="completion_scroll_width" type="int">
+ </theme_item>
+ <theme_item name="completion_selected_color" type="Color">
+ </theme_item>
+ <theme_item name="current_line_color" type="Color">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_selected" type="Color">
+ </theme_item>
+ <theme_item name="function_color" type="Color">
+ </theme_item>
+ <theme_item name="line_number_color" type="Color">
+ </theme_item>
+ <theme_item name="line_spacing" type="int">
+ </theme_item>
+ <theme_item name="mark_color" type="Color">
+ </theme_item>
+ <theme_item name="member_variable_color" type="Color">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="number_color" type="Color">
+ </theme_item>
+ <theme_item name="selection_color" type="Color">
+ </theme_item>
+ <theme_item name="symbol_color" type="Color">
+ </theme_item>
+ <theme_item name="tab" type="Texture">
+ </theme_item>
+ <theme_item name="word_highlighted_color" type="Color">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
new file mode 100644
index 0000000000..d09236bbc9
--- /dev/null
+++ b/doc/classes/Texture.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Texture" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Texture for 2D and 3D.
+ </brief_description>
+ <description>
+ A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="3" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="4" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_rect" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="tile" type="bool">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_rect_region" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="rect" type="Rect2">
+ </argument>
+ <argument index="2" name="src_rect" type="Rect2">
+ </argument>
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <argument index="5" name="normal_map" type="Texture" default="null">
+ </argument>
+ <argument index="6" name="clip_uv" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="Image">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the current texture flags.
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the texture height.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the texture size.
+ </description>
+ </method>
+ <method name="get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the texture width.
+ </description>
+ </method>
+ <method name="has_alpha" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ Change the texture flags.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="FLAG_MIPMAPS" value="1">
+ Generate mipmaps, to enable smooth zooming out of the texture.
+ </constant>
+ <constant name="FLAG_REPEAT" value="2">
+ Repeat (instead of clamp to edge).
+ </constant>
+ <constant name="FLAG_FILTER" value="4">
+ Turn on magnifying filter, to enable smooth zooming in of the texture.
+ </constant>
+ <constant name="FLAG_VIDEO_SURFACE" value="4096">
+ Texture is a video surface.
+ </constant>
+ <constant name="FLAGS_DEFAULT" value="7">
+ Default flags. Generate mipmaps, repeat, and filter are enabled.
+ </constant>
+ <constant name="FLAG_ANISOTROPIC_FILTER" value="8">
+ </constant>
+ <constant name="FLAG_CONVERT_TO_LINEAR" value="16">
+ </constant>
+ <constant name="FLAG_MIRRORED_REPEAT" value="32">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
new file mode 100644
index 0000000000..e4f00555b3
--- /dev/null
+++ b/doc/classes/TextureButton.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextureButton" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Button that can be themed with textures.
+ </brief_description>
+ <description>
+ Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.
+ Only the normal texture is required, the others are optional.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_click_mask" qualifiers="const">
+ <return type="BitMap">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_disabled_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_expand" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_focused_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_hover_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_normal_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_pressed_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_stretch_mode" qualifiers="const">
+ <return type="int" enum="TextureButton.StretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_click_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="BitMap">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disabled_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_expand" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_focused_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_hover_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_normal_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pressed_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_mode" type="int" enum="TextureButton.StretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="expand" type="bool" setter="set_expand" getter="get_expand">
+ </member>
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode">
+ </member>
+ <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask">
+ </member>
+ <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture">
+ </member>
+ <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture">
+ </member>
+ <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture">
+ </member>
+ <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture">
+ </member>
+ <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture">
+ </member>
+ </members>
+ <constants>
+ <constant name="STRETCH_SCALE" value="0">
+ </constant>
+ <constant name="STRETCH_TILE" value="1">
+ </constant>
+ <constant name="STRETCH_KEEP" value="2">
+ </constant>
+ <constant name="STRETCH_KEEP_CENTERED" value="3">
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT" value="4">
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="5">
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT_COVERED" value="6">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
new file mode 100644
index 0000000000..0a6ffcdeb8
--- /dev/null
+++ b/doc/classes/TextureProgress.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextureProgress" inherits="Range" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Textured progress bar.
+ </brief_description>
+ <description>
+ A [ProgressBar] that uses textures to display fill percentage. Can be set to linear or radial mode.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_fill_degrees">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fill_mode">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_nine_patch_stretch" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if textures are stretched as nine-patches or false otherwise.
+ </description>
+ </method>
+ <method name="get_over_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_progress_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radial_center_offset">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radial_initial_angle">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_stretch_margin" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ Return nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
+ </description>
+ </method>
+ <method name="get_under_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_fill_degrees">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fill_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_nine_patch_stretch">
+ <return type="void">
+ </return>
+ <argument index="0" name="stretch" type="bool">
+ </argument>
+ <description>
+ Set if textures should be stretched as nine-patches.
+ </description>
+ </method>
+ <method name="set_over_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_progress_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radial_center_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radial_initial_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stretch_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Set nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
+ </description>
+ </method>
+ <method name="set_under_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode">
+ The fill direction. Uses FILL_* constants.
+ </member>
+ <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch">
+ If [code]true[/code] textures will be stretched as [NinePatchRect]. Uses [code]stretch_margin[/code] properties (see below). Default value: [code]false[/code]
+ </member>
+ <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset">
+ The offset amount for radial mode.
+ </member>
+ <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees">
+ The amount of the texture to use for radial mode.
+ </member>
+ <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle">
+ Start angle for radial mode.
+ </member>
+ <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for bottom margin.
+ </member>
+ <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for left margin.
+ </member>
+ <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for right margin.
+ </member>
+ <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for top margin.
+ </member>
+ <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture">
+ The [Texture] that will be drawn over the progress bar.
+ </member>
+ <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture">
+ The [Texture] used to display [code]value[/code].
+ </member>
+ <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture">
+ The [Texture] that will be drawn under the progress bar.
+ </member>
+ </members>
+ <constants>
+ <constant name="FILL_LEFT_TO_RIGHT" value="0">
+ </constant>
+ <constant name="FILL_RIGHT_TO_LEFT" value="1">
+ </constant>
+ <constant name="FILL_TOP_TO_BOTTOM" value="2">
+ </constant>
+ <constant name="FILL_BOTTOM_TO_TOP" value="3">
+ </constant>
+ <constant name="FILL_CLOCKWISE" value="4">
+ </constant>
+ <constant name="FILL_COUNTER_CLOCKWISE" value="5">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
new file mode 100644
index 0000000000..af5626ae84
--- /dev/null
+++ b/doc/classes/TextureRect.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextureRect" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Draws a sprite or a texture inside a User Interface. The texture can tile or not.
+ </brief_description>
+ <description>
+ Use TextureRect to draw icons and sprites in your User Interfaces. To create panels and menu boxes, take a look at [NinePatchFrame]. Its Stretch Mode property controls the texture's scale and placement. It can scale, tile and stay centered inside its bounding rectangle. TextureRect is one of the 5 most common nodes to create game UI.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_stretch_mode" qualifiers="const">
+ <return type="int" enum="TextureRect.StretchMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="has_expand" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="stretch_mode" type="int" enum="TextureRect.StretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="expand" type="bool" setter="set_expand" getter="has_expand">
+ If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code].
+ </member>
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode">
+ Controls the texture's behavior when you resize the node's bounding rectangle. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more.
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The node's [Texture] resource.
+ </member>
+ </members>
+ <constants>
+ <constant name="STRETCH_SCALE_ON_EXPAND" value="0">
+ Scale to fit the node's bounding rectangle, only if [code]expand[/code] is [code]true[/code]. Default [code]stretch_mode[/code], for backwards compatibility. Until you set [code]expand[/code] to [code]true[/code], the texture will behave like [code]STRETCH_KEEP[/code].
+ </constant>
+ <constant name="STRETCH_SCALE" value="1">
+ Scale to fit the node's bounding rectangle.
+ </constant>
+ <constant name="STRETCH_TILE" value="2">
+ Tile inside the node's bounding rectangle.
+ </constant>
+ <constant name="STRETCH_KEEP" value="3">
+ The texture keeps its original size and stays in the bounding rectangle's top-left corner.
+ </constant>
+ <constant name="STRETCH_KEEP_CENTERED" value="4">
+ The texture keeps its original size and stays centered in the node's bounding rectangle.
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT" value="5">
+ Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6">
+ Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.
+ </constant>
+ <constant name="STRETCH_KEEP_ASPECT_COVERED" value="7">
+ Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
new file mode 100644
index 0000000000..4dd45ac821
--- /dev/null
+++ b/doc/classes/Theme.xml
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Theme" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Theme for controls.
+ </brief_description>
+ <description>
+ Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it.
+ Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_stylebox">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="copy_default_theme">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_color_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_constant" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_constant_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_default_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_font" qualifiers="const">
+ <return type="Font">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_font_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_stylebox" qualifiers="const">
+ <return type="StyleBox">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_stylebox_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_stylebox_types" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_type_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_constant" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_font" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_icon" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_stylebox" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="constant" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_default_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="Font">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="font" type="Font">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_stylebox">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="texture" type="StyleBox">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
new file mode 100644
index 0000000000..2156d04614
--- /dev/null
+++ b/doc/classes/Thread.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Thread" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A unit of execution in a process.
+ </brief_description>
+ <description>
+ A unit of execution in a process. Can run methods on [Object]\ s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_id" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the current [Thread]\ s id, uniquely identifying it among all threads.
+ </description>
+ </method>
+ <method name="is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish].
+ </description>
+ </method>
+ <method name="start">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="instance" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <argument index="2" name="userdata" type="Variant" default="null">
+ </argument>
+ <argument index="3" name="priority" type="int" default="1">
+ </argument>
+ <description>
+ Starts a new [Thread] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [Thread] can be changed by passing a PRIORITY_* enum.
+ Returns OK on success, or ERR_CANT_CREATE on failure.
+ </description>
+ </method>
+ <method name="wait_to_finish">
+ <return type="Variant">
+ </return>
+ <description>
+ Joins the [Thread] and waits for it to finish. Returns what the method called returned.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="PRIORITY_LOW" value="0">
+ </constant>
+ <constant name="PRIORITY_NORMAL" value="1">
+ </constant>
+ <constant name="PRIORITY_HIGH" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
new file mode 100644
index 0000000000..e1a6c0b523
--- /dev/null
+++ b/doc/classes/TileMap.xml
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileMap" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node for 2D tile-based maps.
+ </brief_description>
+ <description>
+ Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear all cells.
+ </description>
+ </method>
+ <method name="get_cell" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Return the tile index of the referenced cell.
+ </description>
+ </method>
+ <method name="get_cell_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the cell size.
+ </description>
+ </method>
+ <method name="get_cellv" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Return the tile index of the cell referenced by a Vector2.
+ </description>
+ </method>
+ <method name="get_center_x" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner).
+ </description>
+ </method>
+ <method name="get_center_y" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner).
+ </description>
+ </method>
+ <method name="get_collision_bounce" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the collision bounce parameter.
+ </description>
+ </method>
+ <method name="get_collision_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the collision friction parameter.
+ </description>
+ </method>
+ <method name="get_collision_layer" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the collision layer.
+ </description>
+ </method>
+ <method name="get_collision_layer_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the collision mask.
+ </description>
+ </method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_use_kinematic" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the tilemap handles collisions as a kinematic body.
+ </description>
+ </method>
+ <method name="get_custom_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Return the custom transform matrix.
+ </description>
+ </method>
+ <method name="get_half_offset" qualifiers="const">
+ <return type="int" enum="TileMap.HalfOffset">
+ </return>
+ <description>
+ Return the current half offset configuration.
+ </description>
+ </method>
+ <method name="get_mode" qualifiers="const">
+ <return type="int" enum="TileMap.Mode">
+ </return>
+ <description>
+ Return the orientation mode.
+ </description>
+ </method>
+ <method name="get_occluder_light_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_quadrant_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the quadrant size.
+ </description>
+ </method>
+ <method name="get_tile_origin" qualifiers="const">
+ <return type="int" enum="TileMap.TileOrigin">
+ </return>
+ <description>
+ Return the tile origin configuration.
+ </description>
+ </method>
+ <method name="get_tileset" qualifiers="const">
+ <return type="TileSet">
+ </return>
+ <description>
+ Return the current tileset.
+ </description>
+ </method>
+ <method name="get_used_cells" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
+ </description>
+ </method>
+ <method name="get_used_cells_by_id" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_used_rect">
+ <return type="Rect2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_cell_transposed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
+ </description>
+ </method>
+ <method name="is_cell_x_flipped" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Return whether the referenced cell is flipped over the X axis.
+ </description>
+ </method>
+ <method name="is_cell_y_flipped" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Return whether the referenced cell is flipped over the Y axis.
+ </description>
+ </method>
+ <method name="is_y_sort_mode_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return the Y sort mode.
+ </description>
+ </method>
+ <method name="map_to_world" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="mappos" type="Vector2">
+ </argument>
+ <argument index="1" name="ignore_half_ofs" type="bool" default="false">
+ </argument>
+ <description>
+ Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
+ Optionally, the tilemap's potential half offset can be ignored.
+ </description>
+ </method>
+ <method name="set_cell">
+ <return type="void">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="tile" type="int">
+ </argument>
+ <argument index="3" name="flip_x" type="bool" default="false">
+ </argument>
+ <argument index="4" name="flip_y" type="bool" default="false">
+ </argument>
+ <argument index="5" name="transpose" type="bool" default="false">
+ </argument>
+ <description>
+ Set the tile index for the cell referenced by its grid-based X and Y coordinates.
+ A tile index of -1 clears the cell.
+ Optionally, the tile can also be flipped over the X and Y coordinates or transposed.
+ </description>
+ </method>
+ <method name="set_cell_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Set the cell size.
+ </description>
+ </method>
+ <method name="set_cellv">
+ <return type="void">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <argument index="1" name="tile" type="int">
+ </argument>
+ <argument index="2" name="flip_x" type="bool" default="false">
+ </argument>
+ <argument index="3" name="flip_y" type="bool" default="false">
+ </argument>
+ <argument index="4" name="transpose" type="bool" default="false">
+ </argument>
+ <description>
+ Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
+ A tile index of -1 clears the cell.
+ Optionally, the tile can also be flipped over the X and Y axes or transposed.
+ </description>
+ </method>
+ <method name="set_center_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner).
+ </description>
+ </method>
+ <method name="set_center_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner).
+ </description>
+ </method>
+ <method name="set_collision_bounce">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Set the collision bounce parameter. Allowable values range from 0 to 1.
+ </description>
+ </method>
+ <method name="set_collision_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Set the collision friction parameter. Allowable values range from 0 to 1.
+ </description>
+ </method>
+ <method name="set_collision_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="layer" type="int">
+ </argument>
+ <description>
+ Set the collision layer.
+ Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1.
+ </description>
+ </method>
+ <method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ Set the collision masks.
+ Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1.
+ </description>
+ </method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collision_use_kinematic">
+ <return type="void">
+ </return>
+ <argument index="0" name="use_kinematic" type="bool">
+ </argument>
+ <description>
+ Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled).
+ </description>
+ </method>
+ <method name="set_custom_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="custom_transform" type="Transform2D">
+ </argument>
+ <description>
+ Set custom transform matrix, to use in combination with the custom orientation mode.
+ </description>
+ </method>
+ <method name="set_half_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="half_offset" type="int" enum="TileMap.HalfOffset">
+ </argument>
+ <description>
+ Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
+ Half offset sets every other tile off by a half tile size in the specified direction.
+ </description>
+ </method>
+ <method name="set_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="TileMap.Mode">
+ </argument>
+ <description>
+ Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
+ </description>
+ </method>
+ <method name="set_occluder_light_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_quadrant_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time.
+ Allowed values are integers ranging from 1 to 128.
+ </description>
+ </method>
+ <method name="set_tile_origin">
+ <return type="void">
+ </return>
+ <argument index="0" name="origin" type="int" enum="TileMap.TileOrigin">
+ </argument>
+ <description>
+ Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
+ </description>
+ </method>
+ <method name="set_tileset">
+ <return type="void">
+ </return>
+ <argument index="0" name="tileset" type="TileSet">
+ </argument>
+ <description>
+ Set the current tileset.
+ </description>
+ </method>
+ <method name="set_y_sort_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate.
+ A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size.
+ </description>
+ </method>
+ <method name="world_to_map" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="worldpos" type="Vector2">
+ </argument>
+ <description>
+ Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform">
+ The custom [Transform2D] to be applied to the TileMap's cells.
+ </member>
+ <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset">
+ Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED.
+ </member>
+ <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size">
+ The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.
+ </member>
+ <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size">
+ The TileMap's cell size.
+ </member>
+ <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin">
+ Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT.
+ </member>
+ <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled">
+ If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code].
+ </member>
+ <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce">
+ Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0.
+ </member>
+ <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction">
+ Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1.
+ </member>
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The collision layer(s) for all colliders in the TileMap.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The collision mask(s) for all colliders in the TileMap.
+ </member>
+ <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic">
+ If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code].
+ </member>
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode">
+ The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE.
+ </member>
+ <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask">
+ The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
+ </member>
+ <member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data">
+ A [PoolIntArray] containing
+ </member>
+ <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
+ The assigned [TileSet].
+ </member>
+ </members>
+ <signals>
+ <signal name="settings_changed">
+ <description>
+ Emitted when a tilemap setting has changed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="INVALID_CELL" value="-1" enum="">
+ Returned when a cell doesn't exist.
+ </constant>
+ <constant name="MODE_SQUARE" value="0">
+ Orthogonal orientation mode.
+ </constant>
+ <constant name="MODE_ISOMETRIC" value="1">
+ Isometric orientation mode.
+ </constant>
+ <constant name="MODE_CUSTOM" value="2">
+ Custom orientation mode.
+ </constant>
+ <constant name="HALF_OFFSET_X" value="0">
+ Half offset on the X coordinate.
+ </constant>
+ <constant name="HALF_OFFSET_Y" value="1">
+ Half offset on the Y coordinate.
+ </constant>
+ <constant name="HALF_OFFSET_DISABLED" value="2">
+ Half offset disabled.
+ </constant>
+ <constant name="TILE_ORIGIN_TOP_LEFT" value="0">
+ Tile origin at its top-left corner.
+ </constant>
+ <constant name="TILE_ORIGIN_CENTER" value="1">
+ Tile origin at its center.
+ </constant>
+ <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
new file mode 100644
index 0000000000..a858138144
--- /dev/null
+++ b/doc/classes/TileSet.xml
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileSet" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Tile library for tilemaps.
+ </brief_description>
+ <description>
+ A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
+ Tiles are referenced by a unique integer ID.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear all tiles.
+ </description>
+ </method>
+ <method name="create_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Create a new tile which will be referenced by the given ID.
+ </description>
+ </method>
+ <method name="find_tile_by_name" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Find the first tile matching the given name.
+ </description>
+ </method>
+ <method name="get_last_unused_tile_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Return the ID following the last currently used ID, useful when creating a new tile.
+ </description>
+ </method>
+ <method name="get_tiles_ids" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Return an array of all currently used tile IDs.
+ </description>
+ </method>
+ <method name="remove_tile">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Remove the tile referenced by the given ID.
+ </description>
+ </method>
+ <method name="tile_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape" type="Shape2D">
+ </argument>
+ <argument index="2" name="shape_transform" type="Transform2D">
+ </argument>
+ <argument index="3" name="one_way" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_light_occluder" qualifiers="const">
+ <return type="OccluderPolygon2D">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the light occluder of the tile.
+ </description>
+ </method>
+ <method name="tile_get_material" qualifiers="const">
+ <return type="ShaderMaterial">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the material of the tile.
+ </description>
+ </method>
+ <method name="tile_get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the name of the tile.
+ </description>
+ </method>
+ <method name="tile_get_navigation_polygon" qualifiers="const">
+ <return type="NavigationPolygon">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the navigation polygon of the tile.
+ </description>
+ </method>
+ <method name="tile_get_navigation_polygon_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the offset of the tile's navigation polygon.
+ </description>
+ </method>
+ <method name="tile_get_normal_map" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_occluder_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the offset of the tile's light occluder.
+ </description>
+ </method>
+ <method name="tile_get_region" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the tile sub-region in the texture.
+ </description>
+ </method>
+ <method name="tile_get_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_shape_one_way" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_shape_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_get_shapes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the array of shapes of the tile.
+ </description>
+ </method>
+ <method name="tile_get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the texture of the tile.
+ </description>
+ </method>
+ <method name="tile_get_texture_offset" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the texture offset of the tile.
+ </description>
+ </method>
+ <method name="tile_set_light_occluder">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="light_occluder" type="OccluderPolygon2D">
+ </argument>
+ <description>
+ Set a light occluder for the tile.
+ </description>
+ </method>
+ <method name="tile_set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="material" type="ShaderMaterial">
+ </argument>
+ <description>
+ Set the material of the tile.
+ </description>
+ </method>
+ <method name="tile_set_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ Set the name of the tile, for descriptive purposes.
+ </description>
+ </method>
+ <method name="tile_set_navigation_polygon">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="navigation_polygon" type="NavigationPolygon">
+ </argument>
+ <description>
+ Set a navigation polygon for the tile.
+ </description>
+ </method>
+ <method name="tile_set_navigation_polygon_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="navigation_polygon_offset" type="Vector2">
+ </argument>
+ <description>
+ Set an offset for the tile's navigation polygon.
+ </description>
+ </method>
+ <method name="tile_set_normal_map">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="normal_map" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_occluder_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="occluder_offset" type="Vector2">
+ </argument>
+ <description>
+ Set an offset for the tile's light occluder.
+ </description>
+ </method>
+ <method name="tile_set_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="region" type="Rect2">
+ </argument>
+ <description>
+ Set the tile sub-region in the texture. This is common in texture atlases.
+ </description>
+ </method>
+ <method name="tile_set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <argument index="2" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_shape_one_way">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <argument index="2" name="one_way" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_shape_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <argument index="2" name="shape_transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="tile_set_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shapes" type="Array">
+ </argument>
+ <description>
+ Set an array of shapes for the tile, enabling physics to collide with it.
+ </description>
+ </method>
+ <method name="tile_set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Set the texture of the tile.
+ </description>
+ </method>
+ <method name="tile_set_texture_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="texture_offset" type="Vector2">
+ </argument>
+ <description>
+ Set the texture offset of the tile.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
new file mode 100644
index 0000000000..35979bb1fc
--- /dev/null
+++ b/doc/classes/Timer.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Timer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ A countdown timer.
+ </brief_description>
+ <description>
+ Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_time_left" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the time left for timeout in seconds if the timer is active, 0 otherwise.
+ </description>
+ </method>
+ <method name="get_timer_process_mode" qualifiers="const">
+ <return type="int" enum="Timer.TimerProcessMode">
+ </return>
+ <description>
+ Return the timer's processing mode.
+ </description>
+ </method>
+ <method name="get_wait_time" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the wait time in seconds.
+ </description>
+ </method>
+ <method name="has_autostart" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if set to automatically start when entering the scene.
+ </description>
+ </method>
+ <method name="is_one_shot" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return true if configured as one-shot.
+ </description>
+ </method>
+ <method name="is_paused" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return if the timer is paused or not.
+ </description>
+ </method>
+ <method name="is_stopped" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_autostart">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set to automatically start when entering the scene.
+ </description>
+ </method>
+ <method name="set_one_shot">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart.
+ </description>
+ </method>
+ <method name="set_paused">
+ <return type="void">
+ </return>
+ <argument index="0" name="paused" type="bool">
+ </argument>
+ <description>
+ Set whether the timer is paused or not. A paused timer will be inactive until it is unpaused again.
+ </description>
+ </method>
+ <method name="set_timer_process_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Timer.TimerProcessMode">
+ </argument>
+ <description>
+ Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument).
+ </description>
+ </method>
+ <method name="set_wait_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="time_sec" type="float">
+ </argument>
+ <description>
+ Set wait time in seconds. When the time is over, it will emit the timeout signal.
+ </description>
+ </method>
+ <method name="start">
+ <return type="void">
+ </return>
+ <description>
+ Start the Timer.
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stop (cancel) the Timer.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart">
+ If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code].
+ </member>
+ <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot">
+ If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code].
+ </member>
+ <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode">
+ Processing mode. Uses TIMER_PROCESS_* constants as value.
+ </member>
+ <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time">
+ Wait time in seconds.
+ </member>
+ </members>
+ <signals>
+ <signal name="timeout">
+ <description>
+ Emitted when the Timer reaches 0.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TIMER_PROCESS_FIXED" value="0">
+ Update the Timer at fixed intervals (framerate processing).
+ </constant>
+ <constant name="TIMER_PROCESS_IDLE" value="1">
+ Update the Timer during the idle time at each frame.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml
new file mode 100644
index 0000000000..7723dadb83
--- /dev/null
+++ b/doc/classes/ToolButton.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ToolButton" inherits="Button" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Flat button helper class.
+ </brief_description>
+ <description>
+ This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to:
+
+ [codeblock]
+ var btn = Button.new()
+ btn.set_flat(true)
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_disabled" type="Color">
+ </theme_item>
+ <theme_item name="font_color_hover" type="Color">
+ </theme_item>
+ <theme_item name="font_color_pressed" type="Color">
+ </theme_item>
+ <theme_item name="hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="pressed" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
new file mode 100644
index 0000000000..8a96fa1454
--- /dev/null
+++ b/doc/classes/TouchScreenButton.xml
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_action" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_bitmask" qualifiers="const">
+ <return type="BitMap">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_shape" qualifiers="const">
+ <return type="Shape2D">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_texture_pressed" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_visibility_mode" qualifiers="const">
+ <return type="int" enum="TouchScreenButton.VisibilityMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_passby_press_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_pressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_centered" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_action">
+ <return type="void">
+ </return>
+ <argument index="0" name="action" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_bitmask">
+ <return type="void">
+ </return>
+ <argument index="0" name="bitmask" type="BitMap">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_passby_press">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape_centered">
+ <return type="void">
+ </return>
+ <argument index="0" name="bool" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shape_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="bool" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_texture_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_pressed" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_visibility_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="TouchScreenButton.VisibilityMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="action" type="String" setter="set_action" getter="get_action">
+ </member>
+ <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
+ </member>
+ <member name="normal" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled">
+ </member>
+ <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed">
+ </member>
+ <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
+ </member>
+ <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered">
+ </member>
+ <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible">
+ </member>
+ <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode">
+ </member>
+ </members>
+ <signals>
+ <signal name="pressed">
+ <description>
+ </description>
+ </signal>
+ <signal name="released">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="VISIBILITY_ALWAYS" value="0">
+ </constant>
+ <constant name="VISIBILITY_TOUCHSCREEN_ONLY" value="1">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
new file mode 100644
index 0000000000..6780de1943
--- /dev/null
+++ b/doc/classes/Transform.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Transform" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 3D Transformation. 3x4 matrix.
+ </brief_description>
+ <description>
+ Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Transform">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="x_axis" type="Vector3">
+ </argument>
+ <argument index="1" name="y_axis" type="Vector3">
+ </argument>
+ <argument index="2" name="z_axis" type="Vector3">
+ </argument>
+ <argument index="3" name="origin" type="Vector3">
+ </argument>
+ <description>
+ Constructs the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled).
+ </description>
+ </method>
+ <method name="Transform">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="basis" type="Basis">
+ </argument>
+ <argument index="1" name="origin" type="Vector3">
+ </argument>
+ <description>
+ Constructs the Transform from a [Basis] and [Vector3].
+ </description>
+ </method>
+ <method name="Transform">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <description>
+ Constructs the Transform from a [Transform2D].
+ </description>
+ </method>
+ <method name="Transform">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="from" type="Quat">
+ </argument>
+ <description>
+ Constructs the Transform from a [Quat]. The origin will be Vector3(0, 0, 0).
+ </description>
+ </method>
+ <method name="Transform">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="from" type="Basis">
+ </argument>
+ <description>
+ Constructs the Transform from a [Basis]. The origin will be Vector3(0, 0, 0).
+ </description>
+ </method>
+ <method name="affine_inverse">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation.
+ </description>
+ </method>
+ <method name="interpolate_with">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="transform" type="Transform">
+ </argument>
+ <argument index="1" name="weight" type="float">
+ </argument>
+ <description>
+ Interpolates the transform to other Transform by weight amount (0-1).
+ </description>
+ </method>
+ <method name="inverse">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
+ </description>
+ </method>
+ <method name="looking_at">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="target" type="Vector3">
+ </argument>
+ <argument index="1" name="up" type="Vector3">
+ </argument>
+ <description>
+ Rotate the transform around the up vector to face the target.
+ </description>
+ </method>
+ <method name="orthonormalized">
+ <return type="Transform">
+ </return>
+ <description>
+ Returns the transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
+ </description>
+ </method>
+ <method name="rotated">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="phi" type="float">
+ </argument>
+ <description>
+ Rotates the transform around given axis by phi. The axis must be a normalized vector.
+ </description>
+ </method>
+ <method name="scaled">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ Scales the transform by the specified 3D scaling factors.
+ </description>
+ </method>
+ <method name="translated">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="ofs" type="Vector3">
+ </argument>
+ <description>
+ Translates the transform by the specified offset.
+ </description>
+ </method>
+ <method name="xform">
+ <return type="var">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Transforms the given vector "v" by this transform.
+ </description>
+ </method>
+ <method name="xform_inv">
+ <return type="var">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Inverse-transforms the given vector "v" by this transform.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="basis" type="Basis" setter="" getter="">
+ The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ </member>
+ <member name="origin" type="Vector3" setter="" getter="">
+ The translation offset of the transform.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
new file mode 100644
index 0000000000..4cbe9123f1
--- /dev/null
+++ b/doc/classes/Transform2D.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Transform2D" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ 2D Transformation. 3x2 matrix.
+ </brief_description>
+ <description>
+ Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Transform2D">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="from" type="Transform">
+ </argument>
+ <description>
+ Constructs the [Transform2D] from a 3D [Transform].
+ </description>
+ </method>
+ <method name="Transform2D">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="x_axis" type="Vector2">
+ </argument>
+ <argument index="1" name="y_axis" type="Vector2">
+ </argument>
+ <argument index="2" name="origin" type="Vector2">
+ </argument>
+ <description>
+ Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin.
+ </description>
+ </method>
+ <method name="Transform2D">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="rot" type="float">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Constructs the [Transform2D] from rotation angle in radians and position [Vector2].
+ </description>
+ </method>
+ <method name="affine_inverse">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Returns the inverse of the matrix.
+ </description>
+ </method>
+ <method name="basis_xform">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Transforms the given vector "v" by this transform basis (no translation).
+ </description>
+ </method>
+ <method name="basis_xform_inv">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Inverse-transforms the given vector "v" by this transform basis (no translation).
+ </description>
+ </method>
+ <method name="get_origin">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the origin [Vector2] (translation).
+ </description>
+ </method>
+ <method name="get_rotation">
+ <return type="float">
+ </return>
+ <description>
+ Returns the rotation (in radians).
+ </description>
+ </method>
+ <method name="get_scale">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the scale.
+ </description>
+ </method>
+ <method name="interpolate_with">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="transform" type="Transform2D">
+ </argument>
+ <argument index="1" name="weight" type="float">
+ </argument>
+ <description>
+ Interpolates the transform to other Transform2D by weight amount (0-1).
+ </description>
+ </method>
+ <method name="inverse">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
+ </description>
+ </method>
+ <method name="orthonormalized">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Returns the transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
+ </description>
+ </method>
+ <method name="rotated">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="phi" type="float">
+ </argument>
+ <description>
+ Rotates the transform by phi.
+ </description>
+ </method>
+ <method name="scaled">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="scale" type="Vector2">
+ </argument>
+ <description>
+ Scales the transform by the specified 2D scaling factors.
+ </description>
+ </method>
+ <method name="translated">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <description>
+ Translates the transform by the specified offset.
+ </description>
+ </method>
+ <method name="xform">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Transforms the given vector "v" by this transform.
+ </description>
+ </method>
+ <method name="xform_inv">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="v" type="var">
+ </argument>
+ <description>
+ Inverse-transforms the given vector "v" by this transform.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="origin" type="Vector2" setter="" getter="">
+ The translation offset of the transform.
+ </member>
+ <member name="x" type="Vector2" setter="" getter="">
+ The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ </member>
+ <member name="y" type="Vector2" setter="" getter="">
+ The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
new file mode 100644
index 0000000000..c0707d26b8
--- /dev/null
+++ b/doc/classes/Translation.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Translation" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Language Translation.
+ </brief_description>
+ <description>
+ Translations are resources that can be loaded/unloaded on demand. They map a string to another string.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_message">
+ <return type="void">
+ </return>
+ <argument index="0" name="src_message" type="String">
+ </argument>
+ <argument index="1" name="xlated_message" type="String">
+ </argument>
+ <description>
+ Add a message for translation.
+ </description>
+ </method>
+ <method name="erase_message">
+ <return type="void">
+ </return>
+ <argument index="0" name="src_message" type="String">
+ </argument>
+ <description>
+ Erase a message.
+ </description>
+ </method>
+ <method name="get_locale" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the locale of the translation.
+ </description>
+ </method>
+ <method name="get_message" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="src_message" type="String">
+ </argument>
+ <description>
+ Return a message for translation.
+ </description>
+ </method>
+ <method name="get_message_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_message_list" qualifiers="const">
+ <return type="PoolStringArray">
+ </return>
+ <description>
+ Return all the messages (keys).
+ </description>
+ </method>
+ <method name="set_locale">
+ <return type="void">
+ </return>
+ <argument index="0" name="locale" type="String">
+ </argument>
+ <description>
+ Set the locale of the translation.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="locale" type="String" setter="set_locale" getter="get_locale">
+ </member>
+ <member name="messages" type="PoolStringArray" setter="_set_messages" getter="_get_messages">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
new file mode 100644
index 0000000000..974b0e283f
--- /dev/null
+++ b/doc/classes/TranslationServer.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TranslationServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Server that manages all translations. Translations can be set to it and removed from it.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_translation">
+ <return type="void">
+ </return>
+ <argument index="0" name="translation" type="Translation">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_locale" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_translation">
+ <return type="void">
+ </return>
+ <argument index="0" name="translation" type="Translation">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_locale">
+ <return type="void">
+ </return>
+ <argument index="0" name="locale" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="translate" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="message" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
new file mode 100644
index 0000000000..a92a51049b
--- /dev/null
+++ b/doc/classes/Tree.xml
@@ -0,0 +1,495 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Tree" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Control to show a tree of items.
+ </brief_description>
+ <description>
+ This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structural displaying and interactions.
+ Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple root can be simulated if a dummy hidden root is added.
+ [codeblock]
+ func _ready():
+ var tree = Tree.new()
+ var root = tree.create_item()
+ tree.set_hide_root(true)
+ var child1 = tree.create_item(root)
+ var child2 = tree.create_item(root)
+ var subchild1 = tree.create_item(child1)
+ subchild1.set_text(0, "Subchild1")
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="are_column_titles_visible" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether the column titles are being shown.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clear the tree. This erases all of the items.
+ </description>
+ </method>
+ <method name="create_item">
+ <return type="Object">
+ </return>
+ <argument index="0" name="parent" type="Object" default="null">
+ </argument>
+ <description>
+ Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty.
+ </description>
+ </method>
+ <method name="ensure_cursor_is_visible">
+ <return type="void">
+ </return>
+ <description>
+ Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight.
+ </description>
+ </method>
+ <method name="get_allow_reselect" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_allow_rmb_select" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether a right click can select items.
+ </description>
+ </method>
+ <method name="get_column_at_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Get the column index under the given point.
+ </description>
+ </method>
+ <method name="get_column_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Get the title of the given column.
+ </description>
+ </method>
+ <method name="get_column_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Get the width of the given column in pixels.
+ </description>
+ </method>
+ <method name="get_columns" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the amount of columns.
+ </description>
+ </method>
+ <method name="get_custom_popup_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode].
+ </description>
+ </method>
+ <method name="get_drop_mode_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the flags of the current drop mode.
+ </description>
+ </method>
+ <method name="get_drop_section_at_pos" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_edited" qualifiers="const">
+ <return type="TreeItem">
+ </return>
+ <description>
+ Get the current edited item. This is only available for custom cell mode.
+ </description>
+ </method>
+ <method name="get_edited_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the column of the cell for the current edited icon. This is only available for custom cell mode.
+ </description>
+ </method>
+ <method name="get_item_area_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="item" type="Object">
+ </argument>
+ <argument index="1" name="column" type="int" default="-1">
+ </argument>
+ <description>
+ Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
+ </description>
+ </method>
+ <method name="get_item_at_pos" qualifiers="const">
+ <return type="TreeItem">
+ </return>
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Get the tree item at the specified position (relative to the tree origin position).
+ </description>
+ </method>
+ <method name="get_next_selected">
+ <return type="TreeItem">
+ </return>
+ <argument index="0" name="from" type="Object">
+ </argument>
+ <description>
+ Get the next selected item after the given one.
+ </description>
+ </method>
+ <method name="get_pressed_button" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the index of the last pressed button.
+ </description>
+ </method>
+ <method name="get_root">
+ <return type="TreeItem">
+ </return>
+ <description>
+ Get the root item of the tree.
+ </description>
+ </method>
+ <method name="get_scroll" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Get the current scrolling position.
+ </description>
+ </method>
+ <method name="get_selected" qualifiers="const">
+ <return type="TreeItem">
+ </return>
+ <description>
+ Get the currently selected item.
+ </description>
+ </method>
+ <method name="get_selected_column" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the column number of the current selection.
+ </description>
+ </method>
+ <method name="is_folding_hidden" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether the folding arrow is hidden.
+ </description>
+ </method>
+ <method name="set_allow_reselect">
+ <return type="void">
+ </return>
+ <argument index="0" name="allow" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_allow_rmb_select">
+ <return type="void">
+ </return>
+ <argument index="0" name="allow" type="bool">
+ </argument>
+ <description>
+ Set whether or not a right mouse button click can select items.
+ </description>
+ </method>
+ <method name="set_column_expand">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="expand" type="bool">
+ </argument>
+ <description>
+ Set whether a column will have the "Expand" flag of [Control].
+ </description>
+ </method>
+ <method name="set_column_min_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="min_width" type="int">
+ </argument>
+ <description>
+ Set the minimum width of a column.
+ </description>
+ </method>
+ <method name="set_column_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
+ <description>
+ Set the title of a column.
+ </description>
+ </method>
+ <method name="set_column_titles_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
+ <description>
+ Set whether the column titles visibility.
+ </description>
+ </method>
+ <method name="set_columns">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ Set the amount of columns.
+ </description>
+ </method>
+ <method name="set_drop_mode_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ Set the drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants.
+ </description>
+ </method>
+ <method name="set_hide_folding">
+ <return type="void">
+ </return>
+ <argument index="0" name="hide" type="bool">
+ </argument>
+ <description>
+ Set whether the folding arrow should be hidden.
+ </description>
+ </method>
+ <method name="set_hide_root">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the root of the tree should be hidden.
+ </description>
+ </method>
+ <method name="set_select_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Tree.SelectMode">
+ </argument>
+ <description>
+ Set the selection mode. Use one of the [code]SELECT_*[/code] constants.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="button_pressed">
+ <argument index="0" name="item" type="Object">
+ </argument>
+ <argument index="1" name="column" type="int">
+ </argument>
+ <argument index="2" name="id" type="int">
+ </argument>
+ <description>
+ Emitted when a button on the tree was pressed (see [method TreeItem.add_button]).
+ </description>
+ </signal>
+ <signal name="cell_selected">
+ <description>
+ Emitted when a cell is selected.
+ </description>
+ </signal>
+ <signal name="column_title_pressed">
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="custom_popup_edited">
+ <argument index="0" name="arrow_clicked" type="bool">
+ </argument>
+ <description>
+ Emitted when a cell with the [code]CELL_MODE_CUSTOM[/code] is clicked to be edited.
+ </description>
+ </signal>
+ <signal name="empty_tree_rmb_selected">
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty.
+ </description>
+ </signal>
+ <signal name="item_activated">
+ <description>
+ Emitted when an item is activated (double-clicked).
+ </description>
+ </signal>
+ <signal name="item_collapsed">
+ <argument index="0" name="item" type="Object">
+ </argument>
+ <description>
+ Emitted when an item is collapsed by a click on the folding arrow.
+ </description>
+ </signal>
+ <signal name="item_custom_button_pressed">
+ <description>
+ </description>
+ </signal>
+ <signal name="item_double_clicked">
+ <description>
+ </description>
+ </signal>
+ <signal name="item_edited">
+ <description>
+ Emitted when an item is editted.
+ </description>
+ </signal>
+ <signal name="item_rmb_edited">
+ <description>
+ </description>
+ </signal>
+ <signal name="item_rmb_selected">
+ <argument index="0" name="pos" type="Vector2">
+ </argument>
+ <description>
+ Emitted when an item is selected with right mouse button.
+ </description>
+ </signal>
+ <signal name="item_selected">
+ <description>
+ Emitted when an item is selected with right mouse button.
+ </description>
+ </signal>
+ <signal name="multi_selected">
+ <argument index="0" name="item" type="Object">
+ </argument>
+ <argument index="1" name="column" type="int">
+ </argument>
+ <argument index="2" name="selected" type="bool">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="SELECT_SINGLE" value="0">
+ </constant>
+ <constant name="SELECT_ROW" value="1">
+ </constant>
+ <constant name="SELECT_MULTI" value="2">
+ </constant>
+ <constant name="DROP_MODE_DISABLED" value="0">
+ </constant>
+ <constant name="DROP_MODE_ON_ITEM" value="1">
+ </constant>
+ <constant name="DROP_MODE_INBETWEEN" value="2">
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="arrow" type="Texture">
+ </theme_item>
+ <theme_item name="arrow_collapsed" type="Texture">
+ </theme_item>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="bg_focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="button_margin" type="int">
+ </theme_item>
+ <theme_item name="button_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="checked" type="Texture">
+ </theme_item>
+ <theme_item name="cursor" type="StyleBox">
+ </theme_item>
+ <theme_item name="cursor_color" type="Color">
+ </theme_item>
+ <theme_item name="cursor_unfocused" type="StyleBox">
+ </theme_item>
+ <theme_item name="custom_button" type="StyleBox">
+ </theme_item>
+ <theme_item name="custom_button_font_highlight" type="Color">
+ </theme_item>
+ <theme_item name="custom_button_hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="custom_button_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="draw_relationship_lines" type="int">
+ </theme_item>
+ <theme_item name="drop_position_color" type="Color">
+ </theme_item>
+ <theme_item name="font" type="Font">
+ </theme_item>
+ <theme_item name="font_color" type="Color">
+ </theme_item>
+ <theme_item name="font_color_selected" type="Color">
+ </theme_item>
+ <theme_item name="guide_color" type="Color">
+ </theme_item>
+ <theme_item name="guide_width" type="int">
+ </theme_item>
+ <theme_item name="hseparation" type="int">
+ </theme_item>
+ <theme_item name="item_margin" type="int">
+ </theme_item>
+ <theme_item name="relationship_line_color" type="Color">
+ </theme_item>
+ <theme_item name="scroll_border" type="int">
+ </theme_item>
+ <theme_item name="scroll_speed" type="int">
+ </theme_item>
+ <theme_item name="select_arrow" type="Texture">
+ </theme_item>
+ <theme_item name="selected" type="StyleBox">
+ </theme_item>
+ <theme_item name="selected_focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="selection_color" type="Color">
+ </theme_item>
+ <theme_item name="title_button_color" type="Color">
+ </theme_item>
+ <theme_item name="title_button_font" type="Font">
+ </theme_item>
+ <theme_item name="title_button_hover" type="StyleBox">
+ </theme_item>
+ <theme_item name="title_button_normal" type="StyleBox">
+ </theme_item>
+ <theme_item name="title_button_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="unchecked" type="Texture">
+ </theme_item>
+ <theme_item name="updown" type="Texture">
+ </theme_item>
+ <theme_item name="vseparation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
new file mode 100644
index 0000000000..d1e45bd10f
--- /dev/null
+++ b/doc/classes/TreeItem.xml
@@ -0,0 +1,555 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TreeItem" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_button">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="button" type="Texture">
+ </argument>
+ <argument index="2" name="button_idx" type="int" default="-1">
+ </argument>
+ <argument index="3" name="disabled" type="bool" default="false">
+ </argument>
+ <argument index="4" name="tooltip" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_custom_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_custom_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="deselect">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="erase_button">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="button_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_button" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="button_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_button_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_mode" qualifiers="const">
+ <return type="int" enum="TreeItem.TreeCellMode">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_children">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_bg_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_custom_minimum_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_expand_right" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon_max_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_icon_region" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_next">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_next_visible">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_parent">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_prev">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_prev_visible">
+ <return type="TreeItem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_range" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_range_config">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_text_align" qualifiers="const">
+ <return type="int" enum="TreeItem.TextAlign">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tooltip" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_button_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="button_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_checked" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_collapsed">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_custom_set_as_button" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_editable">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_folding_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_selectable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_selected">
+ <return type="bool">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="move_to_bottom">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="move_to_top">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_child">
+ <return type="void">
+ </return>
+ <argument index="0" name="child" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="select">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_button">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="button_idx" type="int">
+ </argument>
+ <argument index="2" name="button" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_checked">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="checked" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_collapsed">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_as_button">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="just_outline" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_draw">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="object" type="Object">
+ </argument>
+ <argument index="2" name="callback" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_minimum_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disable_folding">
+ <return type="void">
+ </return>
+ <argument index="0" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_editable">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_right">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon_max_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_icon_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="region" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_metadata">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="meta" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_range_config">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <argument index="3" name="step" type="float">
+ </argument>
+ <argument index="4" name="expr" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_selectable">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="selectable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_text">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_text_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tooltip">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="tooltip" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="CELL_MODE_STRING" value="0">
+ </constant>
+ <constant name="CELL_MODE_CHECK" value="1">
+ </constant>
+ <constant name="CELL_MODE_RANGE" value="2">
+ </constant>
+ <constant name="CELL_MODE_RANGE_EXPRESSION" value="3">
+ </constant>
+ <constant name="CELL_MODE_ICON" value="4">
+ </constant>
+ <constant name="CELL_MODE_CUSTOM" value="5">
+ </constant>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
new file mode 100644
index 0000000000..21b85c1d05
--- /dev/null
+++ b/doc/classes/TriangleMesh.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TriangleMesh" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
new file mode 100644
index 0000000000..790a82a60a
--- /dev/null
+++ b/doc/classes/Tween.xml
@@ -0,0 +1,477 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Tween" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Node useful for animations with unknown start and end points.
+ </brief_description>
+ <description>
+ Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior.
+ Because it is easy to get it wrong, here is a quick usage example:
+ [codeblock]
+ var tween = get_node("Tween")
+ tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
+ tween.start()
+ [/codeblock]
+ Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor.
+ Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="follow_method">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <argument index="2" name="initial_val" type="Variant">
+ </argument>
+ <argument index="3" name="target" type="Object">
+ </argument>
+ <argument index="4" name="target_method" type="String">
+ </argument>
+ <argument index="5" name="duration" type="float">
+ </argument>
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="8" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="follow_property">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="initial_val" type="Variant">
+ </argument>
+ <argument index="3" name="target" type="Object">
+ </argument>
+ <argument index="4" name="target_property" type="String">
+ </argument>
+ <argument index="5" name="duration" type="float">
+ </argument>
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="8" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="get_runtime" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished.
+ </description>
+ </method>
+ <method name="get_speed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the speed that has been set from editor GUI or [method set_repeat].
+ </description>
+ </method>
+ <method name="get_tween_process_mode" qualifiers="const">
+ <return type="int" enum="Tween.TweenProcessMode">
+ </return>
+ <description>
+ Returns the process mode that has been set from editor GUI or [method set_tween_process_mode]
+ </description>
+ </method>
+ <method name="interpolate_callback">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="duration" type="float">
+ </argument>
+ <argument index="2" name="callback" type="String">
+ </argument>
+ <argument index="3" name="arg1" type="Variant" default="null">
+ </argument>
+ <argument index="4" name="arg2" type="Variant" default="null">
+ </argument>
+ <argument index="5" name="arg3" type="Variant" default="null">
+ </argument>
+ <argument index="6" name="arg4" type="Variant" default="null">
+ </argument>
+ <argument index="7" name="arg5" type="Variant" default="null">
+ </argument>
+ <description>
+ Call [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ </description>
+ </method>
+ <method name="interpolate_deferred_callback">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="duration" type="float">
+ </argument>
+ <argument index="2" name="callback" type="String">
+ </argument>
+ <argument index="3" name="arg1" type="Variant" default="null">
+ </argument>
+ <argument index="4" name="arg2" type="Variant" default="null">
+ </argument>
+ <argument index="5" name="arg3" type="Variant" default="null">
+ </argument>
+ <argument index="6" name="arg4" type="Variant" default="null">
+ </argument>
+ <argument index="7" name="arg5" type="Variant" default="null">
+ </argument>
+ <description>
+ Call [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
+ </description>
+ </method>
+ <method name="interpolate_method">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <argument index="2" name="initial_val" type="Variant">
+ </argument>
+ <argument index="3" name="final_val" type="Variant">
+ </argument>
+ <argument index="4" name="duration" type="float">
+ </argument>
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="7" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="interpolate_property">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="initial_val" type="Variant">
+ </argument>
+ <argument index="3" name="final_val" type="Variant">
+ </argument>
+ <argument index="4" name="duration" type="float">
+ </argument>
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="7" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended.
+ </description>
+ </method>
+ <method name="is_repeat" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if repeat has been set from editor GUI or [method set_repeat].
+ </description>
+ </method>
+ <method name="remove">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object.
+ </description>
+ </method>
+ <method name="remove_all">
+ <return type="bool">
+ </return>
+ <description>
+ Stop animating and completely remove all tweens.
+ </description>
+ </method>
+ <method name="reset">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object.
+ </description>
+ </method>
+ <method name="reset_all">
+ <return type="bool">
+ </return>
+ <description>
+ Resets all tweens to their initial values (the ones given, not those before the tween).
+ </description>
+ </method>
+ <method name="resume">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object.
+ </description>
+ </method>
+ <method name="resume_all">
+ <return type="bool">
+ </return>
+ <description>
+ Continue animating all stopped tweens.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="bool">
+ </return>
+ <argument index="0" name="time" type="float">
+ </argument>
+ <description>
+ Seek the animation to the given [code]time[/code] in seconds.
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this.
+ </description>
+ </method>
+ <method name="set_repeat">
+ <return type="void">
+ </return>
+ <argument index="0" name="repeat" type="bool">
+ </argument>
+ <description>
+ Make the tween repeat after all tweens have finished.
+ </description>
+ </method>
+ <method name="set_speed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="float">
+ </argument>
+ <description>
+ Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this.
+ </description>
+ </method>
+ <method name="set_tween_process_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode">
+ </argument>
+ <description>
+ Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively).
+ </description>
+ </method>
+ <method name="start">
+ <return type="bool">
+ </return>
+ <description>
+ Start the tween node. You can define tweens both before and after this.
+ </description>
+ </method>
+ <method name="stop">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object.
+ </description>
+ </method>
+ <method name="stop_all">
+ <return type="bool">
+ </return>
+ <description>
+ Stop animating all tweens.
+ </description>
+ </method>
+ <method name="targeting_method">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <argument index="2" name="initial" type="Object">
+ </argument>
+ <argument index="3" name="initial_method" type="String">
+ </argument>
+ <argument index="4" name="final_val" type="Variant">
+ </argument>
+ <argument index="5" name="duration" type="float">
+ </argument>
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="8" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="targeting_property">
+ <return type="bool">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="initial" type="Object">
+ </argument>
+ <argument index="3" name="initial_val" type="String">
+ </argument>
+ <argument index="4" name="final_val" type="Variant">
+ </argument>
+ <argument index="5" name="duration" type="float">
+ </argument>
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
+ </argument>
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
+ </argument>
+ <argument index="8" name="delay" type="float" default="0">
+ </argument>
+ <description>
+ Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
+ [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description.
+ </description>
+ </method>
+ <method name="tell" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the current time of the tween.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode">
+ </member>
+ </members>
+ <signals>
+ <signal name="tween_completed">
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <description>
+ This signal is emitted when a tween ends.
+ </description>
+ </signal>
+ <signal name="tween_started">
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <description>
+ This signal is emitted when a tween starts.
+ </description>
+ </signal>
+ <signal name="tween_step">
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="key" type="String">
+ </argument>
+ <argument index="2" name="elapsed" type="float">
+ </argument>
+ <argument index="3" name="value" type="Object">
+ </argument>
+ <description>
+ This signal is emitted each step of the tweening.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TWEEN_PROCESS_FIXED" value="0">
+ The [Tween] should use [code]_fixed_process[/code] for timekeeping when this is enabled.
+ </constant>
+ <constant name="TWEEN_PROCESS_IDLE" value="1">
+ The [Tween] should use [code]_process[/code] for timekeeping when this is enabled (default).
+ </constant>
+ <constant name="TRANS_LINEAR" value="0">
+ Means that the animation is interpolated linearly.
+ </constant>
+ <constant name="TRANS_SINE" value="1">
+ Means that the animation is interpolated using a sine wave.
+ </constant>
+ <constant name="TRANS_QUINT" value="2">
+ Means that the animation is interpolated with a quinary (to the power of 5) function.
+ </constant>
+ <constant name="TRANS_QUART" value="3">
+ Means that the animation is interpolated with a quartic (to the power of 4) function.
+ </constant>
+ <constant name="TRANS_QUAD" value="4">
+ Means that the animation is interpolated with a quadratic (to the power of 2) function.
+ </constant>
+ <constant name="TRANS_EXPO" value="5">
+ Means that the animation is interpolated with an exponential (some number to the power of x) function.
+ </constant>
+ <constant name="TRANS_ELASTIC" value="6">
+ Means that the animation is interpolated with elasticity, wiggling around the edges.
+ </constant>
+ <constant name="TRANS_CUBIC" value="7">
+ Means that the animation is interpolated with a cubic (to the power of 3) function.
+ </constant>
+ <constant name="TRANS_CIRC" value="8">
+ Means that the animation is interpolated with a function using square roots.
+ </constant>
+ <constant name="TRANS_BOUNCE" value="9">
+ Means that the animation is interpolated by bouncing at, but never surpassing, the end.
+ </constant>
+ <constant name="TRANS_BACK" value="10">
+ Means that the animation is interpolated backing out at edges.
+ </constant>
+ <constant name="EASE_IN" value="0">
+ Signifies that the interpolation should be focused in the beginning.
+ </constant>
+ <constant name="EASE_OUT" value="1">
+ Signifies that the interpolation should be focused in the end.
+ </constant>
+ <constant name="EASE_IN_OUT" value="2">
+ Signifies that the interpolation should be focused in both ends.
+ </constant>
+ <constant name="EASE_OUT_IN" value="3">
+ Signifies that the interpolation should be focused in both ends, but they should be switched (a bit hard to explain, try it for yourself to be sure).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
new file mode 100644
index 0000000000..d450a8812e
--- /dev/null
+++ b/doc/classes/UndoRedo.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="UndoRedo" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Helper to manage UndoRedo in the editor or custom tools.
+ </brief_description>
+ <description>
+ Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists.
+ Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_do_method" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_do_property">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Set a property with a custom value.
+ </description>
+ </method>
+ <method name="add_do_reference">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <description>
+ Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
+ </description>
+ </method>
+ <method name="add_undo_method" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="method" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_undo_property">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="property" type="String">
+ </argument>
+ <argument index="2" name="value" type="Variant">
+ </argument>
+ <description>
+ Undo setting of a property with a custom value.
+ </description>
+ </method>
+ <method name="add_undo_reference">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <description>
+ Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!).
+ </description>
+ </method>
+ <method name="clear_history">
+ <return type="void">
+ </return>
+ <description>
+ Clear the undo/redo history and associated references.
+ </description>
+ </method>
+ <method name="commit_action">
+ <return type="void">
+ </return>
+ <description>
+ Commit the action. All 'do' methods/properties are called/set when this function is called.
+ </description>
+ </method>
+ <method name="create_action">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0">
+ </argument>
+ <description>
+ Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property].
+ </description>
+ </method>
+ <method name="get_current_action_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the name of the current action.
+ </description>
+ </method>
+ <method name="get_max_steps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_version" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically.
+ This is useful mostly to check if something changed from a saved version.
+ </description>
+ </method>
+ <method name="redo">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_steps">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_steps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="undo">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="MERGE_DISABLE" value="0">
+ </constant>
+ <constant name="MERGE_ENDS" value="1">
+ </constant>
+ <constant name="MERGE_ALL" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
new file mode 100644
index 0000000000..de544ed031
--- /dev/null
+++ b/doc/classes/VBoxContainer.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vertical box container.
+ </brief_description>
+ <description>
+ Vertical box container. See [BoxContainer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
new file mode 100644
index 0000000000..4510ac1e2e
--- /dev/null
+++ b/doc/classes/VScrollBar.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vertical version of [ScrollBar], which goes from left (min) to right (max).
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="decrement" type="Texture">
+ </theme_item>
+ <theme_item name="decrement_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="grabber" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_pressed" type="StyleBox">
+ </theme_item>
+ <theme_item name="increment" type="Texture">
+ </theme_item>
+ <theme_item name="increment_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="scroll" type="StyleBox">
+ </theme_item>
+ <theme_item name="scroll_focus" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
new file mode 100644
index 0000000000..f98473a148
--- /dev/null
+++ b/doc/classes/VSeparator.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VSeparator" inherits="Separator" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vertical version of [Separator].
+ </brief_description>
+ <description>
+ Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ <theme_item name="separator" type="StyleBox">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
new file mode 100644
index 0000000000..e4ba4a19c5
--- /dev/null
+++ b/doc/classes/VSlider.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VSlider" inherits="Slider" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vertical slider.
+ </brief_description>
+ <description>
+ Vertical slider. See [Slider]. This one goes from left (min) to right (max).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_disabled" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_disabled" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="grabber_highlight" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" type="StyleBox">
+ </theme_item>
+ <theme_item name="tick" type="Texture">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
new file mode 100644
index 0000000000..aac10841c3
--- /dev/null
+++ b/doc/classes/VSplitContainer.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vertical split container.
+ </brief_description>
+ <description>
+ Vertical split container. See [SplitContainer]. This goes from left to right.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="autohide" type="int">
+ </theme_item>
+ <theme_item name="bg" type="StyleBox">
+ </theme_item>
+ <theme_item name="grabber" type="Texture">
+ </theme_item>
+ <theme_item name="separation" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
new file mode 100644
index 0000000000..914ef10036
--- /dev/null
+++ b/doc/classes/Variant.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Variant" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ The most important data type in Godot.
+ </brief_description>
+ <description>
+ A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
new file mode 100644
index 0000000000..510559327f
--- /dev/null
+++ b/doc/classes/Vector2.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector2" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vector used for 2D Math.
+ </brief_description>
+ <description>
+ 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Vector2">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Constructs a new Vector2 from the given x and y.
+ </description>
+ </method>
+ <method name="abs">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="angle">
+ <return type="float">
+ </return>
+ <description>
+ Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
+ Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
+ </description>
+ </method>
+ <method name="angle_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Returns the angle in radians between the two vectors.
+ </description>
+ </method>
+ <method name="angle_to_point">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Returns the angle in radians between the line connecting the two points and the x coordinate.
+ </description>
+ </method>
+ <method name="aspect">
+ <return type="float">
+ </return>
+ <description>
+ Returns the ratio of X to Y.
+ </description>
+ </method>
+ <method name="bounce">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="n" type="Vector2">
+ </argument>
+ <description>
+ Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="clamped">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Returns the vector with a maximum length.
+ </description>
+ </method>
+ <method name="cubic_interpolate">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="b" type="Vector2">
+ </argument>
+ <argument index="1" name="pre_a" type="Vector2">
+ </argument>
+ <argument index="2" name="post_b" type="Vector2">
+ </argument>
+ <argument index="3" name="t" type="float">
+ </argument>
+ <description>
+ Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t".
+ </description>
+ </method>
+ <method name="distance_squared_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Returns the squared distance to vector "b". 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">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector2">
+ </argument>
+ <description>
+ Returns the distance to vector "b".
+ </description>
+ </method>
+ <method name="dot">
+ <return type="float">
+ </return>
+ <argument index="0" name="with" type="Vector2">
+ </argument>
+ <description>
+ Returns the dot product with vector "b".
+ </description>
+ </method>
+ <method name="floor">
+ <return type="Vector2">
+ </return>
+ <description>
+ Remove the fractional part of x and y.
+ </description>
+ </method>
+ <method name="is_normalized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the vector is normalized or not.
+ </description>
+ </method>
+ <method name="length">
+ <return type="float">
+ </return>
+ <description>
+ Returns the length of the vector.
+ </description>
+ </method>
+ <method name="length_squared">
+ <return type="float">
+ </return>
+ <description>
+ Returns the squared length of the vector. 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">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="b" type="Vector2">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Returns the result of the linear interpolation between this vector and "b", by amount "t".
+ </description>
+ </method>
+ <method name="normalized">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns a normalized vector to unit length.
+ </description>
+ </method>
+ <method name="reflect">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="n" type="Vector2">
+ </argument>
+ <description>
+ Reflects the vector along the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="rotated">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="phi" type="float">
+ </argument>
+ <description>
+ Rotates the vector by "phi" radians.
+ </description>
+ </method>
+ <method name="slide">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="n" type="Vector2">
+ </argument>
+ <description>
+ Slide returns the component of the vector along the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="snapped">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="by" type="Vector2">
+ </argument>
+ <description>
+ Snaps the vector to a grid with the given size.
+ </description>
+ </method>
+ <method name="tangent">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns a perpendicular vector.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="x" type="float" setter="" getter="">
+ X component of the vector.
+ </member>
+ <member name="y" type="float" setter="" getter="">
+ Y component of the vector.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
new file mode 100644
index 0000000000..fdbdabafd3
--- /dev/null
+++ b/doc/classes/Vector3.xml
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector3" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Vector class, which performs basic 3D vector math operations.
+ </brief_description>
+ <description>
+ Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="Vector3">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <argument index="2" name="z" type="float">
+ </argument>
+ <description>
+ Returns a Vector3 with the given components.
+ </description>
+ </method>
+ <method name="abs">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="angle_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="bounce">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="n" type="Vector3">
+ </argument>
+ <description>
+ Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="ceil">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns a new vector with all components rounded up.
+ </description>
+ </method>
+ <method name="cross">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <description>
+ Return the cross product with b.
+ </description>
+ </method>
+ <method name="cubic_interpolate">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <argument index="1" name="pre_a" type="Vector3">
+ </argument>
+ <argument index="2" name="post_b" type="Vector3">
+ </argument>
+ <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).
+ </description>
+ </method>
+ <method name="distance_squared_to">
+ <return type="float">
+ </return>
+ <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.
+ </description>
+ </method>
+ <method name="distance_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <description>
+ Return the distance to b.
+ </description>
+ </method>
+ <method name="dot">
+ <return type="float">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <description>
+ Return the dot product with b.
+ </description>
+ </method>
+ <method name="floor">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns a new vector with all components rounded down.
+ </description>
+ </method>
+ <method name="inverse">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
+ </description>
+ </method>
+ <method name="is_normalized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the vector is normalized or not.
+ </description>
+ </method>
+ <method name="length">
+ <return type="float">
+ </return>
+ <description>
+ Return 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.
+ </description>
+ </method>
+ <method name="linear_interpolate">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <argument index="1" name="t" type="float">
+ </argument>
+ <description>
+ Linearly interpolates the vector to a given one (b), by the given amount (t).
+ </description>
+ </method>
+ <method name="max_axis">
+ <return type="int">
+ </return>
+ <description>
+ Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest.
+ </description>
+ </method>
+ <method name="min_axis">
+ <return type="int">
+ </return>
+ <description>
+ Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest.
+ </description>
+ </method>
+ <method name="normalized">
+ <return type="Vector3">
+ </return>
+ <description>
+ Return a copy of the normalized vector to unit length. This is the same as v / v.length().
+ </description>
+ </method>
+ <method name="outer">
+ <return type="Basis">
+ </return>
+ <argument index="0" name="b" type="Vector3">
+ </argument>
+ <description>
+ Return the outer product with b.
+ </description>
+ </method>
+ <method name="reflect">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="n" type="Vector3">
+ </argument>
+ <description>
+ Reflects the vector along the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="rotated">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="phi" type="float">
+ </argument>
+ <description>
+ Rotates the vector around some axis by phi radians. The axis must be a normalized vector.
+ </description>
+ </method>
+ <method name="slide">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="n" type="Vector3">
+ </argument>
+ <description>
+ Slide returns the component of the vector along the given plane, specified by its normal vector.
+ </description>
+ </method>
+ <method name="snapped">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="by" type="float">
+ </argument>
+ <description>
+ Return 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.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="x" type="float" setter="" getter="">
+ X component of the vector.
+ </member>
+ <member name="y" type="float" setter="" getter="">
+ Y component of the vector.
+ </member>
+ <member name="z" type="float" setter="" getter="">
+ Z component of the vector.
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0" enum="">
+ Enumerated value for the X axis. Returned by functions like max_axis or min_axis.
+ </constant>
+ <constant name="AXIS_Y" value="1" enum="">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="AXIS_Z" value="2" enum="">
+ Enumerated value for the Z axis.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml
new file mode 100644
index 0000000000..48202665fb
--- /dev/null
+++ b/doc/classes/VehicleBody.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VehicleBody" inherits="PhysicsBody" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_brake" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_engine_force" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_friction" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_linear_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
+ [codeblock]
+ # vehicle is an instance of VehicleBody
+ var speed = vehicle.get_linear_velocity().length()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_steering" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the steering angle (in radians).
+ </description>
+ </method>
+ <method name="set_brake">
+ <return type="void">
+ </return>
+ <argument index="0" name="brake" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_engine_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="engine_force" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_friction">
+ <return type="void">
+ </return>
+ <argument index="0" name="friction" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_mass">
+ <return type="void">
+ </return>
+ <argument index="0" name="mass" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_steering">
+ <return type="void">
+ </return>
+ <argument index="0" name="steering" type="float">
+ </argument>
+ <description>
+ Set the steering angle (in radians).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="brake" type="float" setter="set_brake" getter="get_brake">
+ </member>
+ <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force">
+ </member>
+ <member name="friction" type="float" setter="set_friction" getter="get_friction">
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass">
+ </member>
+ <member name="steering" type="float" setter="set_steering" getter="get_steering">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml
new file mode 100644
index 0000000000..82e93e0f01
--- /dev/null
+++ b/doc/classes/VehicleWheel.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_damping_compression" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_damping_relaxation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_friction_slip" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_radius" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_roll_influence" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_suspension_max_force" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_suspension_rest_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_suspension_stiffness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_suspension_travel" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_in_contact" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_used_as_steering" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_used_as_traction" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_damping_compression">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_damping_relaxation">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_friction_slip">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_roll_influence">
+ <return type="void">
+ </return>
+ <argument index="0" name="roll_influence" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_suspension_max_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_suspension_rest_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_suspension_stiffness">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_suspension_travel">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_as_steering">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_as_traction">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression">
+ </member>
+ <member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation">
+ </member>
+ <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force">
+ </member>
+ <member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness">
+ </member>
+ <member name="suspension_travel" type="float" setter="set_suspension_travel" getter="get_suspension_travel">
+ </member>
+ <member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering">
+ </member>
+ <member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction">
+ </member>
+ <member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip">
+ </member>
+ <member name="wheel_radius" type="float" setter="set_radius" getter="get_radius">
+ </member>
+ <member name="wheel_rest_length" type="float" setter="set_suspension_rest_length" getter="get_suspension_rest_length">
+ </member>
+ <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
new file mode 100644
index 0000000000..7994c1b65a
--- /dev/null
+++ b/doc/classes/VideoPlayer.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VideoPlayer" inherits="Control" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Control to play video files.
+ </brief_description>
+ <description>
+ This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_audio_track" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the selected audio track (for multitrack videos).
+ </description>
+ </method>
+ <method name="get_buffering_msec" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the amount of miliseconds to store in buffer while playing.
+ </description>
+ </method>
+ <method name="get_stream" qualifiers="const">
+ <return type="VideoStream">
+ </return>
+ <description>
+ Get the video stream.
+ </description>
+ </method>
+ <method name="get_stream_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the name of the video stream.
+ </description>
+ </method>
+ <method name="get_stream_pos" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the current position of the stream, in seconds.
+ </description>
+ </method>
+ <method name="get_video_texture">
+ <return type="Texture">
+ </return>
+ <description>
+ Get the current frame of the video as a [Texture].
+ </description>
+ </method>
+ <method name="get_volume" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the volume of the audio track as a linear value.
+ </description>
+ </method>
+ <method name="get_volume_db" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Get the volume of the audio track in decibels.
+ </description>
+ </method>
+ <method name="has_autoplay" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether or not the video is set as autoplay.
+ </description>
+ </method>
+ <method name="has_expand" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether or not the expand property is set.
+ </description>
+ </method>
+ <method name="is_paused" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether or not the video is paused.
+ </description>
+ </method>
+ <method name="is_playing" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether or not the video is playing.
+ </description>
+ </method>
+ <method name="play">
+ <return type="void">
+ </return>
+ <description>
+ Start the video playback.
+ </description>
+ </method>
+ <method name="set_audio_track">
+ <return type="void">
+ </return>
+ <argument index="0" name="track" type="int">
+ </argument>
+ <description>
+ Set the audio track (for multitrack videos).
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether this node should start playing automatically.
+ </description>
+ </method>
+ <method name="set_buffering_msec">
+ <return type="void">
+ </return>
+ <argument index="0" name="msec" type="int">
+ </argument>
+ <description>
+ Set the amount of miliseconds to buffer during playback.
+ </description>
+ </method>
+ <method name="set_expand">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution.
+ </description>
+ </method>
+ <method name="set_paused">
+ <return type="void">
+ </return>
+ <argument index="0" name="paused" type="bool">
+ </argument>
+ <description>
+ Set whether the video should pause the playback.
+ </description>
+ </method>
+ <method name="set_stream">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="VideoStream">
+ </argument>
+ <description>
+ Set the video stream for this player.
+ </description>
+ </method>
+ <method name="set_volume">
+ <return type="void">
+ </return>
+ <argument index="0" name="volume" type="float">
+ </argument>
+ <description>
+ Set the audio volume as a linear value.
+ </description>
+ </method>
+ <method name="set_volume_db">
+ <return type="void">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ Set the audio volume in decibels.
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ Stop the video playback.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track">
+ </member>
+ <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay">
+ </member>
+ <member name="expand" type="bool" setter="set_expand" getter="has_expand">
+ </member>
+ <member name="paused" type="bool" setter="set_paused" getter="is_paused">
+ </member>
+ <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream">
+ </member>
+ <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
new file mode 100644
index 0000000000..c282cdfbd0
--- /dev/null
+++ b/doc/classes/VideoStream.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VideoStream" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
new file mode 100644
index 0000000000..a5170b8d03
--- /dev/null
+++ b/doc/classes/Viewport.xml
@@ -0,0 +1,668 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Viewport" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Creates a sub-view into the screen.
+ </brief_description>
+ <description>
+ A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
+ Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
+ If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually.
+ Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
+ Also, viewports can be assigned to different screens in case the devices have multiple screens.
+ Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="find_world" qualifiers="const">
+ <return type="World">
+ </return>
+ <description>
+ Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
+ </description>
+ </method>
+ <method name="find_world_2d" qualifiers="const">
+ <return type="World2D">
+ </return>
+ <description>
+ Return the 2D world of the viewport.
+ </description>
+ </method>
+ <method name="get_camera" qualifiers="const">
+ <return type="Camera">
+ </return>
+ <description>
+ Return the active 3D camera.
+ </description>
+ </method>
+ <method name="get_canvas_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the canvas transform of the viewport.
+ </description>
+ </method>
+ <method name="get_clear_mode" qualifiers="const">
+ <return type="int" enum="Viewport.ClearMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_debug_draw" qualifiers="const">
+ <return type="int" enum="Viewport.DebugDraw">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_final_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the total transform of the viewport.
+ </description>
+ </method>
+ <method name="get_global_canvas_transform" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <description>
+ Get the global canvas transform of the viewport.
+ </description>
+ </method>
+ <method name="get_hdr" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether the rendered texture has filters enabled.
+ </description>
+ </method>
+ <method name="get_mouse_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Get the mouse position, relative to the viewport.
+ </description>
+ </method>
+ <method name="get_msaa" qualifiers="const">
+ <return type="int" enum="Viewport.MSAA">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_physics_object_picking">
+ <return type="bool">
+ </return>
+ <description>
+ Get whether picking for all physics objects inside the viewport is enabled.
+ </description>
+ </method>
+ <method name="get_render_info">
+ <return type="int">
+ </return>
+ <argument index="0" name="info" type="int" enum="Viewport.RenderInfo">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const">
+ <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </return>
+ <argument index="0" name="quadrant" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_atlas_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space.
+ </description>
+ </method>
+ <method name="get_size_override" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Get the size override set with [method set_size_override].
+ </description>
+ </method>
+ <method name="get_texture" qualifiers="const">
+ <return type="ViewportTexture">
+ </return>
+ <description>
+ Get the viewport's texture, for use with various objects that you want to texture with the viewport.
+ </description>
+ </method>
+ <method name="get_update_mode" qualifiers="const">
+ <return type="int" enum="Viewport.UpdateMode">
+ </return>
+ <description>
+ Get when the viewport would be updated, will be one of the [code]UPDATE_*[/code] constants.
+ </description>
+ </method>
+ <method name="get_usage" qualifiers="const">
+ <return type="int" enum="Viewport.Usage">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_vflip" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Set whether the render target is flipped on the Y axis.
+ </description>
+ </method>
+ <method name="get_viewport_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Get the viewport RID from the [VisualServer].
+ </description>
+ </method>
+ <method name="get_visible_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Return the final, visible rect in global screen coordinates.
+ </description>
+ </method>
+ <method name="get_world" qualifiers="const">
+ <return type="World">
+ </return>
+ <description>
+ Return the 3D world of the viewport.
+ </description>
+ </method>
+ <method name="get_world_2d" qualifiers="const">
+ <return type="World2D">
+ </return>
+ <description>
+ Return the 2D world of the viewport.
+ </description>
+ </method>
+ <method name="gui_get_drag_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
+ </description>
+ </method>
+ <method name="gui_has_modal_stack" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returs whether there are shown modals on-screen.
+ </description>
+ </method>
+ <method name="has_transparent_background" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the viewport lets whatever is behind it to show.
+ </description>
+ </method>
+ <method name="input">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_3d_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_audio_listener" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the viewport sends sounds to the speakers.
+ </description>
+ </method>
+ <method name="is_audio_listener_2d" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
+ </description>
+ </method>
+ <method name="is_input_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether input to the viewport is disabled.
+ </description>
+ </method>
+ <method name="is_size_override_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get the enabled status of the size override set with [method set_size_override].
+ </description>
+ </method>
+ <method name="is_size_override_stretch_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Get the enabled status of the size strech override set with [method set_size_override_stretch].
+ </description>
+ </method>
+ <method name="is_snap_controls_to_pixels_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_using_own_world" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether the viewport is using a world separate from the parent viewport's world.
+ </description>
+ </method>
+ <method name="set_as_audio_listener">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Makes the viewport send sounds to the speakers.
+ </description>
+ </method>
+ <method name="set_as_audio_listener_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Makes the viewport send sounds from 2D emitters to the speakers.
+ </description>
+ </method>
+ <method name="set_attach_to_screen_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_canvas_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport.
+ </description>
+ </method>
+ <method name="set_clear_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Viewport.ClearMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_debug_draw">
+ <return type="void">
+ </return>
+ <argument index="0" name="debug_draw" type="int" enum="Viewport.DebugDraw">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disable_3d">
+ <return type="void">
+ </return>
+ <argument index="0" name="disable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_disable_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="disable" type="bool">
+ </argument>
+ <description>
+ Set whether input to the viewport is disabled.
+ </description>
+ </method>
+ <method name="set_global_canvas_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="Transform2D">
+ </argument>
+ <description>
+ Set the global canvas transform of the viewport. The canvas transform is relative to this.
+ </description>
+ </method>
+ <method name="set_hdr">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_msaa">
+ <return type="void">
+ </return>
+ <argument index="0" name="msaa" type="int" enum="Viewport.MSAA">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_physics_object_picking">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Enable/disable picking for all physics objects inside the viewport.
+ </description>
+ </method>
+ <method name="set_shadow_atlas_quadrant_subdiv">
+ <return type="void">
+ </return>
+ <argument index="0" name="quadrant" type="int">
+ </argument>
+ <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_atlas_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ Set the size of the viewport.
+ </description>
+ </method>
+ <method name="set_size_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
+ </argument>
+ <argument index="2" name="margin" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
+ </description>
+ </method>
+ <method name="set_size_override_stretch">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether the size override affects stretch as well.
+ </description>
+ </method>
+ <method name="set_snap_controls_to_pixels">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_transparent_background">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ If this viewport is a child of another viewport, keep the previously drawn background visible.
+ </description>
+ </method>
+ <method name="set_update_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Viewport.UpdateMode">
+ </argument>
+ <description>
+ Set when the render target would be updated, using the [code]UPDATE_*[/code] constants
+ </description>
+ </method>
+ <method name="set_usage">
+ <return type="void">
+ </return>
+ <argument index="0" name="usage" type="int" enum="Viewport.Usage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_arvr">
+ <return type="void">
+ </return>
+ <argument index="0" name="use" type="bool">
+ </argument>
+ <description>
+ If true this viewport will be bound to our ARVR Server.
+ If this is our main Godot viewport our AR/VR output will be displayed on screen.
+ If output is redirected to an HMD we'll see the output of just one of the eyes without any distortion applied else we'll see the stereo buffer with distortion applied if applicable
+ If this is an extra viewport output will only work if redirection to an HMD is supported by the interface. The render target will allow you to use the undistorted output for the right eye in the display.
+ </description>
+ </method>
+ <method name="set_use_own_world">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Make the viewport use a world separate from the parent viewport's world.
+ </description>
+ </method>
+ <method name="set_vflip">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Set whether the viewport is flipped on the Y axis.
+ </description>
+ </method>
+ <method name="set_world">
+ <return type="void">
+ </return>
+ <argument index="0" name="world" type="World">
+ </argument>
+ <description>
+ Change the 3D world of the viewport.
+ </description>
+ </method>
+ <method name="set_world_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="world_2d" type="World2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unhandled_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="update_worlds">
+ <return type="void">
+ </return>
+ <description>
+ Force update of the 2D and 3D worlds.
+ </description>
+ </method>
+ <method name="use_arvr">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this viewport is using our ARVR Server
+ </description>
+ </method>
+ <method name="warp_mouse">
+ <return type="void">
+ </return>
+ <argument index="0" name="to_pos" type="Vector2">
+ </argument>
+ <description>
+ Warp the mouse to a position, relative to the viewport.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr">
+ </member>
+ <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d">
+ </member>
+ <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener">
+ </member>
+ <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw">
+ </member>
+ <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled">
+ </member>
+ <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled">
+ </member>
+ <member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled">
+ </member>
+ <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr">
+ </member>
+ <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA">
+ </member>
+ <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world">
+ </member>
+ <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking">
+ </member>
+ <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode">
+ </member>
+ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode">
+ </member>
+ <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip">
+ </member>
+ <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </member>
+ <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </member>
+ <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </member>
+ <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv">
+ </member>
+ <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size">
+ </member>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size">
+ </member>
+ <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background">
+ </member>
+ <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage">
+ </member>
+ <member name="world" type="World" setter="set_world" getter="get_world">
+ </member>
+ </members>
+ <signals>
+ <signal name="size_changed">
+ <description>
+ Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="UPDATE_DISABLED" value="0">
+ Do not update the render target.
+ </constant>
+ <constant name="UPDATE_ONCE" value="1">
+ Update the render target once, then switch to [code]UPDATE_DISABLED[/code]
+ </constant>
+ <constant name="UPDATE_WHEN_VISIBLE" value="2">
+ Update the render target only when it is visible. This is the default value.
+ </constant>
+ <constant name="UPDATE_ALWAYS" value="3">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6">
+ </constant>
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7">
+ </constant>
+ <constant name="RENDER_INFO_OBJECTS_IN_FRAME" value="0">
+ </constant>
+ <constant name="RENDER_INFO_VERTICES_IN_FRAME" value="1">
+ </constant>
+ <constant name="RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2">
+ </constant>
+ <constant name="RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3">
+ </constant>
+ <constant name="RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4">
+ </constant>
+ <constant name="RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5">
+ </constant>
+ <constant name="RENDER_INFO_MAX" value="6">
+ </constant>
+ <constant name="DEBUG_DRAW_DISABLED" value="0">
+ </constant>
+ <constant name="DEBUG_DRAW_UNSHADED" value="1">
+ </constant>
+ <constant name="DEBUG_DRAW_OVERDRAW" value="2">
+ </constant>
+ <constant name="DEBUG_DRAW_WIREFRAME" value="3">
+ </constant>
+ <constant name="MSAA_DISABLED" value="0">
+ </constant>
+ <constant name="MSAA_2X" value="1">
+ </constant>
+ <constant name="MSAA_4X" value="2">
+ </constant>
+ <constant name="MSAA_8X" value="3">
+ </constant>
+ <constant name="MSAA_16X" value="4">
+ </constant>
+ <constant name="USAGE_2D" value="0">
+ </constant>
+ <constant name="USAGE_2D_NO_SAMPLING" value="1">
+ </constant>
+ <constant name="USAGE_3D" value="2">
+ </constant>
+ <constant name="USAGE_3D_NO_EFFECTS" value="3">
+ </constant>
+ <constant name="CLEAR_MODE_ALWAYS" value="0">
+ </constant>
+ <constant name="CLEAR_MODE_NEVER" value="1">
+ </constant>
+ <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
new file mode 100644
index 0000000000..d4d42ad4fb
--- /dev/null
+++ b/doc/classes/ViewportContainer.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ViewportContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_stretch_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_stretch">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
new file mode 100644
index 0000000000..f2515cbcc7
--- /dev/null
+++ b/doc/classes/ViewportTexture.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ViewportTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_viewport_path_in_scene" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_viewport_path_in_scene">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml
new file mode 100644
index 0000000000..ebe646679a
--- /dev/null
+++ b/doc/classes/VisibilityEnabler.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Enable certain nodes only when visible.
+ </brief_description>
+ <description>
+ The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_enabler_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
+ </argument>
+ <description>
+ Returns whether the specified enabler was set to true or not.
+ </description>
+ </method>
+ <method name="set_enabler">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ </members>
+ <constants>
+ <constant name="ENABLER_FREEZE_BODIES" value="1">
+ This enabler will freeze [RigidBody] nodes.
+ </constant>
+ <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
+ This enabler will pause [AnimationPlayer] nodes.
+ </constant>
+ <constant name="ENABLER_MAX" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
new file mode 100644
index 0000000000..b8ef1f8d22
--- /dev/null
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Enable certain nodes only when visible.
+ </brief_description>
+ <description>
+ The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_enabler_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
+ </argument>
+ <description>
+ Returns whether the specified enabler was set to true or not.
+ </description>
+ </method>
+ <method name="set_enabler">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="fixed_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled">
+ </member>
+ </members>
+ <constants>
+ <constant name="ENABLER_FREEZE_BODIES" value="1">
+ This enabler will freeze [RigidBody2D] nodes.
+ </constant>
+ <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
+ This enabler will pause [AnimationPlayer] nodes.
+ </constant>
+ <constant name="ENABLER_PAUSE_PARTICLES" value="2">
+ This enabler will stop [Particles2D] nodes.
+ </constant>
+ <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5">
+ </constant>
+ <constant name="ENABLER_PARENT_PROCESS" value="3">
+ This enabler will stop the parent's _process function.
+ </constant>
+ <constant name="ENABLER_PARENT_FIXED_PROCESS" value="4">
+ This enabler will stop the parent's _fixed_process function.
+ </constant>
+ <constant name="ENABLER_MAX" value="6">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml
new file mode 100644
index 0000000000..816523fc27
--- /dev/null
+++ b/doc/classes/VisibilityNotifier.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Detects when the node is visible on screen.
+ </brief_description>
+ <description>
+ The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera]'s view.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ Returns the bounding box of the VisibilityNotifier.
+ </description>
+ </method>
+ <method name="is_on_screen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If [code]true[/code] the bounding box is on the screen.
+ </description>
+ </method>
+ <method name="set_aabb">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect3">
+ </argument>
+ <description>
+ Set the visibility bounding box of the VisibilityNotifier.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="aabb" type="Rect3" setter="set_aabb" getter="get_aabb">
+ The VisibilityNotifier's bounding box.
+ </member>
+ </members>
+ <signals>
+ <signal name="camera_entered">
+ <argument index="0" name="camera" type="Object">
+ </argument>
+ <description>
+ Emitted when the VisibilityNotifier enters a [Camera]'s view.
+ </description>
+ </signal>
+ <signal name="camera_exited">
+ <argument index="0" name="camera" type="Object">
+ </argument>
+ <description>
+ Emitted when the VisibilityNotifier exits a [Camera]'s view.
+ </description>
+ </signal>
+ <signal name="screen_entered">
+ <description>
+ Emitted when the VisibilityNotifier enters the screen.
+ </description>
+ </signal>
+ <signal name="screen_exited">
+ <description>
+ Emitted when the VisibilityNotifier exits the screen.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
new file mode 100644
index 0000000000..86227a0277
--- /dev/null
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Detects when the node is visible on screen.
+ </brief_description>
+ <description>
+ The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Returns the bounding rectangle of the VisibilityNotifier2D.
+ </description>
+ </method>
+ <method name="is_on_screen" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ If [code]true[/code] the bounding rectangle is on the screen.
+ </description>
+ </method>
+ <method name="set_rect">
+ <return type="void">
+ </return>
+ <argument index="0" name="rect" type="Rect2">
+ </argument>
+ <description>
+ Set the visibility bounding rectangle of the VisibilityNotifier2D.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="rect" type="Rect2" setter="set_rect" getter="get_rect">
+ The VisibilityNotifier2D's bounding rectangle.
+ </member>
+ </members>
+ <signals>
+ <signal name="screen_entered">
+ <description>
+ Emitted when the VisibilityNotifier2D enters the screen.
+ </description>
+ </signal>
+ <signal name="screen_exited">
+ <description>
+ Emitted when the VisibilityNotifier2D exits the screen.
+ </description>
+ </signal>
+ <signal name="viewport_entered">
+ <argument index="0" name="viewport" type="Object">
+ </argument>
+ <description>
+ Emitted when the VisibilityNotifier2D enters a [Viewport]'s view.
+ </description>
+ </signal>
+ <signal name="viewport_exited">
+ <argument index="0" name="viewport" type="Object">
+ </argument>
+ <description>
+ Emitted when the VisibilityNotifier2D exits a [Viewport]'s view.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml
new file mode 100644
index 0000000000..ed317882a8
--- /dev/null
+++ b/doc/classes/VisualInstance.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualInstance" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_layer_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transformed_aabb" qualifiers="const">
+ <return type="Rect3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base">
+ <return type="void">
+ </return>
+ <argument index="0" name="base" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_layer_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml
new file mode 100644
index 0000000000..0875aafcff
--- /dev/null
+++ b/doc/classes/VisualScript.xml
@@ -0,0 +1,467 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScript" inherits="Script" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="add_custom_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_function">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <argument index="2" name="node" type="VisualScriptNode">
+ </argument>
+ <argument index="3" name="pos" type="Vector2" default="Vector2( 0, 0 )">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_variable">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="default_value" type="Variant" default="null">
+ </argument>
+ <argument index="2" name="export" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_add_argument">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <argument index="2" name="argname" type="String">
+ </argument>
+ <argument index="3" name="index" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_get_argument_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_get_argument_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_get_argument_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_remove_argument">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_set_argument_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <argument index="2" name="argname" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_set_argument_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <argument index="2" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="custom_signal_swap_argument">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="argidx" type="int">
+ </argument>
+ <argument index="2" name="withidx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="data_connect">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_port" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <argument index="4" name="to_port" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="data_disconnect">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_port" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <argument index="4" name="to_port" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_function_node_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_function_scroll" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node" qualifiers="const">
+ <return type="VisualScriptNode">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_pos" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_variable_default_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_variable_export" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_variable_info" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_custom_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_data_connection" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_port" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <argument index="4" name="to_port" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_function" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_node" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_sequence_connection" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_output" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_variable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_custom_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_function">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_variable">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="rename_custom_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="new_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="rename_function">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="new_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="rename_variable">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="new_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="sequence_connect">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_output" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="sequence_disconnect">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="from_node" type="int">
+ </argument>
+ <argument index="2" name="from_output" type="int">
+ </argument>
+ <argument index="3" name="to_node" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_function_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="ofs" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_instance_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_node_pos">
+ <return type="void">
+ </return>
+ <argument index="0" name="func" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <argument index="2" name="pos" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_variable_default_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_variable_export">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_variable_info">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
+ </member>
+ </members>
+ <signals>
+ <signal name="node_ports_changed">
+ <argument index="0" name="function" type="String">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptBasicTypeConstant.xml b/doc/classes/VisualScriptBasicTypeConstant.xml
new file mode 100644
index 0000000000..5b066f9925
--- /dev/null
+++ b/doc/classes/VisualScriptBasicTypeConstant.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_basic_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_basic_type_constant" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_basic_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_basic_type_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
+ </member>
+ <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml
new file mode 100644
index 0000000000..a88633749e
--- /dev/null
+++ b/doc/classes/VisualScriptBuiltinFunc.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_func">
+ <return type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_func">
+ <return type="void">
+ </return>
+ <argument index="0" name="which" type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc">
+ </member>
+ </members>
+ <constants>
+ <constant name="MATH_SIN" value="0">
+ </constant>
+ <constant name="MATH_COS" value="1">
+ </constant>
+ <constant name="MATH_TAN" value="2">
+ </constant>
+ <constant name="MATH_SINH" value="3">
+ </constant>
+ <constant name="MATH_COSH" value="4">
+ </constant>
+ <constant name="MATH_TANH" value="5">
+ </constant>
+ <constant name="MATH_ASIN" value="6">
+ </constant>
+ <constant name="MATH_ACOS" value="7">
+ </constant>
+ <constant name="MATH_ATAN" value="8">
+ </constant>
+ <constant name="MATH_ATAN2" value="9">
+ </constant>
+ <constant name="MATH_SQRT" value="10">
+ </constant>
+ <constant name="MATH_FMOD" value="11">
+ </constant>
+ <constant name="MATH_FPOSMOD" value="12">
+ </constant>
+ <constant name="MATH_FLOOR" value="13">
+ </constant>
+ <constant name="MATH_CEIL" value="14">
+ </constant>
+ <constant name="MATH_ROUND" value="15">
+ </constant>
+ <constant name="MATH_ABS" value="16">
+ </constant>
+ <constant name="MATH_SIGN" value="17">
+ </constant>
+ <constant name="MATH_POW" value="18">
+ </constant>
+ <constant name="MATH_LOG" value="19">
+ </constant>
+ <constant name="MATH_EXP" value="20">
+ </constant>
+ <constant name="MATH_ISNAN" value="21">
+ </constant>
+ <constant name="MATH_ISINF" value="22">
+ </constant>
+ <constant name="MATH_EASE" value="23">
+ </constant>
+ <constant name="MATH_DECIMALS" value="24">
+ </constant>
+ <constant name="MATH_STEPIFY" value="25">
+ </constant>
+ <constant name="MATH_LERP" value="26">
+ </constant>
+ <constant name="MATH_DECTIME" value="27">
+ </constant>
+ <constant name="MATH_RANDOMIZE" value="28">
+ </constant>
+ <constant name="MATH_RAND" value="29">
+ </constant>
+ <constant name="MATH_RANDF" value="30">
+ </constant>
+ <constant name="MATH_RANDOM" value="31">
+ </constant>
+ <constant name="MATH_SEED" value="32">
+ </constant>
+ <constant name="MATH_RANDSEED" value="33">
+ </constant>
+ <constant name="MATH_DEG2RAD" value="34">
+ </constant>
+ <constant name="MATH_RAD2DEG" value="35">
+ </constant>
+ <constant name="MATH_LINEAR2DB" value="36">
+ </constant>
+ <constant name="MATH_DB2LINEAR" value="37">
+ </constant>
+ <constant name="LOGIC_MAX" value="38">
+ </constant>
+ <constant name="LOGIC_MIN" value="39">
+ </constant>
+ <constant name="LOGIC_CLAMP" value="40">
+ </constant>
+ <constant name="LOGIC_NEAREST_PO2" value="41">
+ </constant>
+ <constant name="OBJ_WEAKREF" value="42">
+ </constant>
+ <constant name="FUNC_FUNCREF" value="43">
+ </constant>
+ <constant name="TYPE_CONVERT" value="44">
+ </constant>
+ <constant name="TYPE_OF" value="45">
+ </constant>
+ <constant name="TYPE_EXISTS" value="46">
+ </constant>
+ <constant name="TEXT_CHAR" value="47">
+ </constant>
+ <constant name="TEXT_STR" value="48">
+ </constant>
+ <constant name="TEXT_PRINT" value="49">
+ </constant>
+ <constant name="TEXT_PRINTERR" value="50">
+ </constant>
+ <constant name="TEXT_PRINTRAW" value="51">
+ </constant>
+ <constant name="VAR_TO_STR" value="52">
+ </constant>
+ <constant name="STR_TO_VAR" value="53">
+ </constant>
+ <constant name="VAR_TO_BYTES" value="54">
+ </constant>
+ <constant name="BYTES_TO_VAR" value="55">
+ </constant>
+ <constant name="COLORN" value="56">
+ </constant>
+ <constant name="FUNC_MAX" value="57">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptClassConstant.xml b/doc/classes/VisualScriptClassConstant.xml
new file mode 100644
index 0000000000..5e43b4972c
--- /dev/null
+++ b/doc/classes/VisualScriptClassConstant.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_base_type">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_class_constant">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_class_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptComment.xml b/doc/classes/VisualScriptComment.xml
new file mode 100644
index 0000000000..be4eefd775
--- /dev/null
+++ b/doc/classes/VisualScriptComment.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_description" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_description">
+ <return type="void">
+ </return>
+ <argument index="0" name="description" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="description" type="String" setter="set_description" getter="get_description">
+ </member>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size">
+ </member>
+ <member name="title" type="String" setter="set_title" getter="get_title">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml
new file mode 100644
index 0000000000..73f1b69c02
--- /dev/null
+++ b/doc/classes/VisualScriptCondition.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptConstant.xml b/doc/classes/VisualScriptConstant.xml
new file mode 100644
index 0000000000..b0af3bda98
--- /dev/null
+++ b/doc/classes/VisualScriptConstant.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_constant_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_constant_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_constant_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_constant_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type">
+ </member>
+ <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptConstructor.xml b/doc/classes/VisualScriptConstructor.xml
new file mode 100644
index 0000000000..e8afd36b9c
--- /dev/null
+++ b/doc/classes/VisualScriptConstructor.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_constructor" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_constructor_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_constructor">
+ <return type="void">
+ </return>
+ <argument index="0" name="constructor" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_constructor_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor">
+ </member>
+ <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml
new file mode 100644
index 0000000000..ec442e993c
--- /dev/null
+++ b/doc/classes/VisualScriptCustomNode.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_get_caption" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_category" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_input_value_port_count" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_input_value_port_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_get_input_value_port_type" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_get_output_sequence_port_count" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_output_sequence_port_text" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_get_output_value_port_count" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_output_value_port_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_get_output_value_port_type" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_get_text" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_working_memory_size" qualifiers="virtual">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_has_input_sequence_port" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_step" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="inputs" type="Array">
+ </argument>
+ <argument index="1" name="outputs" type="Array">
+ </argument>
+ <argument index="2" name="start_mode" type="int">
+ </argument>
+ <argument index="3" name="working_mem" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="START_MODE_BEGIN_SEQUENCE" value="0">
+ </constant>
+ <constant name="START_MODE_CONTINUE_SEQUENCE" value="1">
+ </constant>
+ <constant name="START_MODE_RESUME_YIELD" value="2">
+ </constant>
+ <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum="">
+ </constant>
+ <constant name="STEP_GO_BACK_BIT" value="33554432" enum="">
+ </constant>
+ <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum="">
+ </constant>
+ <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum="">
+ </constant>
+ <constant name="STEP_YIELD_BIT" value="268435456" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptDeconstruct.xml b/doc/classes/VisualScriptDeconstruct.xml
new file mode 100644
index 0000000000..5bb12539af
--- /dev/null
+++ b/doc/classes/VisualScriptDeconstruct.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_deconstruct_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_deconstruct_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache">
+ </member>
+ <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptEmitSignal.xml b/doc/classes/VisualScriptEmitSignal.xml
new file mode 100644
index 0000000000..21af3c6ea0
--- /dev/null
+++ b/doc/classes/VisualScriptEmitSignal.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_signal" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="signal" type="String" setter="set_signal" getter="get_signal">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptEngineSingleton.xml b/doc/classes/VisualScriptEngineSingleton.xml
new file mode 100644
index 0000000000..c00fd2a0a4
--- /dev/null
+++ b/doc/classes/VisualScriptEngineSingleton.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_singleton">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_singleton">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="constant" type="String" setter="set_singleton" getter="get_singleton">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptExpression.xml b/doc/classes/VisualScriptExpression.xml
new file mode 100644
index 0000000000..1ca943a8a8
--- /dev/null
+++ b/doc/classes/VisualScriptExpression.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptFunction.xml b/doc/classes/VisualScriptFunction.xml
new file mode 100644
index 0000000000..946231eaad
--- /dev/null
+++ b/doc/classes/VisualScriptFunction.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptFunctionCall.xml b/doc/classes/VisualScriptFunctionCall.xml
new file mode 100644
index 0000000000..36c808afce
--- /dev/null
+++ b/doc/classes/VisualScriptFunctionCall.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_base_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_script" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_basic_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_call_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptFunctionCall.CallMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_function" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_rpc_call_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptFunctionCall.RPCCallMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_singleton" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_use_default_args" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_validate" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_script">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_script" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_basic_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_call_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.CallMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_function">
+ <return type="void">
+ </return>
+ <argument index="0" name="function" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_rpc_call_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.RPCCallMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_singleton">
+ <return type="void">
+ </return>
+ <argument index="0" name="singleton" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_default_args">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_validate">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="argument_cache" type="Dictionary" setter="_set_argument_cache" getter="_get_argument_cache">
+ </member>
+ <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
+ </member>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
+ </member>
+ <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode">
+ </member>
+ <member name="function" type="String" setter="set_function" getter="get_function">
+ </member>
+ <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
+ </member>
+ <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode">
+ </member>
+ <member name="singleton" type="String" setter="set_singleton" getter="get_singleton">
+ </member>
+ <member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args">
+ </member>
+ <member name="validate" type="bool" setter="set_validate" getter="get_validate">
+ </member>
+ </members>
+ <constants>
+ <constant name="CALL_MODE_SELF" value="0">
+ </constant>
+ <constant name="CALL_MODE_NODE_PATH" value="1">
+ </constant>
+ <constant name="CALL_MODE_INSTANCE" value="2">
+ </constant>
+ <constant name="CALL_MODE_BASIC_TYPE" value="3">
+ </constant>
+ <constant name="CALL_MODE_SINGLETON" value="4">
+ </constant>
+ <constant name="RPC_DISABLED" value="0">
+ </constant>
+ <constant name="RPC_RELIABLE" value="1">
+ </constant>
+ <constant name="RPC_UNRELIABLE" value="2">
+ </constant>
+ <constant name="RPC_RELIABLE_TO_ID" value="3">
+ </constant>
+ <constant name="RPC_UNRELIABLE_TO_ID" value="4">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptFunctionState.xml b/doc/classes/VisualScriptFunctionState.xml
new file mode 100644
index 0000000000..d5c06682ef
--- /dev/null
+++ b/doc/classes/VisualScriptFunctionState.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="connect_to_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="obj" type="Object">
+ </argument>
+ <argument index="1" name="signals" type="String">
+ </argument>
+ <argument index="2" name="args" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="resume">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="args" type="Array" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptGlobalConstant.xml b/doc/classes/VisualScriptGlobalConstant.xml
new file mode 100644
index 0000000000..52bf8c2821
--- /dev/null
+++ b/doc/classes/VisualScriptGlobalConstant.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_global_constant">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_global_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="constant" type="int" setter="set_global_constant" getter="get_global_constant">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptIndexGet.xml b/doc/classes/VisualScriptIndexGet.xml
new file mode 100644
index 0000000000..c0226b6677
--- /dev/null
+++ b/doc/classes/VisualScriptIndexGet.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptIndexSet.xml b/doc/classes/VisualScriptIndexSet.xml
new file mode 100644
index 0000000000..440b4801b4
--- /dev/null
+++ b/doc/classes/VisualScriptIndexSet.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptInputAction.xml b/doc/classes/VisualScriptInputAction.xml
new file mode 100644
index 0000000000..b555a0228b
--- /dev/null
+++ b/doc/classes/VisualScriptInputAction.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_action_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptInputAction.Mode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_action_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_action_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptInputAction.Mode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_action_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="action" type="String" setter="set_action_name" getter="get_action_name">
+ </member>
+ <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="VisualScriptInputAction.Mode">
+ </member>
+ </members>
+ <constants>
+ <constant name="MODE_PRESSED" value="0">
+ </constant>
+ <constant name="MODE_RELEASED" value="1">
+ </constant>
+ <constant name="MODE_JUST_PRESSED" value="2">
+ </constant>
+ <constant name="MODE_JUST_RELEASED" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptIterator.xml b/doc/classes/VisualScriptIterator.xml
new file mode 100644
index 0000000000..74309fcf00
--- /dev/null
+++ b/doc/classes/VisualScriptIterator.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptLocalVar.xml b/doc/classes/VisualScriptLocalVar.xml
new file mode 100644
index 0000000000..7db550d5fe
--- /dev/null
+++ b/doc/classes/VisualScriptLocalVar.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_var_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_var_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_var_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_var_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
+ </member>
+ <member name="var_name" type="String" setter="set_var_name" getter="get_var_name">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptLocalVarSet.xml b/doc/classes/VisualScriptLocalVarSet.xml
new file mode 100644
index 0000000000..6e69f13383
--- /dev/null
+++ b/doc/classes/VisualScriptLocalVarSet.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_var_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_var_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_var_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_var_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
+ </member>
+ <member name="var_name" type="String" setter="set_var_name" getter="get_var_name">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptMathConstant.xml b/doc/classes/VisualScriptMathConstant.xml
new file mode 100644
index 0000000000..1ef7d71e10
--- /dev/null
+++ b/doc/classes/VisualScriptMathConstant.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_math_constant">
+ <return type="int" enum="VisualScriptMathConstant.MathConstant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_math_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="which" type="int" enum="VisualScriptMathConstant.MathConstant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant">
+ </member>
+ </members>
+ <constants>
+ <constant name="MATH_CONSTANT_ONE" value="0">
+ </constant>
+ <constant name="MATH_CONSTANT_PI" value="1">
+ </constant>
+ <constant name="MATH_CONSTANT_2PI" value="2">
+ </constant>
+ <constant name="MATH_CONSTANT_HALF_PI" value="3">
+ </constant>
+ <constant name="MATH_CONSTANT_E" value="4">
+ </constant>
+ <constant name="MATH_CONSTANT_SQRT2" value="5">
+ </constant>
+ <constant name="MATH_CONSTANT_INF" value="6">
+ </constant>
+ <constant name="MATH_CONSTANT_NAN" value="7">
+ </constant>
+ <constant name="MATH_CONSTANT_MAX" value="8">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptNode.xml b/doc/classes/VisualScriptNode.xml
new file mode 100644
index 0000000000..dbb75e69fa
--- /dev/null
+++ b/doc/classes/VisualScriptNode.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_default_input_value" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="port_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_visual_script" qualifiers="const">
+ <return type="VisualScript">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_default_input_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="port_idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values">
+ </member>
+ </members>
+ <signals>
+ <signal name="ports_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptOperator.xml b/doc/classes/VisualScriptOperator.xml
new file mode 100644
index 0000000000..82951c9e0c
--- /dev/null
+++ b/doc/classes/VisualScriptOperator.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_operator" qualifiers="const">
+ <return type="int" enum="Variant.Operator">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_typed" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_operator">
+ <return type="void">
+ </return>
+ <argument index="0" name="op" type="int" enum="Variant.Operator">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_typed">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="Variant.Operator">
+ </member>
+ <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptPreload.xml b/doc/classes/VisualScriptPreload.xml
new file mode 100644
index 0000000000..b68bf5546b
--- /dev/null
+++ b/doc/classes/VisualScriptPreload.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_preload" qualifiers="const">
+ <return type="Resource">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_preload">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resource" type="Resource" setter="set_preload" getter="get_preload">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptPropertyGet.xml b/doc/classes/VisualScriptPropertyGet.xml
new file mode 100644
index 0000000000..c790a59b0c
--- /dev/null
+++ b/doc/classes/VisualScriptPropertyGet.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_base_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_script" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_basic_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_call_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptPropertyGet.CallMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_index" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_property" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_script">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_script" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_basic_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_call_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptPropertyGet.CallMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_property">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
+ </member>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
+ </member>
+ <member name="index" type="String" setter="set_index" getter="get_index">
+ </member>
+ <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
+ </member>
+ <member name="property" type="String" setter="set_property" getter="get_property">
+ </member>
+ <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode">
+ </member>
+ <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ <constant name="CALL_MODE_SELF" value="0">
+ </constant>
+ <constant name="CALL_MODE_NODE_PATH" value="1">
+ </constant>
+ <constant name="CALL_MODE_INSTANCE" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptPropertySet.xml b/doc/classes/VisualScriptPropertySet.xml
new file mode 100644
index 0000000000..88d47a7463
--- /dev/null
+++ b/doc/classes/VisualScriptPropertySet.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_assign_op" qualifiers="const">
+ <return type="int" enum="VisualScriptPropertySet.AssignOp">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_script" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_basic_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_call_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptPropertySet.CallMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_index" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_property" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_assign_op">
+ <return type="void">
+ </return>
+ <argument index="0" name="assign_op" type="int" enum="VisualScriptPropertySet.AssignOp">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_script">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_script" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_basic_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_call_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptPropertySet.CallMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_property">
+ <return type="void">
+ </return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp">
+ </member>
+ <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
+ </member>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
+ </member>
+ <member name="index" type="String" setter="set_index" getter="get_index">
+ </member>
+ <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
+ </member>
+ <member name="property" type="String" setter="set_property" getter="get_property">
+ </member>
+ <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode">
+ </member>
+ <member name="type_cache" type="Dictionary" setter="_set_type_cache" getter="_get_type_cache">
+ </member>
+ </members>
+ <constants>
+ <constant name="CALL_MODE_SELF" value="0">
+ </constant>
+ <constant name="CALL_MODE_NODE_PATH" value="1">
+ </constant>
+ <constant name="CALL_MODE_INSTANCE" value="2">
+ </constant>
+ <constant name="CALL_MODE_BASIC_TYPE" value="3">
+ </constant>
+ <constant name="ASSIGN_OP_NONE" value="0">
+ </constant>
+ <constant name="ASSIGN_OP_ADD" value="1">
+ </constant>
+ <constant name="ASSIGN_OP_SUB" value="2">
+ </constant>
+ <constant name="ASSIGN_OP_MUL" value="3">
+ </constant>
+ <constant name="ASSIGN_OP_DIV" value="4">
+ </constant>
+ <constant name="ASSIGN_OP_MOD" value="5">
+ </constant>
+ <constant name="ASSIGN_OP_SHIFT_LEFT" value="6">
+ </constant>
+ <constant name="ASSIGN_OP_SHIFT_RIGHT" value="7">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_AND" value="8">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_OR" value="9">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_XOR" value="10">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptResourcePath.xml b/doc/classes/VisualScriptResourcePath.xml
new file mode 100644
index 0000000000..e4b881b659
--- /dev/null
+++ b/doc/classes/VisualScriptResourcePath.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_resource_path">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_resource_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="path" type="String" setter="set_resource_path" getter="get_resource_path">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptReturn.xml b/doc/classes/VisualScriptReturn.xml
new file mode 100644
index 0000000000..55c53e17a0
--- /dev/null
+++ b/doc/classes/VisualScriptReturn.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_return_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_return_value_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_enable_return_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_return_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled">
+ </member>
+ <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSceneNode.xml b/doc/classes/VisualScriptSceneNode.xml
new file mode 100644
index 0000000000..90a8f132c0
--- /dev/null
+++ b/doc/classes/VisualScriptSceneNode.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_node_path">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_node_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSceneTree.xml b/doc/classes/VisualScriptSceneTree.xml
new file mode 100644
index 0000000000..55e27460ab
--- /dev/null
+++ b/doc/classes/VisualScriptSceneTree.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSelect.xml b/doc/classes/VisualScriptSelect.xml
new file mode 100644
index 0000000000..855da76e6c
--- /dev/null
+++ b/doc/classes/VisualScriptSelect.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_typed" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_typed">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSelf.xml b/doc/classes/VisualScriptSelf.xml
new file mode 100644
index 0000000000..a60f7eee03
--- /dev/null
+++ b/doc/classes/VisualScriptSelf.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSequence.xml b/doc/classes/VisualScriptSequence.xml
new file mode 100644
index 0000000000..a60c9e782b
--- /dev/null
+++ b/doc/classes/VisualScriptSequence.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_steps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_steps">
+ <return type="void">
+ </return>
+ <argument index="0" name="steps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="steps" type="int" setter="set_steps" getter="get_steps">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSubCall.xml b/doc/classes/VisualScriptSubCall.xml
new file mode 100644
index 0000000000..297ec96781
--- /dev/null
+++ b/doc/classes/VisualScriptSubCall.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_subcall" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="arguments" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptSwitch.xml b/doc/classes/VisualScriptSwitch.xml
new file mode 100644
index 0000000000..95ed737372
--- /dev/null
+++ b/doc/classes/VisualScriptSwitch.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptTypeCast.xml b/doc/classes/VisualScriptTypeCast.xml
new file mode 100644
index 0000000000..3008426900
--- /dev/null
+++ b/doc/classes/VisualScriptTypeCast.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_base_script" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_script">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
+ </member>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptVariableGet.xml b/doc/classes/VisualScriptVariableGet.xml
new file mode 100644
index 0000000000..8411933756
--- /dev/null
+++ b/doc/classes/VisualScriptVariableGet.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_variable" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_variable">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="var_name" type="String" setter="set_variable" getter="get_variable">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptVariableSet.xml b/doc/classes/VisualScriptVariableSet.xml
new file mode 100644
index 0000000000..fbe0f8e275
--- /dev/null
+++ b/doc/classes/VisualScriptVariableSet.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_variable" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_variable">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="var_name" type="String" setter="set_variable" getter="get_variable">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptWhile.xml b/doc/classes/VisualScriptWhile.xml
new file mode 100644
index 0000000000..b49678582e
--- /dev/null
+++ b/doc/classes/VisualScriptWhile.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptYield.xml b/doc/classes/VisualScriptYield.xml
new file mode 100644
index 0000000000..b8938daa67
--- /dev/null
+++ b/doc/classes/VisualScriptYield.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_wait_time">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_yield_mode">
+ <return type="int" enum="VisualScriptYield.YieldMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_wait_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="sec" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_yield_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptYield.YieldMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode">
+ </member>
+ <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time">
+ </member>
+ </members>
+ <constants>
+ <constant name="YIELD_FRAME" value="1">
+ </constant>
+ <constant name="YIELD_FIXED_FRAME" value="2">
+ </constant>
+ <constant name="YIELD_WAIT" value="3">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualScriptYieldSignal.xml b/doc/classes/VisualScriptYieldSignal.xml
new file mode 100644
index 0000000000..f4202edf2b
--- /dev/null
+++ b/doc/classes/VisualScriptYieldSignal.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_base_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_type" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_call_mode" qualifiers="const">
+ <return type="int" enum="VisualScriptYieldSignal.CallMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_signal" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_path" type="NodePath">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_base_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="base_type" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_call_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptYieldSignal.CallMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_signal">
+ <return type="void">
+ </return>
+ <argument index="0" name="signal" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
+ </member>
+ <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptYieldSignal.CallMode">
+ </member>
+ <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
+ </member>
+ <member name="signal" type="String" setter="set_signal" getter="get_signal">
+ </member>
+ </members>
+ <constants>
+ <constant name="CALL_MODE_SELF" value="0">
+ </constant>
+ <constant name="CALL_MODE_NODE_PATH" value="1">
+ </constant>
+ <constant name="CALL_MODE_INSTANCE" value="2">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
new file mode 100644
index 0000000000..242fc18ab9
--- /dev/null
+++ b/doc/classes/VisualServer.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualServer" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Server for anything visible.
+ </brief_description>
+ <description>
+ Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
+ The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="force_draw">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="texture_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="texture_create_from_image">
+ <return type="RID">
+ </return>
+ <argument index="0" name="image" type="Image">
+ </argument>
+ <argument index="1" name="flags" type="int" default="7">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_get_flags" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_get_height" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_get_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_set_flags">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="RID">
+ </argument>
+ <argument index="1" name="flags" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="texture_set_shrink_all_x2_on_set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="shrink" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
new file mode 100644
index 0000000000..1071a40c3b
--- /dev/null
+++ b/doc/classes/WeakRef.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WeakRef" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Holds an [Object], but does not contribute to the reference count if the object is a reference.
+ </brief_description>
+ <description>
+ A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_ref" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ Returns the [Object] this weakref is referring to.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml
new file mode 100644
index 0000000000..e57983c367
--- /dev/null
+++ b/doc/classes/WindowDialog.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WindowDialog" inherits="Popup" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Base class for window dialogs.
+ </brief_description>
+ <description>
+ Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_close_button">
+ <return type="TextureButton">
+ </return>
+ <description>
+ Return the close [TextureButton].
+ </description>
+ </method>
+ <method name="get_resizable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_title" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Return the title of the window.
+ </description>
+ </method>
+ <method name="set_resizable">
+ <return type="void">
+ </return>
+ <argument index="0" name="resizable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_title">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String">
+ </argument>
+ <description>
+ Set the title of the window.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable">
+ </member>
+ <member name="window_title" type="String" setter="set_title" getter="get_title">
+ </member>
+ </members>
+ <constants>
+ </constants>
+ <theme_items>
+ <theme_item name="close" type="Texture">
+ </theme_item>
+ <theme_item name="close_h_ofs" type="int">
+ </theme_item>
+ <theme_item name="close_highlight" type="Texture">
+ </theme_item>
+ <theme_item name="close_v_ofs" type="int">
+ </theme_item>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ <theme_item name="scaleborder_size" type="int">
+ </theme_item>
+ <theme_item name="title_color" type="Color">
+ </theme_item>
+ <theme_item name="title_font" type="Font">
+ </theme_item>
+ <theme_item name="title_height" type="int">
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/World.xml b/doc/classes/World.xml
new file mode 100644
index 0000000000..f4f5f5b756
--- /dev/null
+++ b/doc/classes/World.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="World" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class that has everything pertaining to a world.
+ </brief_description>
+ <description>
+ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_direct_space_state">
+ <return type="PhysicsDirectSpaceState">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_environment" qualifiers="const">
+ <return type="Environment">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_fallback_environment" qualifiers="const">
+ <return type="Environment">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_scenario" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_space" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="Environment">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_fallback_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="Environment">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="environment" type="Environment" setter="set_environment" getter="get_environment">
+ </member>
+ <member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
new file mode 100644
index 0000000000..d57117fef0
--- /dev/null
+++ b/doc/classes/World2D.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="World2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Class that has everything pertaining to a 2D world.
+ </brief_description>
+ <description>
+ Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_canvas">
+ <return type="RID">
+ </return>
+ <description>
+ Retrieve the [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing.
+ </description>
+ </method>
+ <method name="get_direct_space_state">
+ <return type="Physics2DDirectSpaceState">
+ </return>
+ <description>
+ Retrieve the state of this world's physics space. This allows arbitrary querying for collision.
+ </description>
+ </method>
+ <method name="get_space">
+ <return type="RID">
+ </return>
+ <description>
+ Retrieve the [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
new file mode 100644
index 0000000000..a9450c1743
--- /dev/null
+++ b/doc/classes/WorldEnvironment.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WorldEnvironment" inherits="Node" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Sets environment properties for the entire scene
+ </brief_description>
+ <description>
+ The [WorldEnvironment] node can be added to a scene in order to set default [Environment] variables for the scene. The [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_environment" qualifiers="const">
+ <return type="Environment">
+ </return>
+ <description>
+ Return the [Environment] currently bound.
+ </description>
+ </method>
+ <method name="set_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="Environment">
+ </argument>
+ <description>
+ Set the currently bound [Environment] to the one specified.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="environment" type="Environment" setter="set_environment" getter="get_environment">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
new file mode 100644
index 0000000000..6ab84ef345
--- /dev/null
+++ b/doc/classes/XMLParser.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XMLParser" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Low-level class for creating parsers for XML files.
+ </brief_description>
+ <description>
+ This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_attribute_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the amount of attributes in the current element.
+ </description>
+ </method>
+ <method name="get_attribute_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the name of the attribute specified by the index in [code]idx[/code] argument.
+ </description>
+ </method>
+ <method name="get_attribute_value" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Get the value of the attribute specified by the index in [code]idx[/code] argument.
+ </description>
+ </method>
+ <method name="get_current_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the current line in the parsed file (currently not implemented).
+ </description>
+ </method>
+ <method name="get_named_attribute_value" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute.
+ </description>
+ </method>
+ <method name="get_named_attribute_value_safe" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Get the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found.
+ </description>
+ </method>
+ <method name="get_node_data" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the contents of a text node. This will raise an error in any other type of node.
+ </description>
+ </method>
+ <method name="get_node_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Get the name of the current element node. This will raise an error if the current node type is not [code]NODE_ELEMENT[/code] nor [code]NODE_ELEMENT_END[/code]
+ </description>
+ </method>
+ <method name="get_node_offset" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Get the byte offset of the current node since the beginning of the file or buffer.
+ </description>
+ </method>
+ <method name="get_node_type">
+ <return type="int" enum="XMLParser.NodeType">
+ </return>
+ <description>
+ Get the type of the current node. Compare with [code]NODE_*[/code] constants.
+ </description>
+ </method>
+ <method name="has_attribute" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Check whether or not the current element has a certain attribute.
+ </description>
+ </method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Check whether the current element is empty (this only works for completely empty tags, e.g. &lt;element \&gt;).
+ </description>
+ </method>
+ <method name="open">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ Open a XML file for parsing. This returns an error code.
+ </description>
+ </method>
+ <method name="open_buffer">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="PoolByteArray">
+ </argument>
+ <description>
+ Open a XML raw buffer for parsing. This returns an error code.
+ </description>
+ </method>
+ <method name="read">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Read the next node of the file. This returns an error code.
+ </description>
+ </method>
+ <method name="seek">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="pos" type="int">
+ </argument>
+ <description>
+ Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code.
+ </description>
+ </method>
+ <method name="skip_section">
+ <return type="void">
+ </return>
+ <description>
+ Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="NODE_NONE" value="0">
+ There's no node (no file or buffer opened)
+ </constant>
+ <constant name="NODE_ELEMENT" value="1">
+ Element (tag)
+ </constant>
+ <constant name="NODE_ELEMENT_END" value="2">
+ End of element
+ </constant>
+ <constant name="NODE_TEXT" value="3">
+ Text node
+ </constant>
+ <constant name="NODE_COMMENT" value="4">
+ Comment node
+ </constant>
+ <constant name="NODE_CDATA" value="5">
+ CDATA content
+ </constant>
+ <constant name="NODE_UNKNOWN" value="6">
+ Unknown node
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
new file mode 100644
index 0000000000..3c0c8b3d06
--- /dev/null
+++ b/doc/classes/YSort.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="YSort" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ Sort all child nodes based on their Y positions.
+ </brief_description>
+ <description>
+ Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="is_sort_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns true if the children nodes are being sorted.
+ </description>
+ </method>
+ <method name="set_sort_enabled">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether the children nodes are sorted or not. (default true)
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
new file mode 100644
index 0000000000..1d662ba946
--- /dev/null
+++ b/doc/classes/bool.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="bool" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Boolean built-in type
+ </brief_description>
+ <description>
+ Boolean built-in type.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="bool">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <description>
+ Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case.
+ </description>
+ </method>
+ <method name="bool">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <description>
+ Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case.
+ </description>
+ </method>
+ <method name="bool">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
new file mode 100644
index 0000000000..942aa4d55a
--- /dev/null
+++ b/doc/classes/float.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="float" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Float built-in type
+ </brief_description>
+ <description>
+ Float built-in type.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="float">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="bool">
+ </argument>
+ <description>
+ Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0.
+ </description>
+ </method>
+ <method name="float">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <description>
+ Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0.
+ </description>
+ </method>
+ <method name="float">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
new file mode 100644
index 0000000000..7c2267ac9a
--- /dev/null
+++ b/doc/classes/int.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="int" category="Built-In Types" version="3.0.alpha.custom_build">
+ <brief_description>
+ Integer built-in type.
+ </brief_description>
+ <description>
+ Integer built-in type.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="int">
+ <return type="int">
+ </return>
+ <argument index="0" name="from" type="bool">
+ </argument>
+ <description>
+ Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
+ </description>
+ </method>
+ <method name="int">
+ <return type="int">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <description>
+ Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2.
+ </description>
+ </method>
+ <method name="int">
+ <return type="int">
+ </return>
+ <argument index="0" name="from" type="String">
+ </argument>
+ <description>
+ Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py
index 1386e91ce1..6b6b794f11 100644
--- a/doc/tools/doc_status.py
+++ b/doc/tools/doc_status.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
+import os
import sys
import re
import math
@@ -220,6 +221,21 @@ class ClassStatus:
def generate_for_class(c):
status = ClassStatus()
status.name = c.attrib['name']
+
+ # setgets do not count
+ methods = []
+ for tag in list(c):
+ if tag.tag in ['methods']:
+ for sub_tag in list(tag):
+ methods.append(sub_tag.find('name'))
+ if tag.tag in ['members']:
+ for sub_tag in list(tag):
+ try:
+ methods.remove(sub_tag.find('setter'))
+ methods.remove(sub_tag.find('getter'))
+ except:
+ pass
+
for tag in list(c):
if tag.tag == 'brief_description':
@@ -230,13 +246,16 @@ class ClassStatus:
elif tag.tag in ['methods', 'signals']:
for sub_tag in list(tag):
- descr = sub_tag.find('description')
- status.progresses[tag.tag].increment(len(descr.text.strip()) > 0)
-
+ if sub_tag.find('name') in methods or tag.tag == 'signals':
+ descr = sub_tag.find('description')
+ status.progresses[tag.tag].increment(len(descr.text.strip()) > 0)
elif tag.tag in ['constants', 'members']:
for sub_tag in list(tag):
status.progresses[tag.tag].increment(len(sub_tag.text.strip()) > 0)
+ elif tag.tag in ['tutorials', 'demos']:
+ pass # Ignore those tags for now
+
elif tag.tag in ['theme_items']:
pass # Ignore those tags, since they seem to lack description at all
@@ -252,6 +271,7 @@ class ClassStatus:
input_file_list = []
input_class_list = []
+merged_file = ""
for arg in sys.argv[1:]:
if arg.startswith('--'):
@@ -259,8 +279,10 @@ for arg in sys.argv[1:]:
elif arg.startswith('-'):
for f in arg[1:]:
flags[f] = not flags[f]
- elif arg.endswith('.xml'):
- input_file_list.append(arg)
+ elif os.path.isdir(arg):
+ for f in os.listdir(arg):
+ if f.endswith('.xml'):
+ input_file_list.append(os.path.join(arg, f));
else:
input_class_list.append(arg)
@@ -287,10 +309,9 @@ if flags['u']:
if len(input_file_list) < 1 or flags['h']:
if not flags['h']:
- print(color('section', 'Invalid usage') + ': At least one classes.xml file is required')
- print(color('section', 'Usage') + ': doc_status.py [flags] <classes.xml> [class names]')
+ print(color('section', 'Invalid usage') + ': Please specify a classes directory')
+ print(color('section', 'Usage') + ': doc_status.py [flags] <classes_dir> [class names]')
print('\t< and > signify required parameters, while [ and ] signify optional parameters.')
- print('\tNote that you can give more than one classes file, in which case they will be merged on-the-fly.')
print(color('section', 'Available flags') + ':')
possible_synonym_list = list(long_flags)
possible_synonym_list.sort()
@@ -327,11 +348,10 @@ for file in input_file_list:
version = doc.attrib['version']
- for c in list(doc):
- if c.attrib['name'] in class_names:
- continue
- class_names.append(c.attrib['name'])
- classes[c.attrib['name']] = c
+ if doc.attrib['name'] in class_names:
+ continue
+ class_names.append(doc.attrib['name'])
+ classes[doc.attrib['name']] = doc
class_names.sort()
@@ -344,7 +364,7 @@ if len(input_class_list) < 1:
################################################################################
table = [table_column_names]
-table_row_chars = '+- '
+table_row_chars = '| - '
table_column_chars = '|'
total_status = ClassStatus('Total')
@@ -406,7 +426,7 @@ for row in table:
divider_string = table_row_chars[0]
for cell_i in range(len(table[0])):
- divider_string += table_row_chars[1] * (table_column_sizes[cell_i] + 2) + table_row_chars[0]
+ divider_string += table_row_chars[1] + table_row_chars[2] * (table_column_sizes[cell_i]) + table_row_chars[1] + table_row_chars[0]
print(divider_string)
for row_i, row in enumerate(table):
@@ -414,9 +434,9 @@ for row_i, row in enumerate(table):
for cell_i, cell in enumerate(row):
padding_needed = table_column_sizes[cell_i] - nonescape_len(cell) + 2
if cell_i == 0:
- row_string += table_row_chars[2] + cell + table_row_chars[2] * (padding_needed - 1)
+ row_string += table_row_chars[3] + cell + table_row_chars[3] * (padding_needed - 1)
else:
- row_string += table_row_chars[2] * math.floor(padding_needed / 2) + cell + table_row_chars[2] * math.ceil((padding_needed / 2))
+ row_string += table_row_chars[3] * math.floor(padding_needed / 2) + cell + table_row_chars[3] * math.ceil((padding_needed / 2))
row_string += table_column_chars
print(row_string)
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 84f29facf4..5d62d2f5a0 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -576,6 +576,15 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
Rect2 src_rect = (rect->flags & CANVAS_RECT_REGION) ? Rect2(rect->source.position * texpixel_size, rect->source.size * texpixel_size) : Rect2(0, 0, 1, 1);
Rect2 dst_rect = Rect2(rect->rect.position, rect->rect.size);
+ if (dst_rect.size.width < 0) {
+ dst_rect.position.x += dst_rect.size.width;
+ dst_rect.size.width *= -1;
+ }
+ if (dst_rect.size.height < 0) {
+ dst_rect.position.y += dst_rect.size.height;
+ dst_rect.size.height *= -1;
+ }
+
if (rect->flags & CANVAS_RECT_FLIP_H) {
src_rect.size.x *= -1;
}
@@ -602,8 +611,18 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
}
} else {
+ Rect2 dst_rect = Rect2(rect->rect.position, rect->rect.size);
- state.canvas_shader.set_uniform(CanvasShaderGLES3::DST_RECT, Color(rect->rect.position.x, rect->rect.position.y, rect->rect.size.x, rect->rect.size.y));
+ if (dst_rect.size.width < 0) {
+ dst_rect.position.x += dst_rect.size.width;
+ dst_rect.size.width *= -1;
+ }
+ if (dst_rect.size.height < 0) {
+ dst_rect.position.y += dst_rect.size.height;
+ dst_rect.size.height *= -1;
+ }
+
+ state.canvas_shader.set_uniform(CanvasShaderGLES3::DST_RECT, Color(dst_rect.position.x, dst_rect.position.y, dst_rect.size.x, dst_rect.size.y));
state.canvas_shader.set_uniform(CanvasShaderGLES3::SRC_RECT, Color(0, 0, 1, 1));
state.canvas_shader.set_uniform(CanvasShaderGLES3::CLIP_RECT_UV, false);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 2615f9c1b3..146a2359b6 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2599,7 +2599,7 @@ void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform
}
}
- ubo_data.shadow_split_offsets[j] = 1.0 / li->shadow_transform[j].split;
+ ubo_data.shadow_split_offsets[j] = li->shadow_transform[j].split;
Transform modelview = (p_camera_inverse_transform * li->shadow_transform[j].transform).inverse();
@@ -3174,6 +3174,7 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
for (int i = 0; i < storage->frame.current_rt->effects.ssao.depth_mipmap_fbos.size(); i++) {
state.ssao_minify_shader.set_conditional(SsaoMinifyShaderGLES3::MINIFY_START, i == 0);
+ state.ssao_minify_shader.set_conditional(SsaoMinifyShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.ssao_minify_shader.bind();
state.ssao_minify_shader.set_uniform(SsaoMinifyShaderGLES3::CAMERA_Z_FAR, p_cam_projection.get_z_far());
state.ssao_minify_shader.set_uniform(SsaoMinifyShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near());
@@ -3203,6 +3204,7 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
glDepthFunc(GL_GREATER);
// do SSAO!
state.ssao_shader.set_conditional(SsaoShaderGLES3::ENABLE_RADIUS2, env->ssao_radius2 > 0.001);
+ state.ssao_shader.set_conditional(SsaoShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.ssao_shader.bind();
state.ssao_shader.set_uniform(SsaoShaderGLES3::CAMERA_Z_FAR, p_cam_projection.get_z_far());
state.ssao_shader.set_uniform(SsaoShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near());
@@ -3312,6 +3314,7 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->effects.ssao.blur_fbo[0]);
glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ state.sss_shader.set_conditional(SubsurfScatteringShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.sss_shader.set_conditional(SubsurfScatteringShaderGLES3::USE_11_SAMPLES, subsurface_scatter_quality == SSS_QUALITY_LOW);
state.sss_shader.set_conditional(SubsurfScatteringShaderGLES3::USE_17_SAMPLES, subsurface_scatter_quality == SSS_QUALITY_MEDIUM);
state.sss_shader.set_conditional(SubsurfScatteringShaderGLES3::USE_25_SAMPLES, subsurface_scatter_quality == SSS_QUALITY_HIGH);
@@ -3366,6 +3369,7 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
//perform SSR
state.ssr_shader.set_conditional(ScreenSpaceReflectionShaderGLES3::REFLECT_ROUGHNESS, env->ssr_roughness);
+ state.ssr_shader.set_conditional(ScreenSpaceReflectionShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.ssr_shader.bind();
@@ -3519,6 +3523,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
int vp_h = storage->frame.current_rt->height;
int vp_w = storage->frame.current_rt->width;
+ state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_FAR_BLUR, true);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_LOW, env->dof_blur_far_quality == VS::ENV_DOF_BLUR_QUALITY_LOW);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_MEDIUM, env->dof_blur_far_quality == VS::ENV_DOF_BLUR_QUALITY_MEDIUM);
@@ -3561,6 +3566,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_LOW, false);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_MEDIUM, false);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_HIGH, false);
+ state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::USE_ORTHOGONAL_PROJECTION, false);
composite_from = storage->frame.current_rt->effects.mip_maps[0].color;
}
@@ -3573,6 +3579,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
int vp_h = storage->frame.current_rt->height;
int vp_w = storage->frame.current_rt->width;
+ state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_NEAR_BLUR, true);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_NEAR_FIRST_TAP, true);
@@ -3648,6 +3655,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_LOW, false);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_MEDIUM, false);
state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::DOF_QUALITY_HIGH, false);
+ state.effect_blur_shader.set_conditional(EffectBlurShaderGLES3::USE_ORTHOGONAL_PROJECTION, false);
composite_from = storage->frame.current_rt->effects.mip_maps[0].color;
}
@@ -3739,6 +3747,8 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
SWAP(exposure_shrink[exposure_shrink.size() - 1].color, storage->frame.current_rt->exposure.color);
glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height);
+
+ VisualServerRaster::redraw_request(); //if using auto exposure, redraw must happen
}
int max_glow_level = -1;
@@ -4155,7 +4165,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
clear_color = env->bg_color.to_linear();
storage->frame.clear_request = false;
- } else if (env->bg_mode == VS::ENV_BG_SKY) {
+ } else if (env->bg_mode == VS::ENV_BG_SKY || env->bg_mode == VS::ENV_BG_COLOR_SKY) {
sky = storage->sky_owner.getornull(env->sky);
@@ -4163,6 +4173,9 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
env_radiance_tex = sky->radiance;
}
storage->frame.clear_request = false;
+ if (env->bg_mode == VS::ENV_BG_COLOR_SKY) {
+ clear_color = env->bg_color.to_linear();
+ }
} else {
storage->frame.clear_request = false;
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index b3fd6fa2a0..8669c42a7a 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -806,7 +806,7 @@ public:
void _render_list(RenderList::Element **p_elements, int p_element_count, const Transform &p_view_transform, const CameraMatrix &p_projection, GLuint p_base_env, bool p_reverse_cull, bool p_alpha_pass, bool p_shadow, bool p_directional_add, bool p_directional_shadows);
- _FORCE_INLINE_ void _add_geometry(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, int p_material, bool p_depth_passs);
+ _FORCE_INLINE_ void _add_geometry(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, int p_material, bool p_depth_pass);
_FORCE_INLINE_ void _add_geometry_with_material(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, RasterizerStorageGLES3::Material *p_material, bool p_depth_pass);
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index a744abdfa8..b99817fb12 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -165,7 +165,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_RGB8: {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? GL_SRGB8 : GL_RGB8;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? GL_SRGB8 : GL_RGB8;
r_gl_format = GL_RGB;
r_gl_type = GL_UNSIGNED_BYTE;
srgb = true;
@@ -174,7 +174,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
case Image::FORMAT_RGBA8: {
r_gl_format = GL_RGBA;
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
r_gl_type = GL_UNSIGNED_BYTE;
srgb = true;
@@ -254,7 +254,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.s3tc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -270,7 +270,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.s3tc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -286,7 +286,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.s3tc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -331,7 +331,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.bptc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM : _EXT_COMPRESSED_RGBA_BPTC_UNORM;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM : _EXT_COMPRESSED_RGBA_BPTC_UNORM;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -371,7 +371,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.pvrtc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -386,7 +386,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.pvrtc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -402,7 +402,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.pvrtc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -418,7 +418,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.pvrtc_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -503,7 +503,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.etc2_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB8_ETC2 : _EXT_COMPRESSED_RGB8_ETC2;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB8_ETC2 : _EXT_COMPRESSED_RGB8_ETC2;
r_gl_format = GL_RGB;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -518,7 +518,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.etc2_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : _EXT_COMPRESSED_RGBA8_ETC2_EAC;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : _EXT_COMPRESSED_RGBA8_ETC2_EAC;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -533,7 +533,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
if (config.etc2_supported) {
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : _EXT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? _EXT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : _EXT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = true;
@@ -560,7 +560,7 @@ Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_
}
r_gl_format = GL_RGBA;
- r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
+ r_gl_internal_format = (config.srgb_decode_supported || (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) ? GL_SRGB8_ALPHA8 : GL_RGBA8;
r_gl_type = GL_UNSIGNED_BYTE;
r_compressed = false;
srgb = true;
@@ -595,7 +595,6 @@ RID RasterizerStorageGLES3::texture_create() {
void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags) {
- int components;
GLenum format;
GLenum internal_format;
GLenum type;
@@ -686,7 +685,7 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
texture->ignore_mipmaps = compressed && !img->has_mipmaps();
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps)
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && !texture->ignore_mipmaps)
glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, config.use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
else {
if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
@@ -717,7 +716,7 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // raw Filtering
}
- if ((texture->flags & VS::TEXTURE_FLAG_REPEAT || texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) && texture->target != GL_TEXTURE_CUBE_MAP) {
+ if (((texture->flags & VS::TEXTURE_FLAG_REPEAT) || (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT)) && texture->target != GL_TEXTURE_CUBE_MAP) {
if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
@@ -770,15 +769,13 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
}
}
- int mipmaps = (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && img->has_mipmaps()) ? img->get_mipmap_count() + 1 : 1;
+ int mipmaps = ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && img->has_mipmaps()) ? img->get_mipmap_count() + 1 : 1;
int w = img->get_width();
int h = img->get_height();
int tsize = 0;
- int block = Image::get_format_block_size(img->get_format());
-
for (int i = 0; i < mipmaps; i++) {
int size, ofs;
@@ -789,10 +786,6 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
if (texture->compressed) {
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- //this is not needed, as compressed takes the regular size, even if blocks extend it
- //int bw = (w % block != 0) ? w + (block - w % block) : w;
- //int bh = (h % block != 0) ? h + (block - h % block) : h;
-
int bw = w;
int bh = h;
@@ -820,7 +813,7 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
texture->stored_cube_sides |= (1 << p_cube_side);
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && mipmaps == 1 && !texture->ignore_mipmaps && (!(texture->flags & VS::TEXTURE_FLAG_CUBEMAP) || texture->stored_cube_sides == (1 << 6) - 1)) {
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && mipmaps == 1 && !texture->ignore_mipmaps && (!(texture->flags & VS::TEXTURE_FLAG_CUBEMAP) || texture->stored_cube_sides == (1 << 6) - 1)) {
//generate mipmaps if they were requested and the image does not contain them
glGenerateMipmap(texture->target);
} else if (mipmaps > 1) {
@@ -912,7 +905,7 @@ void RasterizerStorageGLES3::texture_set_flags(RID p_texture, uint32_t p_flags)
uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
texture->flags = p_flags | cube; // can't remove a cube from being a cube
- if ((texture->flags & VS::TEXTURE_FLAG_REPEAT || texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) && texture->target != GL_TEXTURE_CUBE_MAP) {
+ if (((texture->flags & VS::TEXTURE_FLAG_REPEAT) || (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT)) && texture->target != GL_TEXTURE_CUBE_MAP) {
if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
@@ -937,7 +930,7 @@ void RasterizerStorageGLES3::texture_set_flags(RID p_texture, uint32_t p_flags)
}
}
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps) {
+ if ((texture->flags & VS::TEXTURE_FLAG_MIPMAPS) && !texture->ignore_mipmaps) {
if (!had_mipmaps && texture->mipmaps == 1) {
glGenerateMipmap(texture->target);
}
@@ -3360,7 +3353,7 @@ Rect3 RasterizerStorageGLES3::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
for (int i = 0; i < mesh->surfaces.size(); i++) {
Rect3 laabb;
- if (mesh->surfaces[i]->format & VS::ARRAY_FORMAT_BONES && mesh->surfaces[i]->skeleton_bone_aabb.size()) {
+ if ((mesh->surfaces[i]->format & VS::ARRAY_FORMAT_BONES) && mesh->surfaces[i]->skeleton_bone_aabb.size()) {
int bs = mesh->surfaces[i]->skeleton_bone_aabb.size();
const Rect3 *skbones = mesh->surfaces[i]->skeleton_bone_aabb.ptr();
@@ -4473,6 +4466,7 @@ RID RasterizerStorageGLES3::light_create(VS::LightType p_type) {
light->omni_shadow_mode = VS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID;
light->omni_shadow_detail = VS::LIGHT_OMNI_SHADOW_DETAIL_VERTICAL;
light->directional_blend_splits = false;
+ light->directional_range_mode = VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE;
light->reverse_cull = false;
light->version = 0;
@@ -4625,6 +4619,22 @@ VS::LightDirectionalShadowMode RasterizerStorageGLES3::light_directional_get_sha
return light->directional_shadow_mode;
}
+void RasterizerStorageGLES3::light_directional_set_shadow_depth_range_mode(RID p_light, VS::LightDirectionalShadowDepthRangeMode p_range_mode) {
+
+ Light *light = light_owner.getornull(p_light);
+ ERR_FAIL_COND(!light);
+
+ light->directional_range_mode = p_range_mode;
+}
+
+VS::LightDirectionalShadowDepthRangeMode RasterizerStorageGLES3::light_directional_get_shadow_depth_range_mode(RID p_light) const {
+
+ const Light *light = light_owner.getornull(p_light);
+ ERR_FAIL_COND_V(!light, VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE);
+
+ return light->directional_range_mode;
+}
+
VS::LightType RasterizerStorageGLES3::light_get_type(RID p_light) const {
const Light *light = light_owner.getornull(p_light);
@@ -6847,42 +6857,28 @@ int RasterizerStorageGLES3::get_captured_render_info(VS::RenderInfo p_info) {
int RasterizerStorageGLES3::get_render_info(VS::RenderInfo p_info) {
switch (p_info) {
- case VS::INFO_OBJECTS_IN_FRAME: {
-
+ case VS::INFO_OBJECTS_IN_FRAME:
return info.render_final.object_count;
- } break;
- case VS::INFO_VERTICES_IN_FRAME: {
-
+ case VS::INFO_VERTICES_IN_FRAME:
return info.render_final.vertices_count;
- } break;
- case VS::INFO_MATERIAL_CHANGES_IN_FRAME: {
+ case VS::INFO_MATERIAL_CHANGES_IN_FRAME:
return info.render_final.material_switch_count;
- } break;
- case VS::INFO_SHADER_CHANGES_IN_FRAME: {
+ case VS::INFO_SHADER_CHANGES_IN_FRAME:
return info.render_final.shader_rebind_count;
- } break;
- case VS::INFO_SURFACE_CHANGES_IN_FRAME: {
+ case VS::INFO_SURFACE_CHANGES_IN_FRAME:
return info.render_final.surface_switch_count;
- } break;
- case VS::INFO_DRAW_CALLS_IN_FRAME: {
+ case VS::INFO_DRAW_CALLS_IN_FRAME:
return info.render_final.draw_call_count;
- } break;
- case VS::INFO_USAGE_VIDEO_MEM_TOTAL: {
-
+ case VS::INFO_USAGE_VIDEO_MEM_TOTAL:
return 0; //no idea
- } break;
- case VS::INFO_VIDEO_MEM_USED: {
-
+ case VS::INFO_VIDEO_MEM_USED:
return info.vertex_mem + info.texture_mem;
- } break;
- case VS::INFO_TEXTURE_MEM_USED: {
-
+ case VS::INFO_TEXTURE_MEM_USED:
return info.texture_mem;
- } break;
- case VS::INFO_VERTEX_MEM_USED: {
-
+ case VS::INFO_VERTEX_MEM_USED:
return info.vertex_mem;
- } break;
+ default:
+ return 0; //no idea either
}
}
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index b26032dbc4..6abc22b643 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -879,6 +879,7 @@ public:
VS::LightOmniShadowMode omni_shadow_mode;
VS::LightOmniShadowDetail omni_shadow_detail;
VS::LightDirectionalShadowMode directional_shadow_mode;
+ VS::LightDirectionalShadowDepthRangeMode directional_range_mode;
bool directional_blend_splits;
uint64_t version;
};
@@ -906,6 +907,9 @@ public:
virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light);
virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light);
+ virtual void light_directional_set_shadow_depth_range_mode(RID p_light, VS::LightDirectionalShadowDepthRangeMode p_range_mode);
+ virtual VS::LightDirectionalShadowDepthRangeMode light_directional_get_shadow_depth_range_mode(RID p_light) const;
+
virtual bool light_has_shadow(RID p_light) const;
virtual VS::LightType light_get_type(RID p_light) const;
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 419decce29..5401c8266a 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -441,12 +441,12 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
if (!bnode->single_statement) {
code += _mktab(p_level - 1) + "{\n";
}
-
+
for (int i = 0; i < bnode->statements.size(); i++) {
String scode = _dump_node_code(bnode->statements[i], p_level, r_gen_code, p_actions, p_default_actions);
- if (bnode->statements[i]->type == SL::Node::TYPE_CONTROL_FLOW || bnode->single_statement ) {
+ if (bnode->statements[i]->type == SL::Node::TYPE_CONTROL_FLOW || bnode->single_statement) {
code += scode; //use directly
} else {
code += _mktab(p_level) + scode + ";\n";
@@ -461,20 +461,20 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
SL::VariableDeclarationNode *vdnode = (SL::VariableDeclarationNode *)p_node;
String declaration = _prestr(vdnode->precision) + _typestr(vdnode->datatype);
- for(int i=0;i<vdnode->declarations.size();i++) {
- if (i>0) {
- declaration+=",";
+ for (int i = 0; i < vdnode->declarations.size(); i++) {
+ if (i > 0) {
+ declaration += ",";
} else {
- declaration+=" ";
+ declaration += " ";
}
- declaration += _mkid(vdnode->declarations[i].name);
+ declaration += _mkid(vdnode->declarations[i].name);
if (vdnode->declarations[i].initializer) {
- declaration+="=";
- declaration+=_dump_node_code(vdnode->declarations[i].initializer, p_level, r_gen_code, p_actions, p_default_actions);
+ declaration += "=";
+ declaration += _dump_node_code(vdnode->declarations[i].initializer, p_level, r_gen_code, p_actions, p_default_actions);
}
}
- code+=declaration;
+ code += declaration;
} break;
case SL::Node::TYPE_VARIABLE: {
SL::VariableNode *vnode = (SL::VariableNode *)p_node;
@@ -623,7 +623,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
String left = _dump_node_code(cfnode->blocks[0], p_level, r_gen_code, p_actions, p_default_actions);
String middle = _dump_node_code(cfnode->expressions[0], p_level, r_gen_code, p_actions, p_default_actions);
String right = _dump_node_code(cfnode->expressions[1], p_level, r_gen_code, p_actions, p_default_actions);
- code += _mktab(p_level) + "for (" +left+";"+middle+";"+right+")\n";
+ code += _mktab(p_level) + "for (" + left + ";" + middle + ";" + right + ")\n";
code += _dump_node_code(cfnode->blocks[1], p_level + 1, r_gen_code, p_actions, p_default_actions);
} else if (cfnode->flow_op == SL::FLOW_OP_RETURN) {
diff --git a/drivers/gles3/shaders/effect_blur.glsl b/drivers/gles3/shaders/effect_blur.glsl
index 09e522866c..b5f98a1244 100644
--- a/drivers/gles3/shaders/effect_blur.glsl
+++ b/drivers/gles3/shaders/effect_blur.glsl
@@ -168,7 +168,11 @@ void main() {
float depth = textureLod( dof_source_depth, uv_interp, 0.0).r;
depth = depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+#endif
float amount = smoothstep(dof_begin,dof_end,depth);
float k_accum=0.0;
@@ -182,8 +186,11 @@ void main() {
float tap_depth = texture( dof_source_depth, tap_uv, 0.0).r;
tap_depth = tap_depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ tap_depth = ((tap_depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
tap_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - tap_depth * (camera_z_far - camera_z_near));
-
+#endif
float tap_amount = mix(smoothstep(dof_begin,dof_end,tap_depth),1.0,int_ofs==0);
tap_amount*=tap_amount*tap_amount; //prevent undesired glow effect
@@ -221,7 +228,11 @@ void main() {
float tap_depth = texture( dof_source_depth, tap_uv, 0.0).r;
tap_depth = tap_depth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ tap_depth = ((tap_depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
tap_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - tap_depth * (camera_z_far - camera_z_near));
+#endif
float tap_amount = 1.0-smoothstep(dof_end,dof_begin,tap_depth);
tap_amount*=tap_amount*tap_amount; //prevent undesired glow effect
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 977cee5fcb..5f83033293 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -484,7 +484,7 @@ VERTEX_SHADER_CODE
vec3 directional_diffuse = vec3(0.0);
vec3 directional_specular = vec3(0.0);
- light_compute(normal_interp,-light_direction_attenuation.xyz,-normalize( vertex_interp ),light_color_energy.rgb,roughness,directional_diffuse,directional_specular);
+ light_compute(normal_interp,-light_direction_attenuation.xyz,-normalize( vertex_interp ),light_color_energy.rgb,roughness,directional_diffuse,directional_specular);
float diff_avg = dot(diffuse_light_interp.rgb,vec3(0.33333));
float diff_dir_avg = dot(directional_diffuse,vec3(0.33333));
@@ -935,17 +935,26 @@ LIGHT_SHADER_CODE
#elif defined(DIFFUSE_BURLEY)
{
- float NdotL = dot(L, N);
- float NdotV = dot(N, V);
- float VdotH = dot(N, normalize(L+V));
+
+
+ vec3 H = normalize(V + L);
+ float NoL = max(0.0,dot(N, L));
+ float VoH = max(0.0,dot(L, H));
+ float NoV = max(0.0,dot(N, V));
+
+ float FD90 = 0.5 + 2.0 * VoH * VoH * roughness;
+ float FdV = 1.0 + (FD90 - 1.0) * pow( 1.0 - NoV, 5.0 );
+ float FdL = 1.0 + (FD90 - 1.0) * pow( 1.0 - NoL, 5.0 );
+ light_amount = ( (1.0 / M_PI) * FdV * FdL );
+/*
float energyBias = mix(roughness, 0.0, 0.5);
float energyFactor = mix(roughness, 1.0, 1.0 / 1.51);
- float fd90 = energyBias + 2.0 * VdotH * VdotH * roughness;
+ float fd90 = energyBias + 2.0 * VoH * VoH * roughness;
float f0 = 1.0;
- float lightScatter = f0 + (fd90 - f0) * pow(1.0 - NdotL, 5.0);
- float viewScatter = f0 + (fd90 - f0) * pow(1.0 - NdotV, 5.0);
+ float lightScatter = f0 + (fd90 - f0) * pow(1.0 - NoL, 5.0);
+ float viewScatter = f0 + (fd90 - f0) * pow(1.0 - NoV, 5.0);
- light_amount = lightScatter * viewScatter * energyFactor;
+ light_amount = lightScatter * viewScatter * energyFactor;*/
}
#else
//lambert
@@ -1697,9 +1706,16 @@ FRAGMENT_SHADER_CODE
vec3 light_attenuation=vec3(1.0);
+ float depth_z = -vertex.z;
#ifdef LIGHT_DIRECTIONAL_SHADOW
- if (gl_FragCoord.w > shadow_split_offsets.w) {
+#ifdef LIGHT_USE_PSSM4
+ if (depth_z < shadow_split_offsets.w) {
+#elif defined(LIGHT_USE_PSSM2)
+ if (depth_z < shadow_split_offsets.y) {
+#else
+ if (depth_z < shadow_split_offsets.x) {
+#endif //LIGHT_USE_PSSM4
vec3 pssm_coord;
float pssm_fade=0.0;
@@ -1708,17 +1724,15 @@ FRAGMENT_SHADER_CODE
float pssm_blend;
vec3 pssm_coord2;
bool use_blend=true;
- vec3 light_pssm_split_inv = 1.0/shadow_split_offsets.xyz;
- float w_inv = 1.0/gl_FragCoord.w;
#endif
#ifdef LIGHT_USE_PSSM4
- if (gl_FragCoord.w > shadow_split_offsets.y) {
+ if (depth_z < shadow_split_offsets.y) {
- if (gl_FragCoord.w > shadow_split_offsets.x) {
+ if (depth_z < shadow_split_offsets.x) {
highp vec4 splane=(shadow_matrix1 * vec4(vertex,1.0));
pssm_coord=splane.xyz/splane.w;
@@ -1728,7 +1742,7 @@ FRAGMENT_SHADER_CODE
splane=(shadow_matrix2 * vec4(vertex,1.0));
pssm_coord2=splane.xyz/splane.w;
- pssm_blend=smoothstep(0.0,light_pssm_split_inv.x,w_inv);
+ pssm_blend=smoothstep(0.0,shadow_split_offsets.x,depth_z);
#endif
} else {
@@ -1739,14 +1753,14 @@ FRAGMENT_SHADER_CODE
#if defined(LIGHT_USE_PSSM_BLEND)
splane=(shadow_matrix3 * vec4(vertex,1.0));
pssm_coord2=splane.xyz/splane.w;
- pssm_blend=smoothstep(light_pssm_split_inv.x,light_pssm_split_inv.y,w_inv);
+ pssm_blend=smoothstep(shadow_split_offsets.x,shadow_split_offsets.y,depth_z);
#endif
}
} else {
- if (gl_FragCoord.w > shadow_split_offsets.z) {
+ if (depth_z < shadow_split_offsets.z) {
highp vec4 splane=(shadow_matrix3 * vec4(vertex,1.0));
pssm_coord=splane.xyz/splane.w;
@@ -1754,13 +1768,14 @@ FRAGMENT_SHADER_CODE
#if defined(LIGHT_USE_PSSM_BLEND)
splane=(shadow_matrix4 * vec4(vertex,1.0));
pssm_coord2=splane.xyz/splane.w;
- pssm_blend=smoothstep(light_pssm_split_inv.y,light_pssm_split_inv.z,w_inv);
+ pssm_blend=smoothstep(shadow_split_offsets.y,shadow_split_offsets.z,depth_z);
#endif
} else {
+
highp vec4 splane=(shadow_matrix4 * vec4(vertex,1.0));
pssm_coord=splane.xyz/splane.w;
- pssm_fade = smoothstep(shadow_split_offsets.z,shadow_split_offsets.w,gl_FragCoord.w);
+ pssm_fade = smoothstep(shadow_split_offsets.z,shadow_split_offsets.w,depth_z);
#if defined(LIGHT_USE_PSSM_BLEND)
use_blend=false;
@@ -1776,7 +1791,7 @@ FRAGMENT_SHADER_CODE
#ifdef LIGHT_USE_PSSM2
- if (gl_FragCoord.w > shadow_split_offsets.x) {
+ if (depth_z < shadow_split_offsets.x) {
highp vec4 splane=(shadow_matrix1 * vec4(vertex,1.0));
pssm_coord=splane.xyz/splane.w;
@@ -1786,13 +1801,13 @@ FRAGMENT_SHADER_CODE
splane=(shadow_matrix2 * vec4(vertex,1.0));
pssm_coord2=splane.xyz/splane.w;
- pssm_blend=smoothstep(0.0,light_pssm_split_inv.x,w_inv);
+ pssm_blend=smoothstep(0.0,shadow_split_offsets.x,depth_z);
#endif
} else {
highp vec4 splane=(shadow_matrix2 * vec4(vertex,1.0));
pssm_coord=splane.xyz/splane.w;
- pssm_fade = smoothstep(shadow_split_offsets.x,shadow_split_offsets.y,gl_FragCoord.w);
+ pssm_fade = smoothstep(shadow_split_offsets.x,shadow_split_offsets.y,depth_z);
#if defined(LIGHT_USE_PSSM_BLEND)
use_blend=false;
@@ -1834,6 +1849,7 @@ FRAGMENT_SHADER_CODE
}
+
#endif //LIGHT_DIRECTIONAL_SHADOW
#ifdef USE_VERTEX_LIGHTING
diff --git a/drivers/gles3/shaders/screen_space_reflection.glsl b/drivers/gles3/shaders/screen_space_reflection.glsl
index cc41d36c37..b2e6f7a736 100644
--- a/drivers/gles3/shaders/screen_space_reflection.glsl
+++ b/drivers/gles3/shaders/screen_space_reflection.glsl
@@ -56,7 +56,6 @@ vec2 view_to_screen(vec3 view_pos,out float w) {
#define M_PI 3.14159265359
-
void main() {
@@ -158,8 +157,13 @@ void main() {
w+=w_advance;
//convert to linear depth
+
depth = texture(source_depth, pos*pixel_size).r * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+#endif
depth=-depth;
z_from = z_to;
diff --git a/drivers/gles3/shaders/ssao.glsl b/drivers/gles3/shaders/ssao.glsl
index 0e8fc89d6c..c668e63745 100644
--- a/drivers/gles3/shaders/ssao.glsl
+++ b/drivers/gles3/shaders/ssao.glsl
@@ -65,7 +65,12 @@ layout(location = 0) out float visibility;
uniform vec4 proj_info;
vec3 reconstructCSPosition(vec2 S, float z) {
- return vec3((S.xy * proj_info.xy + proj_info.zw) * z, z);
+#ifdef USE_ORTHOGONAL_PROJECTION
+ return vec3((S.xy * proj_info.xy + proj_info.zw), z);
+#else
+ return vec3((S.xy * proj_info.xy + proj_info.zw) * z, z);
+
+#endif
}
vec3 getPosition(ivec2 ssP) {
@@ -73,7 +78,11 @@ vec3 getPosition(ivec2 ssP) {
P.z = texelFetch(source_depth, ssP, 0).r;
P.z = P.z * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ P.z = ((P.z + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
P.z = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - P.z * (camera_z_far - camera_z_near));
+#endif
P.z = -P.z;
// Offset to pixel center
@@ -118,7 +127,12 @@ vec3 getOffsetPosition(ivec2 ssC, vec2 unitOffset, float ssR) {
//read from depth buffer
P.z = texelFetch(source_depth, mipP, 0).r;
P.z = P.z * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ P.z = ((P.z + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
P.z = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - P.z * (camera_z_far - camera_z_near));
+
+#endif
P.z = -P.z;
} else {
@@ -214,8 +228,11 @@ void main() {
// Choose the screen-space sample radius
// proportional to the projected area of the sphere
+#ifdef USE_ORTHOGONAL_PROJECTION
+ float ssDiskRadius = -proj_scale * radius;
+#else
float ssDiskRadius = -proj_scale * radius / C.z;
-
+#endif
float sum = 0.0;
for (int i = 0; i < NUM_SAMPLES; ++i) {
sum += sampleAO(ssC, C, n_C, ssDiskRadius, radius,i, randomPatternRotationAngle);
diff --git a/drivers/gles3/shaders/ssao_minify.glsl b/drivers/gles3/shaders/ssao_minify.glsl
index 6e46a1842c..647c762438 100644
--- a/drivers/gles3/shaders/ssao_minify.glsl
+++ b/drivers/gles3/shaders/ssao_minify.glsl
@@ -41,7 +41,11 @@ void main() {
#ifdef MINIFY_START
float fdepth = texelFetch(source_depth, clamp(ssP * 2 + ivec2(ssP.y & 1, ssP.x & 1), ivec2(0), from_size - ivec2(1)), source_mipmap).r;
fdepth = fdepth * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ fdepth = ((fdepth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
fdepth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - fdepth * (camera_z_far - camera_z_near));
+#endif
fdepth /= camera_z_far;
depth = uint(clamp(fdepth*65535.0,0.0,65535.0));
diff --git a/drivers/gles3/shaders/subsurf_scattering.glsl b/drivers/gles3/shaders/subsurf_scattering.glsl
index 8873443727..20c3b7473f 100644
--- a/drivers/gles3/shaders/subsurf_scattering.glsl
+++ b/drivers/gles3/shaders/subsurf_scattering.glsl
@@ -17,36 +17,36 @@ void main() {
//#define QUALIFIER uniform // some guy on the interweb says it may be faster with this
#define QUALIFIER const
+
#ifdef USE_25_SAMPLES
const int kernel_size=25;
-
QUALIFIER vec2 kernel[25] = vec2[] (
-vec2(0.099654,0.0),
-vec2(0.001133,-3.0),
-vec2(0.002316,-2.52083),
-vec2(0.00445,-2.08333),
-vec2(0.008033,-1.6875),
-vec2(0.013627,-1.33333),
-vec2(0.021724,-1.02083),
-vec2(0.032542,-0.75),
-vec2(0.04581,-0.520833),
-vec2(0.0606,-0.333333),
-vec2(0.075333,-0.1875),
-vec2(0.088001,-0.0833333),
-vec2(0.096603,-0.0208333),
-vec2(0.096603,0.0208333),
-vec2(0.088001,0.0833333),
-vec2(0.075333,0.1875),
-vec2(0.0606,0.333333),
-vec2(0.04581,0.520833),
-vec2(0.032542,0.75),
-vec2(0.021724,1.02083),
-vec2(0.013627,1.33333),
-vec2(0.008033,1.6875),
-vec2(0.00445,2.08333),
-vec2(0.002316,2.52),
-vec2(0.001133,3.0)
+ vec2(0.530605, 0.0),
+ vec2(0.000973794, -3.0),
+ vec2(0.00333804, -2.52083),
+ vec2(0.00500364, -2.08333),
+ vec2(0.00700976, -1.6875),
+ vec2(0.0094389, -1.33333),
+ vec2(0.0128496, -1.02083),
+ vec2(0.017924, -0.75),
+ vec2(0.0263642, -0.520833),
+ vec2(0.0410172, -0.333333),
+ vec2(0.0493588, -0.1875),
+ vec2(0.0402784, -0.0833333),
+ vec2(0.0211412, -0.0208333),
+ vec2(0.0211412, 0.0208333),
+ vec2(0.0402784, 0.0833333),
+ vec2(0.0493588, 0.1875),
+ vec2(0.0410172, 0.333333),
+ vec2(0.0263642, 0.520833),
+ vec2(0.017924, 0.75),
+ vec2(0.0128496, 1.02083),
+ vec2(0.0094389, 1.33333),
+ vec2(0.00700976, 1.6875),
+ vec2(0.00500364, 2.08333),
+ vec2(0.00333804, 2.52083),
+ vec2(0.000973794, 3.0)
);
#endif //USE_25_SAMPLES
@@ -56,23 +56,23 @@ vec2(0.001133,3.0)
const int kernel_size=17;
QUALIFIER vec2 kernel[17] = vec2[](
-vec2(0.197417,0.0),
-vec2(0.000078,-2.0),
-vec2(0.000489,-1.53125),
-vec2(0.002403,-1.125),
-vec2(0.009245,-0.78125),
-vec2(0.027835,-0.5),
-vec2(0.065592,-0.28125),
-vec2(0.12098,-0.125),
-vec2(0.17467,-0.03125),
-vec2(0.17467,0.03125),
-vec2(0.12098,0.125),
-vec2(0.065592,0.28125),
-vec2(0.027835,0.5),
-vec2(0.009245,0.78125),
-vec2(0.002403,1.125),
-vec2(0.000489,1.53125),
-vec2(0.000078,2.0)
+ vec2(0.536343, 0.0),
+ vec2(0.00317394, -2.0),
+ vec2(0.0100386, -1.53125),
+ vec2(0.0144609, -1.125),
+ vec2(0.0216301, -0.78125),
+ vec2(0.0347317, -0.5),
+ vec2(0.0571056, -0.28125),
+ vec2(0.0582416, -0.125),
+ vec2(0.0324462, -0.03125),
+ vec2(0.0324462, 0.03125),
+ vec2(0.0582416, 0.125),
+ vec2(0.0571056, 0.28125),
+ vec2(0.0347317, 0.5),
+ vec2(0.0216301, 0.78125),
+ vec2(0.0144609, 1.125),
+ vec2(0.0100386, 1.53125),
+ vec2(0.00317394,2.0)
);
#endif //USE_17_SAMPLES
@@ -82,23 +82,24 @@ vec2(0.000078,2.0)
const int kernel_size=11;
-QUALIFIER vec2 kernel[kernel_size] = vec2[](
-vec2(0.198596,0.0),
-vec2(0.0093,-2.0),
-vec2(0.028002,-1.28),
-vec2(0.065984,-0.72),
-vec2(0.121703,-0.32),
-vec2(0.175713,-0.08),
-vec2(0.175713,0.08),
-vec2(0.121703,0.32),
-vec2(0.065984,0.72),
-vec2(0.028002,1.28),
-vec2(0.0093,2.0)
+QUALIFIER vec4 kernel[11] = vec4[](
+ vec4(0.560479, 0.0),
+ vec4(0.00471691, -2.0),
+ vec4(0.0192831, -1.28),
+ vec4(0.03639, -0.72),
+ vec4(0.0821904, -0.32),
+ vec4(0.0771802, -0.08),
+ vec4(0.0771802, 0.08),
+ vec4(0.0821904, 0.32),
+ vec4(0.03639, 0.72),
+ vec4(0.0192831, 1.28),
+ vec4(0.00471691,2.0)
);
#endif //USE_11_SAMPLES
+
uniform float max_radius;
uniform float camera_z_far;
uniform float camera_z_near;
@@ -126,12 +127,16 @@ void main() {
// Fetch linear depth of current pixel:
float depth = texture(source_depth, uv_interp).r * 2.0 - 1.0;
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth = ((depth + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+ float scale = unit_size; //remember depth is negative by default in OpenGL
+#else
depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
+ float scale = unit_size / depth; //remember depth is negative by default in OpenGL
+#endif
- float scale = unit_size / depth; //remember depth is negative by default in OpenGL
-
// Calculate the final step to fetch the surrounding pixels:
vec2 step = max_radius * scale * dir;
step *= strength; // Modulate it using the alpha channel.
@@ -153,9 +158,14 @@ void main() {
#ifdef ENABLE_FOLLOW_SURFACE
// If the difference in depth is huge, we lerp color back to "colorM":
float depth_cmp = texture(source_depth, offset).r *2.0 - 1.0;
+
+#ifdef USE_ORTHOGONAL_PROJECTION
+ depth_cmp = ((depth_cmp + (camera_z_far + camera_z_near)/(camera_z_far - camera_z_near)) * (camera_z_far - camera_z_near))/2.0;
+#else
depth_cmp = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth_cmp * (camera_z_far - camera_z_near));
+#endif
- float s = clamp(300.0f * distance *
+ float s = clamp(300.0f * scale *
max_radius * abs(depth - depth_cmp),0.0,1.0);
color = mix(color, base_color.rgb, s);
#endif
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 1798c84d85..e4c8641a3b 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -31,23 +31,144 @@
#ifdef PULSEAUDIO_ENABLED
-#include <pulse/error.h>
+#include <pulse/pulseaudio.h>
#include "os/os.h"
#include "project_settings.h"
+void pa_state_cb(pa_context *c, void *userdata) {
+ pa_context_state_t state;
+ int *pa_ready = (int *)userdata;
+
+ state = pa_context_get_state(c);
+ switch (state) {
+ case PA_CONTEXT_FAILED:
+ case PA_CONTEXT_TERMINATED:
+ *pa_ready = 2;
+ break;
+
+ case PA_CONTEXT_READY:
+ *pa_ready = 1;
+ break;
+ }
+}
+
+void sink_info_cb(pa_context *c, const pa_sink_info *l, int eol, void *userdata) {
+ unsigned int *channels = (unsigned int *)userdata;
+
+ // If eol is set to a positive number, you're at the end of the list
+ if (eol > 0) {
+ return;
+ }
+
+ *channels = l->channel_map.channels;
+}
+
+void server_info_cb(pa_context *c, const pa_server_info *i, void *userdata) {
+ char *default_output = (char *)userdata;
+
+ strncpy(default_output, i->default_sink_name, 1024);
+}
+
+static unsigned int detect_channels() {
+
+ pa_mainloop *pa_ml;
+ pa_mainloop_api *pa_mlapi;
+ pa_operation *pa_op;
+ pa_context *pa_ctx;
+
+ int state = 0;
+ int pa_ready = 0;
+
+ char default_output[1024];
+ unsigned int channels = 2;
+
+ pa_ml = pa_mainloop_new();
+ pa_mlapi = pa_mainloop_get_api(pa_ml);
+ pa_ctx = pa_context_new(pa_mlapi, "Godot");
+
+ int ret = pa_context_connect(pa_ctx, NULL, PA_CONTEXT_NOFLAGS, NULL);
+ if (ret < 0) {
+ pa_context_unref(pa_ctx);
+ pa_mainloop_free(pa_ml);
+
+ return 2;
+ }
+
+ pa_context_set_state_callback(pa_ctx, pa_state_cb, &pa_ready);
+
+ // Wait until the pa server is ready
+ while (pa_ready == 0) {
+ pa_mainloop_iterate(pa_ml, 1, NULL);
+ }
+
+ // Check if there was an error connecting to the pa server
+ if (pa_ready == 2) {
+ pa_context_disconnect(pa_ctx);
+ pa_context_unref(pa_ctx);
+ pa_mainloop_free(pa_ml);
+
+ return 2;
+ }
+
+ // Get the default output device name
+ pa_op = pa_context_get_server_info(pa_ctx, &server_info_cb, (void *)default_output);
+ if (pa_op) {
+ while (pa_operation_get_state(pa_op) == PA_OPERATION_RUNNING) {
+ ret = pa_mainloop_iterate(pa_ml, 1, NULL);
+ if (ret < 0) {
+ ERR_PRINT("pa_mainloop_iterate error");
+ }
+ }
+
+ pa_operation_unref(pa_op);
+
+ // Now using the device name get the amount of channels
+ pa_op = pa_context_get_sink_info_by_name(pa_ctx, default_output, &sink_info_cb, (void *)&channels);
+ if (pa_op) {
+ while (pa_operation_get_state(pa_op) == PA_OPERATION_RUNNING) {
+ ret = pa_mainloop_iterate(pa_ml, 1, NULL);
+ if (ret < 0) {
+ ERR_PRINT("pa_mainloop_iterate error");
+ }
+ }
+
+ pa_operation_unref(pa_op);
+ } else {
+ ERR_PRINT("pa_context_get_sink_info_by_name error");
+ }
+ } else {
+ ERR_PRINT("pa_context_get_server_info error");
+ }
+
+ pa_context_disconnect(pa_ctx);
+ pa_context_unref(pa_ctx);
+ pa_mainloop_free(pa_ml);
+
+ return channels;
+}
+
Error AudioDriverPulseAudio::init() {
active = false;
thread_exited = false;
exit_thread = false;
- pcm_open = false;
- samples_in = NULL;
- samples_out = NULL;
mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
- speaker_mode = SPEAKER_MODE_STEREO;
- channels = 2;
+ channels = detect_channels();
+
+ switch (channels) {
+ case 2: // Stereo
+ case 4: // Surround 3.1
+ case 6: // Surround 5.1
+ case 8: // Surround 7.1
+ break;
+
+ default:
+ ERR_PRINTS("PulseAudio: Unsupported number of channels: " + itos(channels));
+ ERR_FAIL_V(ERR_CANT_OPEN);
+ break;
+ }
pa_sample_spec spec;
spec.format = PA_SAMPLE_S16LE;
@@ -59,7 +180,8 @@ Error AudioDriverPulseAudio::init() {
buffer_size = buffer_frames * channels;
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ print_line("PulseAudio: detected " + itos(channels) + " channels");
+ print_line("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
}
pa_buffer_attr attr;
@@ -86,8 +208,8 @@ Error AudioDriverPulseAudio::init() {
ERR_FAIL_COND_V(pulse == NULL, ERR_CANT_OPEN);
}
- samples_in = memnew_arr(int32_t, buffer_size);
- samples_out = memnew_arr(int16_t, buffer_size);
+ samples_in.resize(buffer_size);
+ samples_out.resize(buffer_size);
mutex = Mutex::create();
thread = Thread::create(AudioDriverPulseAudio::thread_func, this);
@@ -119,7 +241,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
} else {
ad->lock();
- ad->audio_server_process(ad->buffer_frames, ad->samples_in);
+ ad->audio_server_process(ad->buffer_frames, ad->samples_in.ptr());
ad->unlock();
@@ -132,7 +254,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
int error_code;
int byte_size = ad->buffer_size * sizeof(int16_t);
- if (pa_simple_write(ad->pulse, ad->samples_out, byte_size, &error_code) < 0) {
+ if (pa_simple_write(ad->pulse, ad->samples_out.ptr(), byte_size, &error_code) < 0) {
// can't recover here
fprintf(stderr, "PulseAudio failed and can't recover: %s\n", pa_strerror(error_code));
ad->active = false;
@@ -156,7 +278,7 @@ int AudioDriverPulseAudio::get_mix_rate() const {
AudioDriver::SpeakerMode AudioDriverPulseAudio::get_speaker_mode() const {
- return speaker_mode;
+ return get_speaker_mode_by_total_channels(channels);
}
void AudioDriverPulseAudio::lock() {
@@ -186,16 +308,6 @@ void AudioDriverPulseAudio::finish() {
pulse = NULL;
}
- if (samples_in) {
- memdelete_arr(samples_in);
- samples_in = NULL;
- }
-
- if (samples_out) {
- memdelete_arr(samples_out);
- samples_out = NULL;
- }
-
memdelete(thread);
if (mutex) {
memdelete(mutex);
@@ -207,11 +319,21 @@ void AudioDriverPulseAudio::finish() {
AudioDriverPulseAudio::AudioDriverPulseAudio() {
- samples_in = NULL;
- samples_out = NULL;
mutex = NULL;
thread = NULL;
pulse = NULL;
+
+ samples_in.clear();
+ samples_out.clear();
+
+ mix_rate = 0;
+ buffer_size = 0;
+ channels = 0;
+
+ active = false;
+ thread_exited = false;
+ exit_thread = false;
+
latency = 0;
buffer_frames = 0;
buffer_size = 0;
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h
index 9ae0b7e50c..3ede684496 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.h
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.h
@@ -43,14 +43,10 @@ class AudioDriverPulseAudio : public AudioDriver {
pa_simple *pulse;
- int32_t *samples_in;
- int16_t *samples_out;
-
- static void thread_func(void *p_udata);
+ Vector<int32_t> samples_in;
+ Vector<int16_t> samples_out;
unsigned int mix_rate;
- SpeakerMode speaker_mode;
-
unsigned int buffer_frames;
unsigned int buffer_size;
int channels;
@@ -58,10 +54,11 @@ class AudioDriverPulseAudio : public AudioDriver {
bool active;
bool thread_exited;
mutable bool exit_thread;
- bool pcm_open;
float latency;
+ static void thread_func(void *p_udata);
+
public:
const char *get_name() const {
return "PulseAudio";
diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp
index ae5fdd28b6..a184c9e9cf 100644
--- a/drivers/rtaudio/audio_driver_rtaudio.cpp
+++ b/drivers/rtaudio/audio_driver_rtaudio.cpp
@@ -143,7 +143,7 @@ Error AudioDriverRtAudio::init() {
}
}
- return OK;
+ return active ? OK : ERR_UNAVAILABLE;
}
int AudioDriverRtAudio::get_mix_rate() const {
diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub
index 5ced44dfda..c560e1289f 100644
--- a/drivers/unix/SCsub
+++ b/drivers/unix/SCsub
@@ -14,4 +14,6 @@ f.close()
env.add_source_files(env.drivers_sources, "*.cpp")
+env["check_c_headers"] = [ [ "mntent.h", "HAVE_MNTENT" ] ]
+
Export('env')
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index b85a63a44a..e7054e11a3 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -35,10 +35,17 @@
#include <sys/statvfs.h>
#endif
+#include "core/list.h"
#include "os/memory.h"
#include "print_string.h"
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef HAVE_MNTENT
+#include <mntent.h>
+#endif
DirAccess *DirAccessUnix::create_fs() {
@@ -176,13 +183,96 @@ void DirAccessUnix::list_dir_end() {
_cisdir = false;
}
+#if defined(HAVE_MNTENT) && defined(X11_ENABLED)
+static bool _filter_drive(struct mntent *mnt) {
+ // Ignore devices that don't point to /dev
+ if (strncmp(mnt->mnt_fsname, "/dev", 4) != 0) {
+ return false;
+ }
+
+ // Accept devices mounted at common locations
+ if (strncmp(mnt->mnt_dir, "/media", 6) == 0 ||
+ strncmp(mnt->mnt_dir, "/mnt", 4) == 0 ||
+ strncmp(mnt->mnt_dir, "/home", 5) == 0 ||
+ strncmp(mnt->mnt_dir, "/run/media", 10) == 0) {
+ return true;
+ }
+
+ // Ignore everything else
+ return false;
+}
+#endif
+
+static void _get_drives(List<String> *list) {
+
+#if defined(HAVE_MNTENT) && defined(X11_ENABLED)
+ // Check /etc/mtab for the list of mounted partitions
+ FILE *mtab = setmntent("/etc/mtab", "r");
+ if (mtab) {
+ struct mntent mnt;
+ char strings[4096];
+
+ while (getmntent_r(mtab, &mnt, strings, sizeof(strings))) {
+ if (mnt.mnt_dir != NULL && _filter_drive(&mnt)) {
+ // Avoid duplicates
+ if (!list->find(mnt.mnt_dir)) {
+ list->push_back(mnt.mnt_dir);
+ }
+ }
+ }
+
+ endmntent(mtab);
+ }
+#endif
+
+ // Add $HOME
+ const char *home = getenv("HOME");
+ if (home) {
+ // Only add if it's not a duplicate
+ if (!list->find(home)) {
+ list->push_back(home);
+ }
+
+ // Check $HOME/.config/gtk-3.0/bookmarks
+ char path[1024];
+ snprintf(path, 1024, "%s/.config/gtk-3.0/bookmarks", home);
+ FILE *fd = fopen(path, "r");
+ if (fd) {
+ char string[1024];
+ while (fgets(string, 1024, fd)) {
+ // Parse only file:// links
+ if (strncmp(string, "file://", 7) == 0) {
+ // Strip any unwanted edges on the strings and push_back if it's not a duplicate
+ String fpath = String(string + 7).strip_edges();
+ if (!list->find(fpath)) {
+ list->push_back(fpath);
+ }
+ }
+ }
+
+ fclose(fd);
+ }
+ }
+
+ list->sort();
+}
+
int DirAccessUnix::get_drive_count() {
- return 0;
+ List<String> list;
+ _get_drives(&list);
+
+ return list.size();
}
+
String DirAccessUnix::get_drive(int p_drive) {
- return "";
+ List<String> list;
+ _get_drives(&list);
+
+ ERR_FAIL_INDEX_V(p_drive, list.size(), "");
+
+ return list[p_drive];
}
Error DirAccessUnix::make_dir(String p_dir) {
@@ -221,37 +311,24 @@ Error DirAccessUnix::change_dir(String p_dir) {
if (prev_dir.parse_utf8(real_current_dir_name))
prev_dir = real_current_dir_name; //no utf8, maybe latin?
- //print_line("directory we are changing out of (prev_dir): " + prev_dir);
-
// try_dir is the directory we are trying to change into
String try_dir = "";
if (p_dir.is_rel_path()) {
String next_dir = current_dir + "/" + p_dir;
- //print_line("p_dir is relative: " + p_dir + " about to simplfy: " + next_dir);
next_dir = next_dir.simplify_path();
try_dir = next_dir;
} else {
try_dir = p_dir;
- //print_line("p_dir is absolute: " + p_dir);
- }
-
- // if try_dir is nothing, it is not changing directory so change it to a "." otherwise chdir will fail
- if (try_dir == "") {
- try_dir = ".";
}
- //print_line("directory we are changing in to (try_dir): " + try_dir);
-
bool worked = (chdir(try_dir.utf8().get_data()) == 0); // we can only give this utf8
if (!worked) {
- //print_line("directory does not exist");
return ERR_INVALID_PARAMETER;
}
// the directory exists, so set current_dir to try_dir
current_dir = try_dir;
chdir(prev_dir.utf8().get_data());
- //print_line("directory exists, setting current_dir to: " + current_dir);
return OK;
}
@@ -319,11 +396,16 @@ size_t DirAccessUnix::get_space_left() {
DirAccessUnix::DirAccessUnix() {
dir_stream = 0;
- current_dir = ".";
_cisdir = false;
/* determine drive count */
+ // set current directory to an absolute path of the current directory
+ char real_current_dir_name[2048];
+ getcwd(real_current_dir_name, 2048);
+ if (current_dir.parse_utf8(real_current_dir_name))
+ current_dir = real_current_dir_name;
+
change_dir(current_dir);
}
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index db06cce644..e19bc738cb 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -164,7 +164,6 @@ void FileAccessUnix::seek_end(int64_t p_position) {
ERR_FAIL_COND(!f);
- last_error = OK;
if (fseek(f, p_position, SEEK_END))
check_errors();
}
@@ -173,7 +172,6 @@ size_t FileAccessUnix::get_pos() const {
ERR_FAIL_COND_V(!f, 0);
- last_error = OK;
int pos = ftell(f);
if (pos < 0) {
check_errors();
@@ -207,8 +205,8 @@ uint8_t FileAccessUnix::get_8() const {
uint8_t b;
if (fread(&b, 1, 1, f) == 0) {
check_errors();
- };
-
+ b = '\0';
+ }
return b;
}
@@ -276,6 +274,15 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
};
}
+Error FileAccessUnix::_chmod(const String &p_path, int p_mod) {
+ int err = chmod(p_path.utf8().get_data(), p_mod);
+ if (!err) {
+ return OK;
+ }
+
+ return FAILED;
+}
+
FileAccess *FileAccessUnix::create_libc() {
return memnew(FileAccessUnix);
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 6e5110431f..c5ab8821be 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -78,6 +78,8 @@ public:
virtual uint64_t _get_modified_time(const String &p_file);
+ virtual Error _chmod(const String &p_path, int p_mod);
+
FileAccessUnix();
virtual ~FileAccessUnix();
};
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 3fc0144294..0995e5236f 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -64,7 +64,6 @@ static size_t _set_sockaddr(struct sockaddr_storage *p_addr, const IP_Address &p
// IPv4 socket with IPv6 address
ERR_FAIL_COND_V(!p_ip.is_ipv4(), 0);
- uint32_t ipv4 = *((uint32_t *)p_ip.get_ipv4());
struct sockaddr_in *addr4 = (struct sockaddr_in *)p_addr;
addr4->sin_family = AF_INET;
addr4->sin_port = htons(p_port); // short, network byte order
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 29d1e5deed..eb86491dec 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -67,12 +67,13 @@ Error AudioDriverWASAPI::init_device() {
switch (channels) {
case 2: // Stereo
+ case 4: // Surround 3.1
case 6: // Surround 5.1
case 8: // Surround 7.1
break;
default:
- ERR_PRINT("WASAPI: Unsupported number of channels");
+ ERR_PRINTS("WASAPI: Unsupported number of channels: " + itos(channels));
ERR_FAIL_V(ERR_CANT_OPEN);
break;
}
@@ -119,7 +120,8 @@ Error AudioDriverWASAPI::init_device() {
samples_in.resize(buffer_size);
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ print_line("WASAPI: detected " + itos(channels) + " channels");
+ print_line("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
}
return OK;
@@ -185,7 +187,7 @@ int AudioDriverWASAPI::get_mix_rate() const {
AudioDriver::SpeakerMode AudioDriverWASAPI::get_speaker_mode() const {
- return SPEAKER_MODE_STEREO;
+ return get_speaker_mode_by_total_channels(channels);
}
void AudioDriverWASAPI::thread_func(void *p_udata) {
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 30c8332fa3..fe2069089c 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -159,7 +159,8 @@ void FileAccessWindows::seek_end(int64_t p_position) {
size_t FileAccessWindows::get_pos() const {
size_t aux_position = 0;
- if (!(aux_position = ftell(f))) {
+ aux_position = ftell(f);
+ if (!aux_position) {
check_errors();
};
return aux_position;
diff --git a/editor/SCsub b/editor/SCsub
index 0e690cf465..315865ad32 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -41,11 +41,8 @@ def make_doc_header(target, source, env):
src = s.srcnode().abspath
f = open_utf8(src, "r")
content = f.read()
- buf += content[content.find("<class"): content.rfind("</doc>")]
- if len(docbegin) == 0:
- docbegin = content[0: content.find("<class")]
- if len(docend) == 0:
- docend = content[content.rfind("</doc>"): len(buf)]
+ buf+=content
+
buf = encode_utf8(docbegin + buf + docend)
decomp_size = len(buf)
import zlib
@@ -60,6 +57,7 @@ def make_doc_header(target, source, env):
for i in range(len(buf)):
g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
+
g.write("#endif")
@@ -385,6 +383,18 @@ def make_license_header(target, source, env):
g.write("#endif\n")
+
+def _make_doc_data_class_path(to_path):
+ g = open_utf8(os.path.join(to_path,"doc_data_class_path.gen.h"), "w")
+ g.write("static const int _doc_data_class_path_count="+str(len(env.doc_class_path))+";\n")
+ g.write("struct _DocDataClassPath { const char* name; const char* path; };\n")
+
+ g.write("static const _DocDataClassPath _doc_data_class_paths["+str(len(env.doc_class_path)+1)+"]={\n");
+ for c in env.doc_class_path:
+ g.write("{\""+c+"\",\""+env.doc_class_path[c]+"\"},\n")
+ g.write("{NULL,NULL}\n")
+ g.write("};\n")
+
if (env["tools"] == "yes"):
# Register exporters
@@ -401,16 +411,15 @@ if (env["tools"] == "yes"):
f.close()
# API documentation
- docs = ["#doc/base/classes.xml"]
- moduledir = os.path.join(os.getcwd(), "..", "modules")
- for m in os.listdir(moduledir):
- curmodle = os.path.join(moduledir, m)
- docfile = os.path.join(curmodle, "classes.xml")
- if os.path.isdir(curmodle) and os.path.isfile(docfile):
- docs.append(docfile)
+ docs=[]
+ print("cdir is: "+env.Dir('#').abspath)
+ for f in os.listdir(os.path.join(env.Dir('#').abspath,"doc/classes")):
+ docs.append("#doc/classes/"+f)
+
+ _make_doc_data_class_path(os.path.join(env.Dir('#').abspath,"editor/doc"))
+
env.Depends("#editor/doc_data_compressed.gen.h", docs)
env.Command("#editor/doc_data_compressed.gen.h", docs, make_doc_header)
-
# Certificates
env.Depends("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt")
env.Command("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt", make_certs_header)
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 702adf0c68..40493c1de3 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -1038,7 +1038,7 @@ void AnimationKeyEditor::_track_pos_draw() {
//draw position
int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
pixel += name_limit;
- track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("highlight_color", "Editor"));
+ track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("accent_color", "Editor"));
}
}
@@ -1092,12 +1092,16 @@ void AnimationKeyEditor::_track_editor_draw() {
int sep = get_constant("vseparation", "Tree");
int hsep = get_constant("hseparation", "Tree");
Color color = get_color("font_color", "Tree");
- Color sepcolor = Color(1, 1, 1, 0.2);
- Color timecolor = Color(1, 1, 1, 0.2);
- Color hover_color = Color(1, 1, 1, 0.05);
- Color select_color = Color(1, 1, 1, 0.1);
+ Color sepcolor = color;
+ sepcolor.a = 0.2;
+ Color timecolor = color;
+ timecolor.a = 0.2;
+ Color hover_color = color;
+ hover_color.a = 0.05;
+ Color select_color = color;
+ select_color.a = 0.1;
Color invalid_path_color = get_color("error_color", "Editor");
- Color track_select_color = get_color("highlight_color", "Editor");
+ Color track_select_color = get_color("accent", "Editor");
Ref<Texture> remove_icon = get_icon("Remove", "EditorIcons");
Ref<Texture> move_up_icon = get_icon("MoveUp", "EditorIcons");
@@ -1157,7 +1161,8 @@ void AnimationKeyEditor::_track_editor_draw() {
int settings_limit = size.width - right_separator_ofs;
int name_limit = settings_limit * name_column_ratio;
- Color linecolor = Color(1, 1, 1, 0.2);
+ Color linecolor = color;
+ linecolor.a = 0.2;
te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), linecolor);
te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), linecolor);
te->draw_texture(hsize_icon, ofs + Point2(name_limit - hsize_icon->get_width() - hsep, (h - hsize_icon->get_height()) / 2));
@@ -1482,7 +1487,7 @@ void AnimationKeyEditor::_track_editor_draw() {
switch (click.click) {
case ClickOver::CLICK_SELECT_KEYS: {
- Color box_color = get_color("highlight_color", "Editor");
+ Color box_color = get_color("accent_color", "Editor");
box_color.a = 0.35;
te->draw_rect(Rect2(click.at, click.to - click.at), box_color);
@@ -2890,15 +2895,9 @@ void AnimationKeyEditor::_notification(int p_what) {
key_editor->edit(key_edit);
- zoomicon->set_texture(get_icon("Zoom", "EditorIcons"));
zoomicon->set_custom_minimum_size(Size2(24 * EDSCALE, 0));
zoomicon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
- menu_add_track->set_icon(get_icon("Add", "EditorIcons"));
- menu_add_track->get_popup()->add_icon_item(get_icon("KeyValue", "EditorIcons"), "Add Normal Track", ADD_TRACK_MENU_ADD_VALUE_TRACK);
- menu_add_track->get_popup()->add_icon_item(get_icon("KeyXform", "EditorIcons"), "Add Transform Track", ADD_TRACK_MENU_ADD_TRANSFORM_TRACK);
- menu_add_track->get_popup()->add_icon_item(get_icon("KeyCall", "EditorIcons"), "Add Call Func Track", ADD_TRACK_MENU_ADD_CALL_TRACK);
-
menu_track->set_icon(get_icon("Tools", "EditorIcons"));
menu_track->get_popup()->add_item(TTR("Scale Selection"), TRACK_MENU_SCALE);
menu_track->get_popup()->add_item(TTR("Scale From Cursor"), TRACK_MENU_SCALE_PIVOT);
@@ -2921,18 +2920,10 @@ void AnimationKeyEditor::_notification(int p_what) {
optimize_dialog->connect("confirmed", this, "_animation_optimize");
menu_track->get_popup()->add_child(tpp);
- //menu_track->get_popup()->add_submenu_item("Set Transitions..","Transitions");
- //menu_track->get_popup()->add_separator();
+
menu_track->get_popup()->add_item(TTR("Optimize Animation"), TRACK_MENU_OPTIMIZE);
menu_track->get_popup()->add_item(TTR("Clean-Up Animation"), TRACK_MENU_CLEAN_UP);
- curve_linear->set_icon(get_icon("CurveLinear", "EditorIcons"));
- curve_in->set_icon(get_icon("CurveIn", "EditorIcons"));
- curve_out->set_icon(get_icon("CurveOut", "EditorIcons"));
- curve_inout->set_icon(get_icon("CurveInOut", "EditorIcons"));
- curve_outin->set_icon(get_icon("CurveOutIn", "EditorIcons"));
- curve_constant->set_icon(get_icon("CurveConstant", "EditorIcons"));
-
curve_linear->connect("pressed", this, "_menu_track", varray(CURVE_SET_LINEAR));
curve_in->connect("pressed", this, "_menu_track", varray(CURVE_SET_IN));
curve_out->connect("pressed", this, "_menu_track", varray(CURVE_SET_OUT));
@@ -2940,17 +2931,39 @@ void AnimationKeyEditor::_notification(int p_what) {
curve_outin->connect("pressed", this, "_menu_track", varray(CURVE_SET_OUTIN));
curve_constant->connect("pressed", this, "_menu_track", varray(CURVE_SET_CONSTANT));
+ edit_button->connect("pressed", this, "_toggle_edit_curves");
+
+ curve_edit->connect("transition_changed", this, "_curve_transition_changed");
+ call_select->connect("selected", this, "_add_call_track");
+
+ _update_menu();
+
+ } break;
+
+ case NOTIFICATION_THEME_CHANGED: {
+ zoomicon->set_texture(get_icon("Zoom", "EditorIcons"));
+
+ menu_add_track->set_icon(get_icon("Add", "EditorIcons"));
+
+ menu_track->set_icon(get_icon("Tools", "EditorIcons"));
+
+ menu_add_track->get_popup()->set_item_icon(ADD_TRACK_MENU_ADD_VALUE_TRACK, get_icon("KeyValue", "EditorIcons"));
+ menu_add_track->get_popup()->set_item_icon(ADD_TRACK_MENU_ADD_TRANSFORM_TRACK, get_icon("KeyXform", "EditorIcons"));
+ menu_add_track->get_popup()->set_item_icon(ADD_TRACK_MENU_ADD_CALL_TRACK, get_icon("KeyCall", "EditorIcons"));
+
+ curve_linear->set_icon(get_icon("CurveLinear", "EditorIcons"));
+ curve_in->set_icon(get_icon("CurveIn", "EditorIcons"));
+ curve_out->set_icon(get_icon("CurveOut", "EditorIcons"));
+ curve_inout->set_icon(get_icon("CurveInOut", "EditorIcons"));
+ curve_outin->set_icon(get_icon("CurveOutIn", "EditorIcons"));
+ curve_constant->set_icon(get_icon("CurveConstant", "EditorIcons"));
+
move_up_button->set_icon(get_icon("MoveUp", "EditorIcons"));
move_down_button->set_icon(get_icon("MoveDown", "EditorIcons"));
remove_button->set_icon(get_icon("Remove", "EditorIcons"));
edit_button->set_icon(get_icon("EditKey", "EditorIcons"));
- edit_button->connect("pressed", this, "_toggle_edit_curves");
loop->set_icon(get_icon("Loop", "EditorIcons"));
- curve_edit->connect("transition_changed", this, "_curve_transition_changed");
-
- //edit_button->add_color_override("font_color",get_color("font_color","Tree"));
- //edit_button->add_color_override("font_color_hover",get_color("font_color","Tree"));
{
@@ -2976,24 +2989,8 @@ void AnimationKeyEditor::_notification(int p_what) {
get_icon("InterpWrapClamp", "EditorIcons"),
get_icon("InterpWrapLoop", "EditorIcons"),
};
-
- //right_data_size_cache = remove_icon->get_width() + move_up_icon->get_width() + move_down_icon->get_width() + down_icon->get_width() *2 + interp_icon[0]->get_width() + cont_icon[0]->get_width() + add_key_icon->get_width() + hsep*11;
right_data_size_cache = down_icon->get_width() * 3 + add_key_icon->get_width() + interp_icon[0]->get_width() + cont_icon[0]->get_width() + wrap_icon[0]->get_width() + hsep * 8;
}
- call_select->connect("selected", this, "_add_call_track");
- //rename_anim->set_icon( get_icon("Rename","EditorIcons") );
- /*
- edit_anim->set_icon( get_icon("Edit","EditorIcons") );
- blend_anim->set_icon( get_icon("Blend","EditorIcons") );
- play->set_icon( get_icon("Play","EditorIcons") );
- stop->set_icon( get_icon("Stop","EditorIcons") );
- pause->set_icon( get_icon("Pause","EditorIcons") );
-*/
- //menu->set_icon(get_icon("Animation","EditorIcons"));
- //play->set_icon(get_icon("AnimationPlay","EditorIcons"));
- //menu->set_icon(get_icon("Animation","EditorIcons"));
- _update_menu();
-
} break;
}
}
@@ -3816,6 +3813,9 @@ AnimationKeyEditor::AnimationKeyEditor() {
hb->add_child(menu_add_track);
menu_add_track->get_popup()->connect("id_pressed", this, "_menu_add_track");
menu_add_track->set_tooltip(TTR("Add new tracks."));
+ menu_add_track->get_popup()->add_icon_item(get_icon("KeyValue", "EditorIcons"), "Add Normal Track", ADD_TRACK_MENU_ADD_VALUE_TRACK);
+ menu_add_track->get_popup()->add_icon_item(get_icon("KeyXform", "EditorIcons"), "Add Transform Track", ADD_TRACK_MENU_ADD_TRANSFORM_TRACK);
+ menu_add_track->get_popup()->add_icon_item(get_icon("KeyCall", "EditorIcons"), "Add Call Func Track", ADD_TRACK_MENU_ADD_CALL_TRACK);
move_up_button = memnew(ToolButton);
hb->add_child(move_up_button);
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 344cb87aa6..9797a2e9f5 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -54,12 +54,7 @@ void CreateDialog::popup_create(bool p_dontclear) {
TreeItem *ti = recent->create_item(root);
ti->set_text(0, l);
- if (has_icon(l, "EditorIcons")) {
-
- ti->set_icon(0, get_icon(l, "EditorIcons"));
- } else {
- ti->set_icon(0, get_icon("Object", "EditorIcons"));
- }
+ ti->set_icon(0, _get_editor_icon(l));
}
}
@@ -122,6 +117,29 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
}
}
+Ref<Texture> CreateDialog::_get_editor_icon(const String &p_type) const {
+
+ if (has_icon(p_type, "EditorIcons")) {
+ return get_icon(p_type, "EditorIcons");
+ }
+
+ const Map<String, Vector<EditorData::CustomType> > &p_map = EditorNode::get_editor_data().get_custom_types();
+ for (const Map<String, Vector<EditorData::CustomType> >::Element *E = p_map.front(); E; E = E->next()) {
+ const Vector<EditorData::CustomType> &ct = E->value();
+ for (int i = 0; i < ct.size(); ++i) {
+ if (ct[i].name == p_type) {
+ if (ct[i].icon.is_valid()) {
+ return ct[i].icon;
+ } else {
+ return get_icon("Object", "EditorIcons");
+ }
+ }
+ }
+ }
+
+ return get_icon("Object", "EditorIcons");
+}
+
void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem *p_root, TreeItem **to_select) {
if (p_types.has(p_type))
@@ -457,13 +475,7 @@ void CreateDialog::_update_favorite_list() {
TreeItem *ti = favorites->create_item(root);
String l = favorite_list[i];
ti->set_text(0, l);
-
- if (has_icon(l, "EditorIcons")) {
-
- ti->set_icon(0, get_icon(l, "EditorIcons"));
- } else {
- ti->set_icon(0, get_icon("Object", "EditorIcons"));
- }
+ ti->set_icon(0, _get_editor_icon(l));
}
}
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 31f106ea22..a523539ba0 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -74,6 +74,8 @@ class CreateDialog : public ConfirmationDialog {
void _confirmed();
void _text_changed(const String &p_newtext);
+ Ref<Texture> _get_editor_icon(const String &p_type) const;
+
void add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem *p_root, TreeItem **to_select);
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 890c3d8091..54bf31cd62 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -489,6 +489,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
vb->add_margin_child(TTR("Scene failed to load due to missing dependencies:"), files, true);
files->set_v_size_flags(SIZE_EXPAND_FILL);
get_ok()->set_text(TTR("Open Anyway"));
+ get_cancel()->set_text(TTR("Done"));
text = memnew(Label);
vb->add_child(text);
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 6848c43b68..d35dc53ae1 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -32,6 +32,7 @@
#include "global_constants.h"
#include "io/compression.h"
#include "io/marshalls.h"
+#include "os/dir_access.h"
#include "project_settings.h"
#include "scene/resources/theme.h"
#include "script_language.h"
@@ -50,6 +51,8 @@ void DocData::merge_from(const DocData &p_data) {
c.description = cf.description;
c.brief_description = cf.brief_description;
+ c.tutorials = cf.tutorials;
+ c.demos = cf.demos;
for (int i = 0; i < c.methods.size(); i++) {
@@ -167,6 +170,8 @@ static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const Property
if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_method.return_enum = p_retinfo.class_name;
+ if (p_method.return_enum.begins_with("_")) //proxy class
+ p_method.return_enum = p_method.return_enum.substr(1, p_method.return_enum.length());
p_method.return_type = "int";
} else if (p_retinfo.class_name != StringName()) {
p_method.return_type = p_retinfo.class_name;
@@ -187,6 +192,8 @@ static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const Pr
if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_argument.enumeration = p_arginfo.class_name;
+ if (p_argument.enumeration.begins_with("_")) //proxy class
+ p_argument.enumeration = p_argument.enumeration.substr(1, p_argument.enumeration.length());
p_argument.type = "int";
} else if (p_arginfo.class_name != StringName()) {
p_argument.type = p_arginfo.class_name;
@@ -675,36 +682,72 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
return OK;
}
-Error DocData::load(const String &p_path) {
+Error DocData::load_classes(const String &p_dir) {
- Ref<XMLParser> parser = memnew(XMLParser);
- Error err = parser->open(p_path);
- if (err)
+ Error err;
+ DirAccessRef da = DirAccess::open(p_dir, &err);
+ if (!da) {
return err;
- return _load(parser);
-}
-Error DocData::_load(Ref<XMLParser> parser) {
+ }
- Error err = OK;
+ da->list_dir_begin();
+ String path;
+ bool isdir;
+ path = da->get_next(&isdir);
+ while (path != String()) {
+ if (!isdir && path.ends_with("xml")) {
+ Ref<XMLParser> parser = memnew(XMLParser);
+ Error err = parser->open(p_dir.plus_file(path));
+ if (err)
+ return err;
+
+ _load(parser);
+ }
+ path = da->get_next(&isdir);
+ }
- while ((err = parser->read()) == OK) {
+ da->list_dir_end();
- if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
+ return OK;
+}
+Error DocData::erase_classes(const String &p_dir) {
- if (parser->get_node_name() == "doc") {
- break;
- } else if (!parser->is_empty())
- parser->skip_section(); // unknown section, likely headers
+ Error err;
+ DirAccessRef da = DirAccess::open(p_dir, &err);
+ if (!da) {
+ return err;
+ }
+
+ List<String> to_erase;
+
+ da->list_dir_begin();
+ String path;
+ bool isdir;
+ path = da->get_next(&isdir);
+ while (path != String()) {
+ if (!isdir && path.ends_with("xml")) {
+ to_erase.push_back(path);
}
+ path = da->get_next(&isdir);
+ }
+ da->list_dir_end();
+
+ while (to_erase.size()) {
+ da->remove(to_erase.front()->get());
+ to_erase.pop_front();
}
- if (parser->has_attribute("version"))
- version = parser->get_attribute_value("version");
+ return OK;
+}
+Error DocData::_load(Ref<XMLParser> parser) {
+
+ Error err = OK;
while ((err = parser->read()) == OK) {
- if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "doc")
- break; //end of <doc>
+ if (parser->get_node_type() == XMLParser::NODE_ELEMENT && parser->get_node_name() == "?xml") {
+ parser->skip_section();
+ }
if (parser->get_node_type() != XMLParser::NODE_ELEMENT)
continue; //no idea what this may be, but skipping anyway
@@ -739,6 +782,14 @@ Error DocData::_load(Ref<XMLParser> parser) {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
c.description = parser->get_node_data().strip_edges();
+ } else if (name == "tutorials") {
+ parser->read();
+ if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ c.tutorials = parser->get_node_data().strip_edges();
+ } else if (name == "demos") {
+ parser->read();
+ if (parser->get_node_type() == XMLParser::NODE_TEXT)
+ c.demos = parser->get_node_data().strip_edges();
} else if (name == "methods") {
Error err = _parse_methods(parser, c.methods);
@@ -768,8 +819,6 @@ Error DocData::_load(Ref<XMLParser> parser) {
prop.setter = parser->get_attribute_value("setter");
if (parser->has_attribute("getter"))
prop.getter = parser->get_attribute_value("getter");
- if (parser->has_attribute("brief"))
- prop.brief_description = parser->get_attribute_value("brief").xml_unescape();
if (parser->has_attribute("enum"))
prop.enumeration = parser->get_attribute_value("enum");
parser->read();
@@ -867,23 +916,29 @@ static void _write_string(FileAccess *f, int p_tablevel, const String &p_string)
f->store_string(tab + p_string + "\n");
}
-Error DocData::save(const String &p_path) {
+Error DocData::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) {
- Error err;
- FileAccess *f = FileAccess::open(p_path, FileAccess::WRITE, &err);
+ for (Map<String, ClassDoc>::Element *E = class_list.front(); E; E = E->next()) {
- if (err) {
- ERR_EXPLAIN("Can't write doc file: " + p_path);
+ ClassDoc &c = E->get();
- ERR_FAIL_V(err);
- }
+ String save_path;
+ if (p_class_path.has(c.name)) {
+ save_path = p_class_path[c.name];
+ } else {
+ save_path = p_default_path;
+ }
- _write_string(f, 0, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
- _write_string(f, 0, "<doc version=\"" + String(VERSION_MKSTRING) + "\" name=\"Engine Types\">");
+ Error err;
+ String save_file = save_path.plus_file(c.name + ".xml");
+ FileAccessRef f = FileAccess::open(save_file, FileAccess::WRITE, &err);
+ if (err) {
+ ERR_EXPLAIN("Can't write doc file: " + save_file);
- for (Map<String, ClassDoc>::Element *E = class_list.front(); E; E = E->next()) {
+ ERR_FAIL_V(err);
+ }
- ClassDoc &c = E->get();
+ _write_string(f, 0, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
String header = "<class name=\"" + c.name + "\"";
if (c.inherits != "")
@@ -893,6 +948,7 @@ Error DocData::save(const String &p_path) {
if (c.category == "")
category = "Core";
header += " category=\"" + category + "\"";
+ header += " version=\"" + String(VERSION_MKSTRING) + "\"";
header += ">";
_write_string(f, 0, header);
_write_string(f, 1, "<brief_description>");
@@ -903,6 +959,14 @@ Error DocData::save(const String &p_path) {
if (c.description != "")
_write_string(f, 2, c.description.xml_escape());
_write_string(f, 1, "</description>");
+ _write_string(f, 1, "<tutorials>");
+ if (c.tutorials != "")
+ _write_string(f, 2, c.tutorials.xml_escape());
+ _write_string(f, 1, "</tutorials>");
+ _write_string(f, 1, "<demos>");
+ if (c.demos != "")
+ _write_string(f, 2, c.demos.xml_escape());
+ _write_string(f, 1, "</demos>");
_write_string(f, 1, "<methods>");
c.methods.sort();
@@ -966,7 +1030,7 @@ Error DocData::save(const String &p_path) {
enum_text = " enum=\"" + c.properties[i].enumeration + "\"";
}
PropertyDoc &p = c.properties[i];
- _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\" brief=\"" + p.brief_description.xml_escape(true) + "\"" + enum_text + ">");
+ _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\"" + enum_text + ">");
if (p.description != "")
_write_string(f, 3, p.description.xml_escape());
_write_string(f, 2, "</member>");
@@ -1035,10 +1099,6 @@ Error DocData::save(const String &p_path) {
_write_string(f, 0, "</class>");
}
- _write_string(f, 0, "</doc>");
- f->close();
- memdelete(f);
-
return OK;
}
diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h
index efb4ea3040..68d30d8237 100644
--- a/editor/doc/doc_data.h
+++ b/editor/doc/doc_data.h
@@ -70,7 +70,6 @@ public:
String name;
String type;
String enumeration;
- String brief_description;
String description;
String setter, getter;
bool operator<(const PropertyDoc &p_prop) const {
@@ -85,6 +84,8 @@ public:
String category;
String brief_description;
String description;
+ String tutorials;
+ String demos;
Vector<MethodDoc> methods;
Vector<MethodDoc> signals;
Vector<ConstantDoc> constants;
@@ -101,8 +102,9 @@ public:
void merge_from(const DocData &p_data);
void remove_from(const DocData &p_data);
void generate(bool p_basic_types = false);
- Error load(const String &p_path);
- Error save(const String &p_path);
+ Error load_classes(const String &p_dir);
+ static Error erase_classes(const String &p_dir);
+ Error save_classes(const String &p_default_path, const Map<String, String> &p_class_path);
Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size);
};
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 6937f74316..a36faeb0de 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -39,10 +39,13 @@ void EditorAudioBus::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- vu_l->set_under_texture(get_icon("BusVuEmpty", "EditorIcons"));
- vu_l->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
- vu_r->set_under_texture(get_icon("BusVuEmpty", "EditorIcons"));
- vu_r->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
+ for (int i = 0; i < cc; i++) {
+ channel[i].vu_l->set_under_texture(get_icon("BusVuEmpty", "EditorIcons"));
+ channel[i].vu_l->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
+ channel[i].vu_r->set_under_texture(get_icon("BusVuEmpty", "EditorIcons"));
+ channel[i].vu_r->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
+ channel[i].prev_active = true;
+ }
scale->set_texture(get_icon("BusVuDb", "EditorIcons"));
disabled_vu = get_icon("BusVuFrozen", "EditorIcons");
@@ -53,7 +56,6 @@ void EditorAudioBus::_notification(int p_what) {
bus_options->set_icon(get_icon("GuiMiniTabMenu", "EditorIcons"));
- prev_active = true;
update_bus();
set_process(true);
}
@@ -67,60 +69,52 @@ void EditorAudioBus::_notification(int p_what) {
if (p_what == NOTIFICATION_PROCESS) {
- float real_peak[2] = { -100, -100 };
- bool activity_found = false;
-
- int cc = 0;
- switch (AudioServer::get_singleton()->get_speaker_mode()) {
- case AudioServer::SPEAKER_MODE_STEREO: cc = 1; break;
- case AudioServer::SPEAKER_SURROUND_51: cc = 4; break;
- case AudioServer::SPEAKER_SURROUND_71: cc = 5; break;
- default:
- ERR_PRINT("Unknown speaker_mode");
- break;
- }
-
for (int i = 0; i < cc; i++) {
+ float real_peak[2] = { -100, -100 };
+ bool activity_found = false;
+
if (AudioServer::get_singleton()->is_bus_channel_active(get_index(), i)) {
activity_found = true;
real_peak[0] = MAX(real_peak[0], AudioServer::get_singleton()->get_bus_peak_volume_left_db(get_index(), i));
real_peak[1] = MAX(real_peak[1], AudioServer::get_singleton()->get_bus_peak_volume_right_db(get_index(), i));
}
- }
- if (real_peak[0] > peak_l) {
- peak_l = real_peak[0];
- } else {
- peak_l -= get_process_delta_time() * 60.0;
- }
-
- if (real_peak[1] > peak_r) {
- peak_r = real_peak[1];
- } else {
- peak_r -= get_process_delta_time() * 60.0;
- }
-
- vu_l->set_value(peak_l);
- vu_r->set_value(peak_r);
+ if (real_peak[0] > channel[i].peak_l) {
+ channel[i].peak_l = real_peak[0];
+ } else {
+ channel[i].peak_l -= get_process_delta_time() * 60.0;
+ }
- if (activity_found != prev_active) {
- if (activity_found) {
- vu_l->set_over_texture(Ref<Texture>());
- vu_r->set_over_texture(Ref<Texture>());
+ if (real_peak[1] > channel[i].peak_r) {
+ channel[i].peak_r = real_peak[1];
} else {
- vu_l->set_over_texture(disabled_vu);
- vu_r->set_over_texture(disabled_vu);
+ channel[i].peak_r -= get_process_delta_time() * 60.0;
}
- prev_active = activity_found;
+ channel[i].vu_l->set_value(channel[i].peak_l);
+ channel[i].vu_r->set_value(channel[i].peak_r);
+
+ if (activity_found != channel[i].prev_active) {
+ if (activity_found) {
+ channel[i].vu_l->set_over_texture(Ref<Texture>());
+ channel[i].vu_r->set_over_texture(Ref<Texture>());
+ } else {
+ channel[i].vu_l->set_over_texture(disabled_vu);
+ channel[i].vu_r->set_over_texture(disabled_vu);
+ }
+
+ channel[i].prev_active = activity_found;
+ }
}
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- peak_l = -100;
- peak_r = -100;
- prev_active = true;
+ for (int i = 0; i < 4; i++) {
+ channel[i].peak_l = -100;
+ channel[i].peak_r = -100;
+ channel[i].prev_active = true;
+ }
set_process(is_visible_in_tree());
}
@@ -414,7 +408,10 @@ void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
void EditorAudioBus::_bus_popup_pressed(int p_option) {
- if (p_option == 1) {
+ if (p_option == 2) {
+ // Reset volume
+ emit_signal("vol_reset_request");
+ } else if (p_option == 1) {
emit_signal("delete_request");
} else if (p_option == 0) {
//duplicate
@@ -617,6 +614,7 @@ void EditorAudioBus::_bind_methods() {
ADD_SIGNAL(MethodInfo("duplicate_request"));
ADD_SIGNAL(MethodInfo("delete_request"));
+ ADD_SIGNAL(MethodInfo("vol_reset_request"));
ADD_SIGNAL(MethodInfo("drop_end_request"));
ADD_SIGNAL(MethodInfo("dropped"));
}
@@ -679,19 +677,24 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) {
slider->connect("value_changed", this, "_volume_db_changed");
hb->add_child(slider);
- vu_l = memnew(TextureProgress);
- vu_l->set_fill_mode(TextureProgress::FILL_BOTTOM_TO_TOP);
- hb->add_child(vu_l);
- vu_l->set_min(-80);
- vu_l->set_max(24);
- vu_l->set_step(0.1);
-
- vu_r = memnew(TextureProgress);
- vu_r->set_fill_mode(TextureProgress::FILL_BOTTOM_TO_TOP);
- hb->add_child(vu_r);
- vu_r->set_min(-80);
- vu_r->set_max(24);
- vu_r->set_step(0.1);
+
+ cc = AudioServer::get_singleton()->get_channel_count();
+
+ for (int i = 0; i < cc; i++) {
+ channel[i].vu_l = memnew(TextureProgress);
+ channel[i].vu_l->set_fill_mode(TextureProgress::FILL_BOTTOM_TO_TOP);
+ hb->add_child(channel[i].vu_l);
+ channel[i].vu_l->set_min(-80);
+ channel[i].vu_l->set_max(24);
+ channel[i].vu_l->set_step(0.1);
+
+ channel[i].vu_r = memnew(TextureProgress);
+ channel[i].vu_r->set_fill_mode(TextureProgress::FILL_BOTTOM_TO_TOP);
+ hb->add_child(channel[i].vu_r);
+ channel[i].vu_r->set_min(-80);
+ channel[i].vu_r->set_max(24);
+ channel[i].vu_r->set_step(0.1);
+ }
scale = memnew(TextureRect);
hb->add_child(scale);
@@ -742,6 +745,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) {
bus_popup = bus_options->get_popup();
bus_popup->add_item(TTR("Duplicate"));
bus_popup->add_item(TTR("Delete"));
+ bus_popup->add_item(TTR("Reset Volume"));
bus_popup->connect("index_pressed", this, "_bus_popup_pressed");
delete_effect_popup = memnew(PopupMenu);
@@ -790,6 +794,7 @@ void EditorAudioBuses::_update_buses() {
bus_hb->add_child(audio_bus);
audio_bus->connect("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED);
audio_bus->connect("duplicate_request", this, "_duplicate_bus", varray(), CONNECT_DEFERRED);
+ audio_bus->connect("vol_reset_request", this, "_reset_bus_volume", varray(audio_bus), CONNECT_DEFERRED);
audio_bus->connect("drop_end_request", this, "_request_drop_end");
audio_bus->connect("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED);
}
@@ -919,6 +924,20 @@ void EditorAudioBuses::_duplicate_bus(int p_which) {
ur->commit_action();
}
+void EditorAudioBuses::_reset_bus_volume(Object *p_which) {
+
+ EditorAudioBus *bus = Object::cast_to<EditorAudioBus>(p_which);
+ int index = bus->get_index();
+
+ UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Reset Bus Volume"));
+ ur->add_do_method(AudioServer::get_singleton(), "set_bus_volume_db", index, 0.f);
+ ur->add_undo_method(AudioServer::get_singleton(), "set_bus_volume_db", index, AudioServer::get_singleton()->get_bus_volume_db(index));
+ ur->add_do_method(this, "_update_buses");
+ ur->add_undo_method(this, "_update_buses");
+ ur->commit_action();
+}
+
void EditorAudioBuses::_request_drop_end() {
if (!drop_end && bus_hb->get_child_count()) {
@@ -1063,6 +1082,7 @@ void EditorAudioBuses::_bind_methods() {
ClassDB::bind_method("_load_default_layout", &EditorAudioBuses::_load_default_layout);
ClassDB::bind_method("_new_layout", &EditorAudioBuses::_new_layout);
ClassDB::bind_method("_duplicate_bus", &EditorAudioBuses::_duplicate_bus);
+ ClassDB::bind_method("_reset_bus_volume", &EditorAudioBuses::_reset_bus_volume);
ClassDB::bind_method("_file_dialog_callback", &EditorAudioBuses::_file_dialog_callback);
}
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index e04ba7b89d..dba1b73295 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -52,16 +52,23 @@ class EditorAudioBus : public PanelContainer {
GDCLASS(EditorAudioBus, PanelContainer)
- bool prev_active;
- float peak_l;
- float peak_r;
-
Ref<Texture> disabled_vu;
LineEdit *track_name;
MenuButton *bus_options;
VSlider *slider;
- TextureProgress *vu_l;
- TextureProgress *vu_r;
+
+ int cc;
+
+ struct {
+ bool prev_active;
+
+ float peak_l;
+ float peak_r;
+
+ TextureProgress *vu_l;
+ TextureProgress *vu_r;
+ } channel[4];
+
TextureRect *scale;
OptionButton *send;
@@ -158,6 +165,7 @@ class EditorAudioBuses : public VBoxContainer {
void _delete_bus(Object *p_which);
void _duplicate_bus(int p_which);
+ void _reset_bus_volume(Object *p_which);
void _request_drop_end();
void _drop_at_index(int p_bus, int p_index);
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index cfb3abfd1d..658c12d4d0 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -64,7 +64,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p
}
}
-void EditorDirDialog::reload(const String &p_with_path) {
+void EditorDirDialog::reload(const String &p_path) {
if (!is_visible_in_tree()) {
must_reload = true;
@@ -73,7 +73,7 @@ void EditorDirDialog::reload(const String &p_with_path) {
tree->clear();
TreeItem *root = tree->create_item();
- _update_dir(root, EditorFileSystem::get_singleton()->get_filesystem(), p_with_path);
+ _update_dir(root, EditorFileSystem::get_singleton()->get_filesystem(), p_path);
_item_collapsed(root);
must_reload = false;
}
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 915fb7e5db..ad9bc4a662 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -476,19 +476,77 @@ void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &
memdelete(da);
}
-Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, EditorExportSaveFunction p_func, void *p_udata) {
+void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
+
+ ExtraFile ef;
+ ef.data = p_file;
+ ef.path = p_path;
+ ef.remap = p_remap;
+ extra_files.push_back(ef);
+}
+
+void EditorExportPlugin::add_shared_object(const String &p_path) {
+
+ shared_objects.push_back(p_path);
+}
+
+void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features) {
+
+ if (get_script_instance()) {
+ get_script_instance()->call("_export_file", p_path, p_type, p_features);
+ }
+}
+
+void EditorExportPlugin::_export_begin_script(const PoolVector<String> &p_features) {
+
+ if (get_script_instance()) {
+ get_script_instance()->call("_export_begin", p_features);
+ }
+}
+
+void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
+}
+
+void EditorExportPlugin::_export_begin(const Set<String> &p_features) {
+}
+
+void EditorExportPlugin::skip() {
+
+ skipped = true;
+}
+
+void EditorExportPlugin::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("add_shared_object", "path"), &EditorExportPlugin::add_shared_object);
+ ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
+ ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
+
+ BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::POOL_STRING_ARRAY, "features")));
+ BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::POOL_STRING_ARRAY, "features")));
+}
+
+EditorExportPlugin::EditorExportPlugin() {
+ skipped = false;
+}
+
+Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func) {
Ref<EditorExportPlatform> platform = p_preset->get_platform();
List<String> feature_list;
platform->get_preset_features(p_preset, &feature_list);
//figure out features
Set<String> features;
+ PoolVector<String> features_pv;
for (List<String>::Element *E = feature_list.front(); E; E = E->next()) {
features.insert(E->get());
+ features_pv.push_back(E->get());
}
+ Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins();
+
//figure out paths of files that will be exported
Set<String> paths;
+ Vector<String> path_remaps;
if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) {
//find stuff
@@ -508,6 +566,25 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
_edit_filter_list(paths, p_preset->get_include_filter(), false);
_edit_filter_list(paths, p_preset->get_exclude_filter(), true);
+ //initial export plugin callback
+ for (int i = 0; i < export_plugins.size(); i++) {
+ if (export_plugins[i]->get_script_instance()) { //script based
+ export_plugins[i]->_export_begin_script(features_pv);
+ } else {
+ export_plugins[i]->_export_begin(features);
+ }
+ if (p_so_func) {
+ for (int j = 0; j < export_plugins[i]->shared_objects.size(); j++) {
+ p_so_func(p_udata, export_plugins[i]->shared_objects[j]);
+ }
+ }
+ for (int j = 0; j < export_plugins[i]->extra_files.size(); j++) {
+ p_func(p_udata, export_plugins[i]->extra_files[j].path, export_plugins[i]->extra_files[j].data, 0, paths.size());
+ }
+
+ export_plugins[i]->_clear();
+ }
+
//store everything in the export medium
int idx = 0;
int total = paths.size();
@@ -515,6 +592,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
String path = E->get();
+ String type = ResourceLoader::get_resource_type(path);
if (FileAccess::exists(path + ".import")) {
//file is imported, replace by what it imports
@@ -551,9 +629,42 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
p_func(p_udata, path + ".import", array, idx, total);
} else {
+
+ bool do_export = true;
+ for (int i = 0; i < export_plugins.size(); i++) {
+ if (export_plugins[i]->get_script_instance()) { //script based
+ export_plugins[i]->_export_file_script(path, type, features_pv);
+ } else {
+ export_plugins[i]->_export_file(path, type, features);
+ }
+ if (p_so_func) {
+ for (int j = 0; j < export_plugins[i]->shared_objects.size(); j++) {
+ p_so_func(p_udata, export_plugins[i]->shared_objects[j]);
+ }
+ }
+
+ for (int j = 0; j < export_plugins[i]->extra_files.size(); j++) {
+ p_func(p_udata, export_plugins[i]->extra_files[j].path, export_plugins[i]->extra_files[j].data, idx, total);
+ if (export_plugins[i]->extra_files[j].remap) {
+ do_export = false; //if remap, do not
+ path_remaps.push_back(path);
+ path_remaps.push_back(export_plugins[i]->extra_files[j].path);
+ }
+ }
+
+ if (export_plugins[i]->skipped) {
+ do_export = false;
+ }
+ export_plugins[i]->_clear();
+
+ if (!do_export)
+ break; //apologies, not exporting
+ }
//just store it as it comes
- Vector<uint8_t> array = FileAccess::get_file_as_array(path);
- p_func(p_udata, path, array, idx, total);
+ if (do_export) {
+ Vector<uint8_t> array = FileAccess::get_file_as_array(path);
+ p_func(p_udata, path, array, idx, total);
+ }
}
idx++;
@@ -575,9 +686,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
}
+ ProjectSettings::CustomMap custom_map;
+ if (path_remaps.size()) {
+ custom_map["path_remap/remapped_paths"] = path_remaps;
+ }
+
String config_file = "project.binary";
String engine_cfb = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmp" + config_file;
- ProjectSettings::get_singleton()->save_custom(engine_cfb, ProjectSettings::CustomMap(), custom_list);
+ ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);
Vector<uint8_t> data = FileAccess::get_file_as_array(engine_cfb);
p_func(p_udata, "res://" + config_file, data, idx, total);
@@ -697,6 +813,8 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co
zd.zip = zip;
Error err = export_project_files(p_preset, _save_zip_file, &zd);
+ if (err != OK)
+ ERR_PRINT("Failed to export project files");
zipClose(zip, NULL);
@@ -865,6 +983,23 @@ void EditorExport::remove_export_preset(int p_idx) {
export_presets.remove(p_idx);
}
+void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
+
+ if (export_plugins.find(p_plugin) == 1) {
+ export_plugins.push_back(p_plugin);
+ }
+}
+
+void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
+
+ export_plugins.erase(p_plugin);
+}
+
+Vector<Ref<EditorExportPlugin> > EditorExport::get_export_plugins() {
+
+ return export_plugins;
+}
+
void EditorExport::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -1111,9 +1246,13 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
}
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- da->copy(template_path, p_path);
+ Error err = da->copy(template_path, p_path, get_chmod_flags());
memdelete(da);
+ if (err != OK) {
+ return err;
+ }
+
String pck_path = p_path.get_basename() + ".pck";
return save_pack(p_preset, pck_path);
@@ -1167,5 +1306,17 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
}
}
+int EditorExportPlatformPC::get_chmod_flags() const {
+
+ return chmod_flags;
+}
+
+void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
+
+ chmod_flags = p_flags;
+}
+
EditorExportPlatformPC::EditorExportPlatformPC() {
+
+ chmod_flags = -1;
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 3b99c68c85..50379b9683 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -124,6 +124,7 @@ class EditorExportPlatform : public Reference {
public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total);
+ typedef Error (*EditorExportSaveSharedObject)(void *p_userdata, const String &p_path);
private:
struct SavedData {
@@ -189,7 +190,7 @@ public:
virtual String get_name() const = 0;
virtual Ref<Texture> get_logo() const = 0;
- Error export_project_files(const Ref<EditorExportPreset> &p_preset, EditorExportSaveFunction p_func, void *p_udata);
+ Error export_project_files(const Ref<EditorExportPreset> &p_preset, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func = NULL);
Error save_pack(const Ref<EditorExportPreset> &p_preset, const String &p_path);
Error save_zip(const Ref<EditorExportPreset> &p_preset, const String &p_path);
@@ -219,11 +220,49 @@ public:
EditorExportPlatform();
};
+class EditorExportPlugin : public Reference {
+ GDCLASS(EditorExportPlugin, Reference)
+
+ friend class EditorExportPlatform;
+
+ Vector<String> shared_objects;
+ struct ExtraFile {
+ String path;
+ Vector<uint8_t> data;
+ bool remap;
+ };
+ Vector<ExtraFile> extra_files;
+ bool skipped;
+
+ _FORCE_INLINE_ void _clear() {
+ shared_objects.clear();
+ extra_files.clear();
+ skipped = false;
+ }
+
+ void _export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features);
+ void _export_begin_script(const PoolVector<String> &p_features);
+
+protected:
+ void add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap);
+ void add_shared_object(const String &p_path);
+ void skip();
+
+ virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features);
+ virtual void _export_begin(const Set<String> &p_features);
+
+ static void _bind_methods();
+
+public:
+ EditorExportPlugin();
+};
+
class EditorExport : public Node {
GDCLASS(EditorExport, Node);
Vector<Ref<EditorExportPlatform> > export_platforms;
Vector<Ref<EditorExportPreset> > export_presets;
+ Vector<Ref<EditorExportPlugin> > export_plugins;
Timer *save_timer;
bool block_save;
@@ -251,6 +290,10 @@ public:
Ref<EditorExportPreset> get_export_preset(int p_idx);
void remove_export_preset(int p_idx);
+ void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
+ void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
+ Vector<Ref<EditorExportPlugin> > get_export_plugins();
+
void load_config();
bool poll_export_platforms();
@@ -276,6 +319,7 @@ class EditorExportPlatformPC : public EditorExportPlatform {
Set<String> extra_features;
bool use64;
+ int chmod_flags;
public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features);
@@ -304,6 +348,9 @@ public:
void add_platform_feature(const String &p_feature);
virtual void get_platform_features(List<String> *r_features);
+ int get_chmod_flags() const;
+ void set_chmod_flags(int p_flags);
+
EditorExportPlatformPC();
};
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index abcdc0b64c..288b923e87 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -107,8 +107,6 @@ void EditorFileDialog::_notification(int p_what) {
fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
fav_rm->set_icon(get_icon("RemoveSmall", "EditorIcons"));
- Theme::get_default()->clear_icon("ResizedFile", "EditorIcons");
- Theme::get_default()->clear_icon("ResizedFolder", "EditorIcons");
update_file_list();
}
}
@@ -506,30 +504,14 @@ void EditorFileDialog::update_file_list() {
item_list->set_max_text_lines(2);
item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
- if (!has_icon("ResizedFolder", "EditorIcons")) {
- Ref<ImageTexture> folder = get_icon("FolderBig", "EditorIcons");
- Ref<Image> img = folder->get_data();
- img = img->duplicate();
- img->resize(thumbnail_size, thumbnail_size);
- Ref<ImageTexture> resized_folder = Ref<ImageTexture>(memnew(ImageTexture));
- resized_folder->create_from_image(img, 0);
- Theme::get_default()->set_icon("ResizedFolder", "EditorIcons", resized_folder);
- }
-
- folder_thumbnail = get_icon("ResizedFolder", "EditorIcons");
-
- if (!has_icon("ResizedFile", "EditorIcons")) {
- Ref<ImageTexture> file = get_icon("FileBig", "EditorIcons");
- Ref<Image> img = file->get_data();
- img = img->duplicate();
- img->resize(thumbnail_size, thumbnail_size);
- Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
- resized_file->create_from_image(img, 0);
- Theme::get_default()->set_icon("ResizedFile", "EditorIcons", resized_file);
+ if (thumbnail_size < 64) {
+ folder_thumbnail = get_icon("FolderMediumThumb", "EditorIcons");
+ file_thumbnail = get_icon("FileMediumThumb", "EditorIcons");
+ } else {
+ folder_thumbnail = get_icon("FolderBigThumb", "EditorIcons");
+ file_thumbnail = get_icon("FileBigThumb", "EditorIcons");
}
- file_thumbnail = get_icon("ResizedFile", "EditorIcons");
-
preview_vb->hide();
} else {
@@ -1214,6 +1196,9 @@ void EditorFileDialog::_bind_methods() {
BIND_ENUM_CONSTANT(ACCESS_RESOURCES);
BIND_ENUM_CONSTANT(ACCESS_USERDATA);
BIND_ENUM_CONSTANT(ACCESS_FILESYSTEM);
+
+ BIND_ENUM_CONSTANT(DISPLAY_THUMBNAILS);
+ BIND_ENUM_CONSTANT(DISPLAY_LIST);
}
void EditorFileDialog::set_show_hidden_files(bool p_show) {
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 3ab3f05906..d806b825ba 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -73,13 +73,13 @@ static Ref<BitmapFont> make_font(int p_height, int p_ascent, int p_valign, int p
m_name->add_fallback(FontFallback);
// the custom spacings might only work with Noto Sans
-#define MAKE_DEFAULT_FONT(m_name, m_size) \
- Ref<DynamicFont> m_name; \
- m_name.instance(); \
- m_name->set_size(m_size); \
- m_name->set_font_data(DefaultFont); \
- m_name->set_spacing(DynamicFont::SPACING_TOP, -1); \
- m_name->set_spacing(DynamicFont::SPACING_BOTTOM, -1); \
+#define MAKE_DEFAULT_FONT(m_name, m_size) \
+ Ref<DynamicFont> m_name; \
+ m_name.instance(); \
+ m_name->set_size(m_size); \
+ m_name->set_font_data(DefaultFont); \
+ m_name->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE); \
+ m_name->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE); \
MAKE_FALLBACKS(m_name);
void editor_register_fonts(Ref<Theme> p_theme) {
@@ -119,7 +119,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<DynamicFontData> dfmono;
dfmono.instance();
- dfmono->set_font_ptr(_font_source_code_pro, _font_source_code_pro_size);
+ dfmono->set_font_ptr(_font_mononoki_Regular, _font_mononoki_Regular_size);
//dfd->set_force_autohinter(true); //just looks better..i think?
MAKE_DEFAULT_FONT(df, int(EditorSettings::get_singleton()->get("interface/font_size")) * EDSCALE);
@@ -147,7 +147,9 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<DynamicFont> df_doc_code;
df_doc_code.instance();
- df_doc_code->set_size(int(EDITOR_DEF("text_editor/help/help_source_font_size", 14)) * EDSCALE);
+ df_doc_code->set_size(int(EDITOR_DEF("text_editor/help/help_source_font_size", 18)) * EDSCALE);
+ df_doc_code->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE);
+ df_doc_code->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE);
df_doc_code->set_font_data(dfmono);
MAKE_FALLBACKS(df_doc_code);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 7fa2c53275..6c8bd0f14b 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -35,6 +35,8 @@
#include "editor_settings.h"
#include "os/keyboard.h"
+#define CONTRIBUTE_URL "http://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html"
+
void EditorHelpSearch::popup() {
popup_centered(Size2(700, 600) * EDSCALE);
@@ -575,6 +577,8 @@ void EditorHelp::_class_desc_select(const String &p_select) {
return;
class_desc->scroll_to_line(method_line[m]);
}
+ } else if (p_select.begins_with("http")) {
+ OS::get_singleton()->shell_open(p_select);
}
}
@@ -603,7 +607,9 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
t = p_enum.get_slice(".", 0);
}
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ const Color text_color = get_color("default_color", "RichTextLabel");
+ const Color type_color = get_color("accent_color", "Editor").linear_interpolate(text_color, 0.5);
+ class_desc->push_color(type_color);
if (can_ref) {
if (p_enum == "") {
class_desc->push_meta("#" + t); //class
@@ -638,23 +644,32 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->clear();
method_line.clear();
+ section_line.clear();
edited_class = p_class;
//edited_class->show();
- DocData::ClassDoc cd = doc->class_list[p_class]; //make a copy, so we can sort without worrying
+ // Colors
+ const Color title_color = get_color("accent_color", "Editor");
+ const Color text_color = get_color("font_color", "RichTextLabel");
+ const Color highlight_color = get_color("highlight_color", "RichTextLabel");
+ const Color base_type_color = title_color.linear_interpolate(text_color, 0.5);
+ const Color comment_color = Color(text_color.r, text_color.g, text_color.b, 0.6);
+ const Color symbol_color = comment_color;
+ const Color value_color = Color(text_color.r, text_color.g, text_color.b, 0.4);
+ const Color qualifier_color = Color(text_color.r, text_color.g, text_color.b, 0.8);
- Color h_color;
+ DocData::ClassDoc cd = doc->class_list[p_class]; //make a copy, so we can sort without worrying
Ref<Font> doc_font = get_font("doc", "EditorFonts");
Ref<Font> doc_title_font = get_font("doc_title", "EditorFonts");
Ref<Font> doc_code_font = get_font("doc_source", "EditorFonts");
+ String link_color_text = title_color.to_html(false);
- h_color = Color(1, 1, 1, 1);
-
+ section_line.push_back(Pair<String, int>(TTR("Top"), 0));
class_desc->push_font(doc_title_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->add_text(TTR("Class:") + " ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ class_desc->push_color(highlight_color);
_add_text(p_class);
class_desc->pop();
class_desc->pop();
@@ -663,7 +678,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.inherits != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Inherits:") + " ");
class_desc->pop();
@@ -697,7 +712,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (E->get().inherits == cd.name) {
if (!found) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Inherited by:") + " ");
class_desc->pop();
@@ -725,10 +740,11 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
class_desc->add_newline();
+ class_desc->add_newline();
if (cd.brief_description != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Brief Description:"));
class_desc->pop();
@@ -736,7 +752,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
//class_desc->add_newline();
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->push_font(doc_font);
class_desc->push_indent(1);
_add_text(cd.brief_description);
@@ -745,6 +761,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
class_desc->add_newline();
class_desc->add_newline();
+ class_desc->add_newline();
}
Set<String> skip_methods;
@@ -752,7 +769,8 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.properties.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Members"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Members:"));
class_desc->pop();
@@ -770,7 +788,6 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
_add_type(cd.properties[i].type, cd.properties[i].enumeration);
- class_desc->add_text(" ");
class_desc->pop();
class_desc->pop();
class_desc->pop();
@@ -795,23 +812,11 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
class_desc->push_font(doc_code_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(highlight_color);
_add_text(cd.properties[i].name);
if (describe) {
class_desc->pop();
- }
-
- if (cd.properties[i].brief_description != "") {
- class_desc->push_font(doc_font);
- class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
- _add_text(cd.properties[i].description);
- class_desc->pop();
- class_desc->pop();
- }
-
- if (describe) {
property_descr = true;
}
@@ -842,7 +847,8 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (sort_methods)
methods.sort();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Public Methods"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Public Methods:"));
class_desc->pop();
@@ -859,9 +865,9 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
bool is_vararg = methods[i].qualifiers.find("vararg") != -1;
- class_desc->push_cell();
-
method_line[methods[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
+
+ class_desc->push_cell();
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
_add_type(methods[i].return_type, methods[i].return_enum);
@@ -869,6 +875,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop(); //align
class_desc->pop(); //font
class_desc->pop(); //cell
+
class_desc->push_cell();
class_desc->push_font(doc_code_font);
@@ -876,16 +883,16 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
method_descr = true;
class_desc->push_meta("@" + methods[i].name);
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(highlight_color);
_add_text(methods[i].name);
class_desc->pop();
if (methods[i].description != "")
- class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->pop(); // pop meta
+ class_desc->push_color(symbol_color);
class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "(");
class_desc->pop();
for (int j = 0; j < methods[i].arguments.size(); j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
if (j > 0)
class_desc->add_text(", ");
_add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration);
@@ -893,7 +900,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
_add_text(methods[i].arguments[j].name);
if (methods[i].arguments[j].default_value != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text("=");
class_desc->pop();
_add_text(methods[i].arguments[j].default_value);
@@ -903,21 +910,21 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
if (is_vararg) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
if (methods[i].arguments.size())
class_desc->add_text(", ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text("...");
class_desc->pop();
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")");
class_desc->pop();
if (methods[i].qualifiers != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(qualifier_color);
class_desc->add_text(" ");
_add_text(methods[i].qualifiers);
class_desc->pop();
@@ -934,24 +941,35 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.theme_properties.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("GUI Theme Items"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("GUI Theme Items:"));
class_desc->pop();
class_desc->pop();
- class_desc->add_newline();
+ // class_desc->add_newline();
class_desc->push_indent(1);
+ class_desc->push_table(2);
+ class_desc->set_table_column_expand(1, 1);
//class_desc->add_newline();
for (int i = 0; i < cd.theme_properties.size(); i++) {
theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
+
+ class_desc->push_cell();
+ class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
_add_type(cd.theme_properties[i].type);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
- class_desc->add_text(" ");
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->pop();
+
+ class_desc->push_cell();
+ class_desc->push_font(doc_code_font);
+ class_desc->push_color(highlight_color);
_add_text(cd.theme_properties[i].name);
class_desc->pop();
class_desc->pop();
@@ -959,17 +977,18 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.theme_properties[i].description != "") {
class_desc->push_font(doc_font);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ class_desc->push_color(comment_color);
_add_text(cd.theme_properties[i].description);
class_desc->pop();
class_desc->pop();
}
-
- class_desc->add_newline();
+ class_desc->pop(); // cell
}
+ class_desc->pop(); // table
class_desc->pop();
class_desc->add_newline();
+ class_desc->add_newline();
}
if (cd.signals.size()) {
@@ -977,7 +996,9 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (sort_methods) {
cd.signals.sort();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+
+ section_line.push_back(Pair<String, int>(TTR("Signals"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Signals:"));
class_desc->pop();
@@ -994,14 +1015,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->push_font(doc_code_font); // monofont
//_add_type("void");
//class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(highlight_color);
_add_text(cd.signals[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(cd.signals[i].arguments.size() ? "( " : "(");
class_desc->pop();
for (int j = 0; j < cd.signals[i].arguments.size(); j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
if (j > 0)
class_desc->add_text(", ");
_add_type(cd.signals[i].arguments[j].type);
@@ -1009,7 +1030,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
_add_text(cd.signals[i].arguments[j].name);
if (cd.signals[i].arguments[j].default_value != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text("=");
class_desc->pop();
_add_text(cd.signals[i].arguments[j].default_value);
@@ -1018,13 +1039,13 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(cd.signals[i].arguments.size() ? " )" : ")");
class_desc->pop();
class_desc->pop(); // end monofont
if (cd.signals[i].description != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ class_desc->push_color(comment_color);
class_desc->add_text(" ");
_add_text(cd.signals[i].description);
class_desc->pop();
@@ -1057,7 +1078,8 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (enums.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Enumerations"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Enumerations:"));
class_desc->pop();
@@ -1071,7 +1093,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
enum_line[E->key()] = class_desc->get_line_count() - 2;
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->add_text(TTR("enum "));
class_desc->pop();
class_desc->push_font(doc_code_font);
@@ -1080,9 +1102,11 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
e = e.get_slice(".", 1);
}
+ class_desc->push_color(highlight_color);
class_desc->add_text(e);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->pop();
+ class_desc->push_color(symbol_color);
class_desc->add_text(":");
class_desc->pop();
class_desc->add_newline();
@@ -1093,20 +1117,20 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
for (int i = 0; i < enum_list.size(); i++) {
class_desc->push_font(doc_code_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ class_desc->push_color(highlight_color);
_add_text(enum_list[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(" = ");
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(value_color);
_add_text(enum_list[i].value);
class_desc->pop();
class_desc->pop();
if (enum_list[i].description != "") {
class_desc->push_font(doc_font);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ class_desc->push_color(comment_color);
_add_text(enum_list[i].description);
class_desc->pop();
class_desc->pop();
@@ -1126,7 +1150,8 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (constants.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Constants"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Constants:"));
class_desc->pop();
@@ -1140,20 +1165,20 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
constant_line[constants[i].name] = class_desc->get_line_count() - 2;
class_desc->push_font(doc_code_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ class_desc->push_color(highlight_color);
_add_text(constants[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(" = ");
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(value_color);
_add_text(constants[i].value);
class_desc->pop();
class_desc->pop();
if (constants[i].description != "") {
class_desc->push_font(doc_font);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ class_desc->push_color(comment_color);
_add_text(constants[i].description);
class_desc->pop();
class_desc->pop();
@@ -1169,16 +1194,16 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.description != "") {
+ section_line.push_back(Pair<String, int>(TTR("Description"), class_desc->get_line_count() - 2));
description_line = class_desc->get_line_count() - 2;
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Description:"));
class_desc->pop();
class_desc->pop();
class_desc->add_newline();
- class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->push_font(doc_font);
class_desc->push_indent(1);
_add_text(cd.description);
@@ -1187,11 +1212,13 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
class_desc->add_newline();
class_desc->add_newline();
+ class_desc->add_newline();
}
if (property_descr) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Properties"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Property Description:"));
class_desc->pop();
@@ -1208,7 +1235,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
_add_type(cd.properties[i].type, cd.properties[i].enumeration);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(highlight_color);
_add_text(cd.properties[i].name);
class_desc->pop(); //color
@@ -1221,11 +1248,11 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->push_font(doc_font);
class_desc->push_indent(2);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(comment_color);
class_desc->add_text("Setter: ");
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->add_text(cd.properties[i].setter + "(value)");
class_desc->pop(); //color
@@ -1239,11 +1266,11 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->push_font(doc_font);
class_desc->push_indent(2);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(comment_color);
class_desc->add_text("Getter: ");
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->add_text(cd.properties[i].getter + "()");
class_desc->pop(); //color
@@ -1254,10 +1281,18 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->push_font(doc_font);
class_desc->push_indent(1);
- _add_text(cd.properties[i].description);
+ if (cd.properties[i].description.strip_edges() != String()) {
+ _add_text(cd.properties[i].description);
+ } else {
+ class_desc->add_image(get_icon("Error", "EditorIcons"));
+ class_desc->add_text(" ");
+ class_desc->push_color(comment_color);
+ class_desc->append_bbcode(TTR("There is currently no description for this property. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
+ class_desc->pop();
+ }
class_desc->pop();
class_desc->pop();
class_desc->pop();
@@ -1269,7 +1304,8 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (method_descr) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2));
+ class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Method Description:"));
class_desc->pop();
@@ -1288,14 +1324,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
_add_type(methods[i].return_type, methods[i].return_enum);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(highlight_color);
_add_text(methods[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "(");
class_desc->pop();
for (int j = 0; j < methods[i].arguments.size(); j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
if (j > 0)
class_desc->add_text(", ");
_add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration);
@@ -1303,7 +1339,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
_add_text(methods[i].arguments[j].name);
if (methods[i].arguments[j].default_value != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text("=");
class_desc->pop();
_add_text(methods[i].arguments[j].default_value);
@@ -1313,21 +1349,21 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
}
if (is_vararg) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
if (methods[i].arguments.size())
class_desc->add_text(", ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text("...");
class_desc->pop();
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->push_color(symbol_color);
class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")");
class_desc->pop();
if (methods[i].qualifiers != "") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_color(qualifier_color);
class_desc->add_text(" ");
_add_text(methods[i].qualifiers);
class_desc->pop();
@@ -1336,10 +1372,19 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_color(text_color);
class_desc->push_font(doc_font);
class_desc->push_indent(1);
- _add_text(methods[i].description);
+ if (methods[i].description.strip_edges() != String()) {
+ _add_text(methods[i].description);
+ } else {
+ class_desc->add_image(get_icon("Error", "EditorIcons"));
+ class_desc->add_text(" ");
+ class_desc->push_color(comment_color);
+ class_desc->append_bbcode(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
+ class_desc->pop();
+ }
+
class_desc->pop();
class_desc->pop();
class_desc->pop();
@@ -1409,70 +1454,16 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
DocData *doc = EditorHelp::get_doc_data();
String base_path;
- /*p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
- p_rt->push_font( get_font("normal","Fonts") );
- p_rt->push_indent(1);*/
- int pos = 0;
-
Ref<Font> doc_font = p_rt->get_font("doc", "EditorFonts");
Ref<Font> doc_code_font = p_rt->get_font("doc_source", "EditorFonts");
+ Color font_color_hl = p_rt->get_color("highlight_color", "RichTextLabel");
+ Color link_color = p_rt->get_color("accent_color", "Editor").linear_interpolate(font_color_hl, 0.8);
String bbcode = p_bbcode.replace("\t", " ").replace("\r", " ").strip_edges();
- //change newlines for double newlines
- for (int i = 0; i < bbcode.length(); i++) {
-
- //find valid newlines (double)
- if (bbcode[i] == '\n') {
- bool dnl = false;
- int j = i + 1;
- for (; j < p_bbcode.length(); j++) {
- if (bbcode[j] == ' ')
- continue;
- if (bbcode[j] == '\n') {
- dnl = true;
- break;
- }
- break;
- }
-
- if (dnl) {
- bbcode[i] = 0xFFFF;
- //keep
- i = j;
- } else {
- bbcode = bbcode.insert(i, "\n");
- i++;
- //bbcode[i]=' ';
- //i=j-1;
- }
- }
- }
-
- //remove double spaces or spaces after newlines
- for (int i = 0; i < bbcode.length(); i++) {
-
- if (bbcode[i] == ' ' || bbcode[i] == '\n' || bbcode[i] == 0xFFFF) {
-
- for (int j = i + 1; j < p_bbcode.length(); j++) {
- if (bbcode[j] == ' ') {
- bbcode.remove(j);
- j--;
- continue;
- } else {
- break;
- }
- }
- }
- }
-
- //change newlines to double newlines
-
- CharType dnls[2] = { 0xFFFF, 0 };
- bbcode = bbcode.replace(dnls, "\n");
-
List<String> tag_stack;
+ int pos = 0;
while (pos < bbcode.length()) {
int brk_pos = bbcode.find("[", pos);
@@ -1490,7 +1481,6 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
int brk_end = bbcode.find("]", brk_pos + 1);
if (brk_end == -1) {
- //no close, add the rest
p_rt->add_text(bbcode.substr(brk_pos, bbcode.length() - brk_pos));
break;
@@ -1502,6 +1492,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1, tag.length());
if (tag_stack.size()) {
}
+
if (!tag_ok) {
p_rt->add_text("[");
@@ -1517,7 +1508,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
} else if (tag.begins_with("method ")) {
String m = tag.substr(7, tag.length());
- p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ p_rt->push_color(link_color);
p_rt->push_meta("@" + m);
p_rt->add_text(m + "()");
p_rt->pop();
@@ -1526,7 +1517,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
} else if (doc->class_list.has(tag)) {
- p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ p_rt->push_color(link_color);
p_rt->push_meta("#" + tag);
p_rt->add_text(tag);
p_rt->pop();
@@ -1542,13 +1533,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
} else if (tag == "i") {
//use italics font
- Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
- //no italics so emphasize with color
- text_color.r *= 1.1;
- text_color.g *= 1.1;
- text_color.b *= 1.1;
- p_rt->push_color(text_color);
- //p_rt->push_font(get_font("italic","Fonts"));
+ p_rt->push_color(font_color_hl);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "code" || tag == "codeblock") {
@@ -1709,11 +1694,16 @@ void EditorHelp::_notification(int p_what) {
//forward->set_icon(get_icon("Forward","EditorIcons"));
//back->set_icon(get_icon("Back","EditorIcons"));
_update_doc();
+
+ class_desc->add_style_override("normal", class_desc->get_stylebox("code_normal", "RichTextLabel"));
+ class_desc->add_style_override("focus", class_desc->get_stylebox("code_focus", "RichTextLabel"));
+
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
class_desc->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
+
} break;
default: break;
@@ -1730,9 +1720,23 @@ void EditorHelp::go_to_class(const String &p_class, int p_scroll) {
_goto_desc(p_class, p_scroll);
}
+Vector<Pair<String, int> > EditorHelp::get_sections() {
+ Vector<Pair<String, int> > sections;
+
+ for (int i = 0; i < section_line.size(); i++) {
+ sections.push_back(Pair<String, int>(section_line[i].first, i));
+ }
+ return sections;
+}
+
+void EditorHelp::scroll_to_section(int p_section_index) {
+ int line = section_line[p_section_index].second;
+ class_desc->scroll_to_line(line);
+}
+
void EditorHelp::popup_search() {
- search_dialog->popup_centered(Size2(250, 80));
+ search_dialog->popup_centered(Size2(250, 80) * EDSCALE);
search->grab_focus();
}
@@ -1784,12 +1788,10 @@ EditorHelp::EditorHelp() {
//class_list->set_selection_enabled(true);
{
- background_panel = memnew(Panel);
- background_panel->set_v_size_flags(SIZE_EXPAND_FILL);
- vbc->add_child(background_panel);
class_desc = memnew(RichTextLabel);
- background_panel->add_child(class_desc);
+ vbc->add_child(class_desc);
class_desc->set_area_as_parent_rect();
+ class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
class_desc->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
class_desc->connect("meta_clicked", this, "_class_desc_select");
class_desc->connect("gui_input", this, "_class_desc_input");
@@ -1813,7 +1815,6 @@ EditorHelp::EditorHelp() {
search_dialog->get_ok()->set_text(TTR("Find"));
search_dialog->connect("confirmed", this, "_search_cbk");
search_dialog->set_hide_on_ok(false);
- search_dialog->set_self_modulate(Color(1, 1, 1, 0.8));
/*class_search = memnew( EditorHelpSearch(editor) );
editor->get_gui_base()->add_child(class_search);
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 30a535a535..92c0e2f4d1 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -118,6 +118,7 @@ class EditorHelp : public VBoxContainer {
String edited_class;
+ Vector<Pair<String, int> > section_line;
Map<String, int> method_line;
Map<String, int> signal_line;
Map<String, int> property_line;
@@ -130,7 +131,6 @@ class EditorHelp : public VBoxContainer {
HSplitContainer *h_split;
static DocData *doc;
- Panel *background_panel;
ConfirmationDialog *search_dialog;
LineEdit *search;
@@ -169,6 +169,9 @@ public:
void go_to_help(const String &p_help);
void go_to_class(const String &p_class, int p_scroll = 0);
+ Vector<Pair<String, int> > get_sections();
+ void scroll_to_section(int p_section_index);
+
void popup_search();
void search_again();
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 35291f8f9e..035819f503 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -61,9 +61,6 @@ void EditorLog::_notification(int p_what) {
//button->set_icon(get_icon("Console","EditorIcons"));
}
- if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- _override_logger_styles();
- }
/*if (p_what==NOTIFICATION_DRAW) {
@@ -129,7 +126,6 @@ void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
void EditorLog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_clear_request"), &EditorLog::_clear_request);
- ClassDB::bind_method("_override_logger_styles", &EditorLog::_override_logger_styles);
//ClassDB::bind_method(D_METHOD("_dragged"),&EditorLog::_dragged );
ADD_SIGNAL(MethodInfo("clear_request"));
}
@@ -151,21 +147,15 @@ EditorLog::EditorLog() {
clearbutton->set_text(TTR("Clear"));
clearbutton->connect("pressed", this, "_clear_request");
- ec = memnew(Control);
- vb->add_child(ec);
- ec->set_custom_minimum_size(Size2(0, 180) * EDSCALE);
- ec->set_v_size_flags(SIZE_EXPAND_FILL);
-
- pc = memnew(PanelContainer);
- ec->add_child(pc);
- pc->set_area_as_parent_rect();
- pc->connect("tree_entered", this, "_override_logger_styles");
-
log = memnew(RichTextLabel);
log->set_scroll_follow(true);
log->set_selection_enabled(true);
log->set_focus_mode(FOCUS_CLICK);
- pc->add_child(log);
+ log->set_custom_minimum_size(Size2(0, 180) * EDSCALE);
+ log->set_area_as_parent_rect();
+ log->set_v_size_flags(SIZE_EXPAND_FILL);
+ log->set_h_size_flags(SIZE_EXPAND_FILL);
+ vb->add_child(log);
add_message(VERSION_FULL_NAME " (c) 2008-2017 Juan Linietsky, Ariel Manzur.");
//log->add_text("Initialization Complete.\n"); //because it looks cool.
@@ -183,10 +173,5 @@ void EditorLog::deinit() {
remove_error_handler(&eh);
}
-void EditorLog::_override_logger_styles() {
-
- pc->add_style_override("panel", get_stylebox("normal", "TextEdit"));
-}
-
EditorLog::~EditorLog() {
}
diff --git a/editor/editor_log.h b/editor/editor_log.h
index fd919fd692..e551623140 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -50,8 +50,6 @@ class EditorLog : public VBoxContainer {
RichTextLabel *log;
HBoxContainer *title_hb;
//PaneDrag *pd;
- Control *ec;
- PanelContainer *pc;
static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type);
@@ -66,7 +64,6 @@ class EditorLog : public VBoxContainer {
protected:
static void _bind_methods();
void _notification(int p_what);
- void _override_logger_styles();
public:
void add_message(const String &p_msg, bool p_error = false);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 91d2ddcd19..1a89d6ef6e 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -84,6 +84,7 @@
#include "editor/plugins/mesh_editor_plugin.h"
#include "editor/plugins/mesh_instance_editor_plugin.h"
#include "editor/plugins/multimesh_editor_plugin.h"
+#include "editor/plugins/navigation_mesh_editor_plugin.h"
#include "editor/plugins/navigation_polygon_editor_plugin.h"
#include "editor/plugins/particles_2d_editor_plugin.h"
#include "editor/plugins/particles_editor_plugin.h"
@@ -253,6 +254,7 @@ void EditorNode::_notification(int p_what) {
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
get_tree()->connect("files_dropped", this, "_dropped_files");
+ property_editable_warning->set_icon(gui_base->get_icon("NodeWarning", "EditorIcons"));
}
if (p_what == NOTIFICATION_EXIT_TREE) {
@@ -412,7 +414,6 @@ void EditorNode::_fs_changed() {
}
if (changed.size()) {
- int idx = 0;
for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) {
E->get()->reload_from_file();
}
@@ -1387,6 +1388,11 @@ static bool overrides_external_editor(Object *p_object) {
return script->get_language()->overrides_external_editor();
}
+void EditorNode::_property_editable_warning_pressed() {
+
+ property_editable_warning_dialog->popup_centered_minsize();
+}
+
void EditorNode::_edit_current() {
uint32_t current = editor_history.get_current();
@@ -1398,6 +1404,9 @@ void EditorNode::_edit_current() {
this->current = current_obj;
editor_path->update_path();
+ String editable_warning; //none by default
+ property_editable_warning->hide(); //hide by default
+
if (!current_obj) {
scene_tree_dock->set_selected(NULL);
@@ -1425,6 +1434,22 @@ void EditorNode::_edit_current() {
node_dock->set_node(NULL);
object_menu->set_disabled(false);
EditorNode::get_singleton()->get_import_dock()->set_edit_path(current_res->get_path());
+
+ int subr_idx = current_res->get_path().find("::");
+ if (subr_idx != -1) {
+ String base_path = current_res->get_path().substr(0, subr_idx);
+ if (FileAccess::exists(base_path + ".import")) {
+ editable_warning = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
+ } else {
+ if (!get_edited_scene() || get_edited_scene()->get_filename() != base_path) {
+ editable_warning = TTR("This resource belongs to a scene that was instanced or inherited.\nChanges to it will not be kept when saving the current scene.");
+ }
+ }
+ } else if (current_res->get_path().is_resource_file()) {
+ if (FileAccess::exists(current_res->get_path() + ".import")) {
+ editable_warning = TTR("This resource was imported, so it's not editable. Change it's settings in the import panel and re-import.");
+ }
+ }
} else if (is_node) {
Node *current_node = Object::cast_to<Node>(current_obj);
@@ -1440,12 +1465,24 @@ void EditorNode::_edit_current() {
}
object_menu->get_popup()->clear();
+ if (get_edited_scene() && get_edited_scene()->get_filename() != String()) {
+ String source_scene = get_edited_scene()->get_filename();
+ if (FileAccess::exists(source_scene + ".import")) {
+ editable_warning = TTR("This scene was imported, so changes to it will not be kept.\nInstancing it or inheriting will allow making changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
+ }
+ }
+
} else {
property_editor->edit(current_obj);
node_dock->set_node(NULL);
}
+ if (editable_warning != String()) {
+ property_editable_warning->show(); //hide by default
+ property_editable_warning_dialog->set_text(editable_warning);
+ }
+
/* Take care of PLUGIN EDITOR */
EditorPlugin *main_plugin = editor_data.get_editor(current_obj);
@@ -1997,6 +2034,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
int cur_idx = editor_data.get_edited_scene();
_remove_edited_scene();
Error err = load_scene(filename);
+ if (err != OK)
+ ERR_PRINT("Failed to load scene");
editor_data.move_edited_scene_to_index(cur_idx);
get_undo_redo()->clear_history();
scene_tabs->set_current_tab(cur_idx);
@@ -2741,14 +2780,6 @@ Dictionary EditorNode::_get_main_scene_state() {
state["property_edit_offset"] = get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
state["saved_version"] = saved_version;
state["node_filter"] = scene_tree_dock->get_filter();
- int current = -1;
- for (int i = 0; i < editor_table.size(); i++) {
- if (editor_plugin_screen == editor_table[i]) {
- current = i;
- break;
- }
- }
- state["editor_index"] = current;
return state;
}
@@ -2759,29 +2790,32 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
changing_scene = false;
- if (p_state.has("editor_index")) {
-
- int index = p_state["editor_index"];
- int current = -1;
- for (int i = 0; i < editor_table.size(); i++) {
- if (editor_plugin_screen == editor_table[i]) {
- current = i;
- break;
- }
+ int current = -1;
+ for (int i = 0; i < editor_table.size(); i++) {
+ if (editor_plugin_screen == editor_table[i]) {
+ current = i;
+ break;
}
+ }
+ if (p_state.has("editor_index")) {
+ int index = p_state["editor_index"];
if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if curently in script, stay there
if (index < 2 || !get_edited_scene()) {
_editor_select(index);
- } else {
- //use heuristic instead
- int n2d = 0, n3d = 0;
- _find_node_types(get_edited_scene(), n2d, n3d);
- if (n2d > n3d) {
- _editor_select(EDITOR_2D);
- } else if (n3d > n2d) {
- _editor_select(EDITOR_3D);
- }
+ }
+ }
+ }
+
+ if (get_edited_scene()) {
+ if (current < 2) {
+ //use heuristic instead
+ int n2d = 0, n3d = 0;
+ _find_node_types(get_edited_scene(), n2d, n3d);
+ if (n2d > n3d) {
+ _editor_select(EDITOR_2D);
+ } else if (n3d > n2d) {
+ _editor_select(EDITOR_3D);
}
}
}
@@ -3212,9 +3246,9 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorFileSystemDirectory>();
ClassDB::register_virtual_class<ScriptEditor>();
ClassDB::register_virtual_class<EditorInterface>();
+ ClassDB::register_class<EditorExportPlugin>();
// FIXME: Is this stuff obsolete, or should it be ported to new APIs?
- //ClassDB::register_class<EditorExportPlugin>();
//ClassDB::register_class<EditorScenePostImport>();
//ClassDB::register_type<EditorImportExport>();
}
@@ -3304,9 +3338,9 @@ void EditorNode::_editor_file_dialog_unregister(EditorFileDialog *p_dialog) {
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
-Error EditorNode::export_preset(const String &preset, const String &p_path, bool p_debug, const String &p_password, bool p_quit_after) {
+Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, const String &p_password, bool p_quit_after) {
- export_defer.preset = preset;
+ export_defer.preset = p_preset;
export_defer.path = p_path;
export_defer.debug = p_debug;
export_defer.password = p_password;
@@ -3607,13 +3641,6 @@ void EditorNode::_update_dock_slots_visibility() {
right_r_vsplit,
};
- HSplitContainer *h_splits[4] = {
- left_l_hsplit,
- left_r_hsplit,
- main_hsplit,
- right_hsplit,
- };
-
if (!docks_visible) {
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
@@ -4034,6 +4061,13 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
ERR_FAIL_INDEX(p_idx, bottom_panel_items.size());
if (p_enable) {
+ // this is the debug panel wich uses tabs, so the top section should be smaller
+ if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) {
+ Ref<StyleBoxFlat> style_panel_invisible_top = gui_base->get_stylebox("debugger_panel", "EditorStyles");
+ bottom_panel->add_style_override("panel", style_panel_invisible_top);
+ } else {
+ bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
+ }
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->set_pressed(i == p_idx);
@@ -4042,11 +4076,14 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
center_split->set_dragger_visibility(SplitContainer::DRAGGER_VISIBLE);
center_split->set_collapsed(false);
} else {
+ bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
+
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->set_pressed(false);
bottom_panel_items[i].control->set_visible(false);
}
+
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
center_split->set_collapsed(true);
}
@@ -4134,7 +4171,7 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
{
//todo make proper previews
- Ref<ImageTexture> pic = gui_base->get_icon("FileBig", "EditorIcons");
+ Ref<ImageTexture> pic = gui_base->get_icon("FileBigThumb", "EditorIcons");
Ref<Image> img = pic->get_data();
img = img->duplicate();
img->resize(48, 48); //meh
@@ -4476,6 +4513,7 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_clear_undo_history", &EditorNode::_clear_undo_history);
ClassDB::bind_method("_dropped_files", &EditorNode::_dropped_files);
ClassDB::bind_method("_toggle_distraction_free_mode", &EditorNode::_toggle_distraction_free_mode);
+ ClassDB::bind_method("_property_editable_warning_pressed", &EditorNode::_property_editable_warning_pressed);
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
ClassDB::bind_method(D_METHOD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
@@ -4821,7 +4859,7 @@ EditorNode::EditorNode() {
scene_root_parent = memnew(PanelContainer);
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
-
+ scene_root_parent->set_draw_behind_parent(true);
srt->add_child(scene_root_parent);
scene_root_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -4878,6 +4916,7 @@ EditorNode::EditorNode() {
gui_base->add_child(dependency_fixer);
settings_config_dialog = memnew(EditorSettingsDialog);
+ // settings_config_dialog->add_style_override("panel", gui_base->get_stylebox("EditorSettingsDialog", "EditorStyles"));
gui_base->add_child(settings_config_dialog);
project_settings = memnew(ProjectSettingsEditor(&editor_data));
@@ -5035,7 +5074,7 @@ EditorNode::EditorNode() {
p->add_icon_item(gui_base->get_icon("Instance", "EditorIcons"), TTR("Issue Tracker"), HELP_ISSUES);
p->add_icon_item(gui_base->get_icon("Instance", "EditorIcons"), TTR("Community"), HELP_COMMUNITY);
p->add_separator();
- p->add_icon_item(gui_base->get_icon("GodotDocs", "EditorIcons"), TTR("About"), HELP_ABOUT);
+ p->add_icon_item(gui_base->get_icon("Godot", "EditorIcons"), TTR("About"), HELP_ABOUT);
play_cc = memnew(CenterContainer);
play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
@@ -5236,6 +5275,14 @@ EditorNode::EditorNode() {
search_bar->add_child(clear_button);
clear_button->connect("pressed", this, "_clear_search_box");
+ property_editable_warning = memnew(Button);
+ property_editable_warning->set_text(TTR("Changes may be lost!"));
+ prop_editor_base->add_child(property_editable_warning);
+ property_editable_warning_dialog = memnew(AcceptDialog);
+ gui_base->add_child(property_editable_warning_dialog);
+ property_editable_warning->hide();
+ property_editable_warning->connect("pressed", this, "_property_editable_warning_pressed");
+
property_editor = memnew(PropertyEditor);
property_editor->set_autoclear(true);
property_editor->set_show_categories(true);
@@ -5248,6 +5295,7 @@ EditorNode::EditorNode() {
property_editor->hide_top_label();
property_editor->register_text_enter(search_box);
+ Button *property_editable_warning;
prop_editor_base->add_child(property_editor);
property_editor->set_undo_redo(&editor_data.get_undo_redo());
@@ -5445,6 +5493,7 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(TextureEditorPlugin(this)));
add_editor_plugin(memnew(MeshEditorPlugin(this)));
add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor)));
+ add_editor_plugin(memnew(NavigationMeshEditorPlugin(this)));
// FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
// Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
diff --git a/editor/editor_node.h b/editor/editor_node.h
index ea74bcbd9d..33031e5634 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -262,6 +262,9 @@ private:
Button *property_forward;
SceneTreeDock *scene_tree_dock;
PropertyEditor *property_editor;
+ Button *property_editable_warning;
+ AcceptDialog *property_editable_warning_dialog;
+ void _property_editable_warning_pressed();
NodeDock *node_dock;
ImportDock *import_dock;
VBoxContainer *prop_editor_vb;
@@ -712,7 +715,7 @@ public:
void show_warning(const String &p_text, const String &p_title = "Warning!");
- Error export_preset(const String &p_platform, const String &p_path, bool p_debug, const String &p_password, bool p_quit_after = false);
+ Error export_preset(const String &p_preset, const String &p_path, bool p_debug, const String &p_password, bool p_quit_after = false);
static void register_editor_types();
static void unregister_editor_types();
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 86acfcc50e..246599be11 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -530,6 +530,14 @@ void EditorPlugin::remove_import_plugin(const Ref<EditorImportPlugin> &p_importe
EditorFileSystem::get_singleton()->scan();
}
+void EditorPlugin::add_export_plugin(const Ref<EditorExportPlugin> &p_exporter) {
+ EditorExport::get_singleton()->add_export_plugin(p_exporter);
+}
+
+void EditorPlugin::remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter) {
+ EditorExport::get_singleton()->remove_export_plugin(p_exporter);
+}
+
void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
if (get_script_instance() && get_script_instance()->has_method("set_window_layout")) {
@@ -585,6 +593,8 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
ClassDB::bind_method(D_METHOD("add_import_plugin", "importer"), &EditorPlugin::add_import_plugin);
ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer"), &EditorPlugin::remove_import_plugin);
+ ClassDB::bind_method(D_METHOD("add_export_plugin", "exporter"), &EditorPlugin::add_export_plugin);
+ ClassDB::bind_method(D_METHOD("remove_export_plugin", "exporter"), &EditorPlugin::remove_export_plugin);
ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorPlugin::get_editor_interface);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 99328f8149..18530e9ce4 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -191,6 +191,9 @@ public:
void add_import_plugin(const Ref<EditorImportPlugin> &p_importer);
void remove_import_plugin(const Ref<EditorImportPlugin> &p_importer);
+ void add_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
+ void remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
+
EditorPlugin();
virtual ~EditorPlugin();
};
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index e377fa1a8e..90cbabcc4f 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -72,6 +72,10 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
screen--;
}
+ if (OS::get_singleton()->is_disable_crash_handler()) {
+ args.push_back("--disable-crash-handler");
+ }
+
Rect2 screen_rect;
screen_rect.position = OS::get_singleton()->get_screen_position(screen);
screen_rect.size = OS::get_singleton()->get_screen_size(screen);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index db76a27f5f..d4ee6b2d17 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -574,10 +574,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("interface/theme/icon_and_font_color", 0);
hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/theme/base_color", Color::html("#323b4f"));
- hints["interface/theme/highlight_color"] = PropertyInfo(Variant::COLOR, "interface/theme/highlight_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("interface/theme/highlight_color", Color::html("#699ce8"));
+ hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/theme/accent_color", Color::html("#699ce8"));
hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("interface/theme/contrast", 0.2);
+ set("interface/theme/contrast", 0.25);
hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
set("interface/theme/highlight_tabs", false);
set("interface/theme/border_size", 1);
@@ -599,8 +599,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["global/default_project_export_path"] = PropertyInfo(Variant::STRING, "global/default_project_export_path", PROPERTY_HINT_GLOBAL_DIR);
set("interface/show_script_in_scene_tabs", false);
- set("text_editor/theme/color_theme", "Default");
- hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Default");
+ set("text_editor/theme/color_theme", "Adaptive");
+ hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default");
set("text_editor/theme/line_spacing", 4);
@@ -676,9 +676,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/3d/warped_mouse_panning", true);
set("editors/3d/orbit_sensitivity", 0.4);
- set("editors/3d/freelook_inertia", 3);
- set("editors/3d/freelook_base_speed", 1);
+ set("editors/3d/orbit_inertia", 0.2);
+ hints["editors/3d/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+
+ set("editors/3d/freelook_inertia", 0.2);
+ hints["editors/3d/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+
+ set("editors/3d/freelook_base_speed", 0.5);
+ hints["editors/3d/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.1");
set("editors/3d/freelook_activation_modifier", 0);
hints["editors/3d/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
@@ -723,6 +729,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List");
set("docks/filesystem/thumbnail_size", 64);
hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
+ set("docks/filesystem/display_mode", 0);
+ hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List");
+ set("docks/filesystem/always_show_folders", true);
set("editors/animation/autorename_animation_tracks", true);
set("editors/animation/confirm_insert_track", true);
@@ -730,6 +739,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("docks/property_editor/texture_preview_width", 48);
set("docks/property_editor/auto_refresh_interval", 0.3);
set("text_editor/help/doc_path", "");
+ set("text_editor/help/show_help_index", true);
set("filesystem/import/ask_save_before_reimport", false);
@@ -914,13 +924,13 @@ void EditorSettings::load_favorites() {
}
void EditorSettings::list_text_editor_themes() {
- String themes = "Default";
+ String themes = "Adaptive,Default";
DirAccess *d = DirAccess::open(settings_path + "/text_editor_themes");
if (d) {
d->list_dir_begin();
String file = d->get_next();
while (file != String()) {
- if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default") {
+ if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive") {
themes += "," + file.get_basename();
}
file = d->get_next();
@@ -932,7 +942,7 @@ void EditorSettings::list_text_editor_themes() {
}
void EditorSettings::load_text_editor_theme() {
- if (get("text_editor/theme/color_theme") == "Default") {
+ if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive") {
_load_default_text_editor_theme(); // sorry for "Settings changed" console spam
return;
}
@@ -989,7 +999,7 @@ bool EditorSettings::save_text_editor_theme() {
String p_file = get("text_editor/theme/color_theme");
- if (p_file.get_file().to_lower() == "default") {
+ if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive") {
return false;
}
String theme_path = get_settings_path() + "/text_editor_themes/" + p_file + ".tet";
@@ -1001,7 +1011,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
p_file += ".tet";
}
- if (p_file.get_file().to_lower() == "default.tet") {
+ if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet") {
return false;
}
if (_save_text_editor_theme(p_file)) {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 19356aad3a..3482261c19 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -86,7 +86,7 @@ static Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat> p_style, Color p_
return style;
}
-Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true, Dictionary *p_colors = NULL) {
+Ref<ImageTexture> editor_generate_icon(int p_index, bool convert_color, float p_scale = EDSCALE, bool force_filter = false) {
Ref<ImageTexture> icon = memnew(ImageTexture);
Ref<Image> img = memnew(Image);
@@ -94,9 +94,9 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true, Dict
// dumb gizmo check
bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo");
- ImageLoaderSVG::create_image_from_string(img, editor_icons_sources[p_index], EDSCALE, true, dark_theme ? NULL : p_colors);
+ ImageLoaderSVG::create_image_from_string(img, editor_icons_sources[p_index], p_scale, true, convert_color);
- if ((EDSCALE - (float)((int)EDSCALE)) > 0.0 || is_gizmo)
+ if ((p_scale - (float)((int)p_scale)) > 0.0 || is_gizmo || force_filter)
icon->create_from_image(img); // in this case filter really helps
else
icon->create_from_image(img, 0);
@@ -108,10 +108,9 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true, Dict
#define ADD_CONVERT_COLOR(dictionary, old_color, new_color) dictionary[Color::html(old_color)] = Color::html(new_color)
#endif
-void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = true) {
+void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = true, int p_thumb_size = 32, bool only_thumbs = false) {
#ifdef SVG_ENABLED
-
Dictionary dark_icon_color_dictionary;
//convert color: FROM TO
ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e0e0e0", "#4f4f4f"); // common icon color
@@ -161,15 +160,41 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = tr
clock_t begin_time = clock();
- for (int i = 0; i < editor_icons_count; i++) {
- List<String>::Element *is_exception = exceptions.find(editor_icons_names[i]);
- if (is_exception) {
- exceptions.erase(is_exception);
+ ImageLoaderSVG::set_convert_colors(dark_theme ? NULL : &dark_icon_color_dictionary);
+
+ // generate icons
+ if (!only_thumbs)
+ for (int i = 0; i < editor_icons_count; i++) {
+ List<String>::Element *is_exception = exceptions.find(editor_icons_names[i]);
+ if (is_exception) exceptions.erase(is_exception);
+ Ref<ImageTexture> icon = editor_generate_icon(i, !dark_theme && !is_exception);
+ p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon);
+ }
+
+ // generate thumb files with the given thumb size
+ bool force_filter = !(p_thumb_size == 64 && p_thumb_size == 32); // we dont need filter with original resolution
+ if (p_thumb_size >= 64) {
+ float scale = (float)p_thumb_size / 64.0 * EDSCALE;
+ for (int i = 0; i < editor_bg_thumbs_count; i++) {
+ int index = editor_bg_thumbs_indices[i];
+ List<String>::Element *is_exception = exceptions.find(editor_icons_names[index]);
+ if (is_exception) exceptions.erase(is_exception);
+ Ref<ImageTexture> icon = editor_generate_icon(index, !dark_theme && !is_exception, scale, force_filter);
+ p_theme->set_icon(editor_icons_names[index], "EditorIcons", icon);
+ }
+ } else {
+ float scale = (float)p_thumb_size / 32.0 * EDSCALE;
+ for (int i = 0; i < editor_md_thumbs_count; i++) {
+ int index = editor_md_thumbs_indices[i];
+ List<String>::Element *is_exception = exceptions.find(editor_icons_names[index]);
+ if (is_exception) exceptions.erase(is_exception);
+ Ref<ImageTexture> icon = editor_generate_icon(index, !dark_theme && !is_exception, scale, force_filter);
+ p_theme->set_icon(editor_icons_names[index], "EditorIcons", icon);
}
- Ref<ImageTexture> icon = editor_generate_icon(i, dark_theme, is_exception ? NULL : &dark_icon_color_dictionary);
- p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon);
}
+ ImageLoaderSVG::set_convert_colors(NULL);
+
clock_t end_time = clock();
double time_d = (double)(end_time - begin_time) / CLOCKS_PER_SEC;
@@ -179,9 +204,6 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = tr
#endif
}
-#define HIGHLIGHT_COLOR_FONT highlight_color.linear_interpolate(dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1), 0.5)
-#define HIGHLIGHT_COLOR_BG highlight_color.linear_interpolate(dark_theme ? Color(0, 0, 0, 1) : Color(1, 1, 1, 1), 0.5)
-
Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
@@ -189,7 +211,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const float default_contrast = 0.25;
//Theme settings
- Color highlight_color = EDITOR_DEF("interface/theme/highlight_color", Color::html("#000000"));
+ Color accent_color = EDITOR_DEF("interface/theme/accent_color", Color::html("#000000"));
Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#000000"));
float contrast = EDITOR_DEF("interface/theme/contrast", default_contrast);
@@ -202,27 +224,27 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
switch (preset) {
case 0: { // Default
- highlight_color = Color::html("#699ce8");
+ accent_color = Color::html("#699ce8");
base_color = Color::html("#323b4f");
contrast = default_contrast;
} break;
case 1: { // Grey
- highlight_color = Color::html("#3e3e3e");
+ accent_color = Color::html("#3e3e3e");
base_color = Color::html("#3d3d3d");
contrast = 0.2;
} break;
case 2: { // Godot 2
- highlight_color = Color::html("#86ace2");
+ accent_color = Color::html("#86ace2");
base_color = Color::html("#3C3A44");
contrast = 0.25;
} break;
case 3: { // Arc
- highlight_color = Color::html("#5294e2");
+ accent_color = Color::html("#5294e2");
base_color = Color::html("#383c4a");
contrast = 0.25;
} break;
case 4: { // Light
- highlight_color = Color::html("#2070ff");
+ accent_color = Color::html("#2070ff");
base_color = Color::html("#ffffff");
contrast = 0.08;
} break;
@@ -233,22 +255,29 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
int LIGHT_COLOR = 2;
bool dark_theme = (icon_font_color_setting == AUTO_COLOR && ((base_color.r + base_color.g + base_color.b) / 3.0) < 0.5) || icon_font_color_setting == LIGHT_COLOR;
- Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
- Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);
- Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
+ const Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
+ const Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);
+ const Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
- Color contrast_color_1 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), MAX(contrast, default_contrast));
- Color contrast_color_2 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), MAX(contrast * 1.5, default_contrast * 1.5));
+ const Color background_color = dark_color_2;
- Color font_color = dark_theme ? Color(1, 1, 1) : Color(0, 0, 0);
- Color font_color_disabled = dark_theme ? Color(0.6, 0.6, 0.6) : Color(0.45, 0.45, 0.45);
+ // white (dark theme) or black (light theme), will be used to generate the rest of the colors
+ const Color mono_color = dark_theme ? Color(1, 1, 1) : Color(0, 0, 0);
- Color separator_color = dark_theme ? Color(1, 1, 1, 0.1) : Color(0, 0, 0, 0.1);
+ const Color contrast_color_1 = base_color.linear_interpolate(mono_color, MAX(contrast, default_contrast));
+ const Color contrast_color_2 = base_color.linear_interpolate(mono_color, MAX(contrast * 1.5, default_contrast * 1.5));
- Color tab_color = highlight_tabs ? base_color.linear_interpolate(font_color, contrast) : base_color;
- const int border_width = CLAMP(border_size, 0, 3) * EDSCALE;
+ const Color font_color = mono_color.linear_interpolate(base_color, 0.25);
+ const Color font_color_hl = mono_color.linear_interpolate(base_color, 0.15);
+ const Color font_color_disabled = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color color_disabled = mono_color.inverted().linear_interpolate(base_color, 0.7);
+ const Color color_disabled_bg = mono_color.inverted().linear_interpolate(base_color, 0.9);
- theme->set_color("highlight_color", "Editor", highlight_color);
+ const Color separator_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.1);
+
+ const Color highlight_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.2);
+
+ theme->set_color("accent_color", "Editor", accent_color);
theme->set_color("base_color", "Editor", base_color);
theme->set_color("dark_color_1", "Editor", dark_color_1);
theme->set_color("dark_color_2", "Editor", dark_color_2);
@@ -256,14 +285,18 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("contrast_color_1", "Editor", contrast_color_1);
theme->set_color("contrast_color_2", "Editor", contrast_color_2);
- Color success_color = highlight_color.linear_interpolate(Color(.6, 1, .6), 0.8);
- Color warning_color = highlight_color.linear_interpolate(Color(1, 1, .2), 0.8);
- Color error_color = highlight_color.linear_interpolate(Color(1, .2, .2), 0.8);
+ theme->set_color("font_color", "Editor", font_color);
+
+ Color success_color = accent_color.linear_interpolate(Color(.6, 1, .6), 0.8);
+ Color warning_color = accent_color.linear_interpolate(Color(1, 1, .2), 0.8);
+ Color error_color = accent_color.linear_interpolate(Color(1, .2, .2), 0.8);
theme->set_color("success_color", "Editor", success_color);
theme->set_color("warning_color", "Editor", warning_color);
theme->set_color("error_color", "Editor", error_color);
+ const int thumb_size = EDITOR_DEF("filesystem/file_dialog/thumbnail_size", 64);
theme->set_constant("scale", "Editor", EDSCALE);
+ theme->set_constant("thumb_size", "Editor", thumb_size);
theme->set_constant("dark_theme", "Editor", dark_theme);
//Register icons + font
@@ -275,36 +308,110 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
}
} else {
- editor_register_and_generate_icons(theme, dark_theme);
+ editor_register_and_generate_icons(theme, dark_theme, thumb_size);
+ }
+ // thumbnail size has changed, so we regenerate the medium sizes
+ if (p_theme != NULL && fabs(p_theme->get_constant("thumb_size", "Editor") - thumb_size) > 0.00001) {
+ editor_register_and_generate_icons(p_theme, dark_theme, thumb_size, true);
}
editor_register_fonts(theme);
+ // Highlighted tabs and border width
+ Color tab_color = highlight_tabs ? base_color.linear_interpolate(font_color, contrast) : base_color;
+ const int border_width = CLAMP(border_size, 0, 3) * EDSCALE;
+
+ const int default_margin_size = 4;
+ const int margin_size_extra = default_margin_size + CLAMP(border_size, 0, 3);
+
+ // styleboxes
+ // this is the most commonly used stylebox, variations should be made as duplicate of this
+ Ref<StyleBoxFlat> style_default = make_flat_stylebox(base_color, default_margin_size, default_margin_size, default_margin_size, default_margin_size);
+ style_default->set_border_width_all(border_width);
+ style_default->set_border_color_all(base_color);
+ style_default->set_draw_center(true);
+
+ // Button and widgets
+ Ref<StyleBoxFlat> style_widget = style_default->duplicate();
+
+ style_widget->set_bg_color(dark_color_1);
+ style_widget->set_default_margin(MARGIN_LEFT, 6 * EDSCALE);
+ style_widget->set_default_margin(MARGIN_RIGHT, 6 * EDSCALE);
+ style_widget->set_border_color_all(dark_color_2);
+
+ Ref<StyleBoxFlat> style_widget_disabled = style_widget->duplicate();
+ style_widget_disabled->set_border_color_all(color_disabled);
+ style_widget_disabled->set_bg_color(color_disabled_bg);
+
+ Ref<StyleBoxFlat> style_widget_focus = style_widget->duplicate();
+ style_widget_focus->set_border_color_all(accent_color);
+
+ Ref<StyleBoxFlat> style_widget_pressed = style_widget->duplicate();
+ style_widget_pressed->set_border_color_all(accent_color);
+
+ Ref<StyleBoxFlat> style_widget_hover = style_widget->duplicate();
+ style_widget_hover->set_border_color_all(contrast_color_1);
+
+ // style for windows, popups, etc..
+ Ref<StyleBoxFlat> style_popup = style_default->duplicate();
+ style_popup->set_default_margin(MARGIN_LEFT, default_margin_size * EDSCALE * 2);
+ style_popup->set_default_margin(MARGIN_TOP, default_margin_size * EDSCALE * 2);
+ style_popup->set_default_margin(MARGIN_RIGHT, default_margin_size * EDSCALE * 2);
+ style_popup->set_default_margin(MARGIN_BOTTOM, default_margin_size * EDSCALE * 2);
+ style_popup->set_border_color_all(contrast_color_1);
+ style_popup->set_border_width_all(MAX(EDSCALE, border_width));
+ const Color shadow_color = Color(0, 0, 0, dark_theme ? 0.3 : 0.1);
+ style_popup->set_shadow_color(shadow_color);
+ style_popup->set_shadow_size(4 * EDSCALE);
+
+ Ref<StyleBoxEmpty> style_empty = make_empty_stylebox(default_margin_size, default_margin_size, default_margin_size, default_margin_size);
+
+ // Tabs
+ const int tab_default_margin_side = 10 * EDSCALE;
+ Ref<StyleBoxFlat> style_tab_selected = style_default->duplicate();
+ style_tab_selected->set_border_width_all(border_width);
+ style_tab_selected->set_border_width(MARGIN_BOTTOM, 0);
+ style_tab_selected->set_border_color_all(dark_color_3);
+ style_tab_selected->set_expand_margin_size(MARGIN_BOTTOM, border_width);
+ style_tab_selected->set_default_margin(MARGIN_LEFT, tab_default_margin_side);
+ style_tab_selected->set_default_margin(MARGIN_RIGHT, tab_default_margin_side);
+ style_tab_selected->set_bg_color(tab_color);
+
+ Ref<StyleBoxFlat> style_tab_unselected = style_tab_selected->duplicate();
+ style_tab_unselected->set_bg_color(Color(0.0, 0.0, 0.0, 0.0));
+ style_tab_unselected->set_border_color_all(Color(0.0, 0.0, 0.0, 0.0));
+
// Editor background
- theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(dark_color_2, 4, 4, 4, 4));
+ theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(background_color, default_margin_size, default_margin_size, default_margin_size, default_margin_size));
// Focus
- Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(contrast_color_1, 4, 4, 4, 4);
- focus_sbt->set_draw_center(false);
- focus_sbt->set_border_width_all(1 * EDSCALE);
- focus_sbt = change_border_color(focus_sbt, contrast_color_2);
- theme->set_stylebox("Focus", "EditorStyles", focus_sbt);
+ Ref<StyleBoxFlat> style_focus = style_default->duplicate();
+ style_focus->set_draw_center(false);
+ style_focus->set_border_color_all(contrast_color_2);
+ theme->set_stylebox("Focus", "EditorStyles", style_focus);
// Menu
- Ref<StyleBoxEmpty> style_menu = make_empty_stylebox(4, 4, 4, 4);
+ Ref<StyleBoxEmpty> style_menu = style_empty;
theme->set_stylebox("panel", "PanelContainer", style_menu);
theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
+ // Script Editor
+ theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(4, 0, 4, 4));
+ theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
+
// Play button group
- theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_empty_stylebox(8, 4, 8, 4)); //make_stylebox(theme->get_icon("GuiPlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
+ theme->set_stylebox("PlayButtonPanel", "EditorStyles", style_empty); //make_stylebox(theme->get_icon("GuiPlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
//MenuButton
- Ref<StyleBoxFlat> style_menu_hover_border = make_flat_stylebox(highlight_color, 4, 4, 4, 4);
- Ref<StyleBoxFlat> style_menu_hover_bg = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
-
+ Ref<StyleBoxFlat> style_menu_hover_border = style_default->duplicate();
style_menu_hover_border->set_draw_center(false);
- style_menu_hover_border->set_border_width(MARGIN_BOTTOM, 2 * EDSCALE);
- style_menu_hover_border->set_border_color_all(highlight_color);
+ style_menu_hover_border->set_border_width_all(0);
+ style_menu_hover_border->set_border_width(MARGIN_BOTTOM, border_width);
+ style_menu_hover_border->set_border_color_all(accent_color);
+
+ Ref<StyleBoxFlat> style_menu_hover_bg = style_default->duplicate();
+ style_menu_hover_bg->set_border_width_all(0);
+ style_menu_hover_bg->set_bg_color(dark_color_1);
theme->set_stylebox("normal", "MenuButton", style_menu);
theme->set_stylebox("hover", "MenuButton", style_menu);
@@ -325,72 +432,53 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("disabled", "ToolButton", style_menu);
theme->set_color("font_color", "MenuButton", font_color);
- theme->set_color("font_color_hover", "MenuButton", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color_hover", "MenuButton", font_color_hl);
theme->set_color("font_color", "ToolButton", font_color);
- theme->set_color("font_color_hover", "ToolButton", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_pressed", "ToolButton", highlight_color);
+ theme->set_color("font_color_hover", "ToolButton", font_color_hl);
+ theme->set_color("font_color_pressed", "ToolButton", accent_color);
theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
- // Content of each tab
- Ref<StyleBoxFlat> style_content_panel = make_flat_stylebox(base_color, 4, 4, 4, 4);
- style_content_panel->set_border_color_all(base_color);
- style_content_panel->set_border_width_all(border_width);
- Ref<StyleBoxFlat> style_content_panel_vp = make_flat_stylebox(base_color, border_width, 4, border_width, border_width);
- style_content_panel_vp->set_border_color_all(base_color);
- style_content_panel_vp->set_border_width_all(border_width);
- theme->set_stylebox("panel", "TabContainer", style_content_panel);
- theme->set_stylebox("Content", "EditorStyles", style_content_panel_vp);
-
- Ref<StyleBoxFlat> style_button_type = make_flat_stylebox(dark_color_1, 6, 4, 6, 4);
- style_button_type->set_draw_center(true);
- style_button_type->set_border_width_all(border_width);
- style_button_type->set_border_color_all(contrast_color_2);
-
- Ref<StyleBoxFlat> style_button_type_disabled = change_border_color(style_button_type, contrast_color_1);
+ // Buttons
+ theme->set_stylebox("normal", "Button", style_widget);
+ theme->set_stylebox("hover", "Button", style_widget_hover);
+ theme->set_stylebox("pressed", "Button", style_widget_pressed);
+ theme->set_stylebox("focus", "Button", style_widget_focus);
+ theme->set_stylebox("disabled", "Button", style_widget_disabled);
- Color button_font_color = contrast_color_1.linear_interpolate(font_color, .6);
-
- // Button
- theme->set_stylebox("normal", "Button", style_button_type);
- theme->set_stylebox("hover", "Button", change_border_color(style_button_type, HIGHLIGHT_COLOR_FONT));
- theme->set_stylebox("pressed", "Button", change_border_color(style_button_type, highlight_color));
- theme->set_stylebox("focus", "Button", change_border_color(style_button_type, highlight_color));
- theme->set_stylebox("disabled", "Button", style_button_type_disabled);
-
- theme->set_color("font_color", "Button", button_font_color);
- theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_pressed", "Button", highlight_color);
+ theme->set_color("font_color", "Button", font_color);
+ theme->set_color("font_color_hover", "Button", font_color_hl);
+ theme->set_color("font_color_pressed", "Button", accent_color);
theme->set_color("font_color_disabled", "Button", font_color_disabled);
- theme->set_color("icon_color_hover", "Button", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("icon_color_hover", "Button", font_color_hl);
// make icon color value bigger because icon image is not complete white
- theme->set_color("icon_color_pressed", "Button", Color(highlight_color.r * 1.15, highlight_color.g * 1.15, highlight_color.b * 1.15, highlight_color.a));
+ theme->set_color("icon_color_pressed", "Button", Color(accent_color.r * 1.15, accent_color.g * 1.15, accent_color.b * 1.15, accent_color.a));
// OptionButton
- theme->set_stylebox("normal", "OptionButton", style_button_type);
- theme->set_stylebox("hover", "OptionButton", change_border_color(style_button_type, contrast_color_1));
- theme->set_stylebox("pressed", "OptionButton", change_border_color(style_button_type, HIGHLIGHT_COLOR_FONT));
- theme->set_stylebox("focus", "OptionButton", change_border_color(style_button_type, highlight_color));
- theme->set_stylebox("disabled", "OptionButton", style_button_type_disabled);
-
- theme->set_color("font_color", "OptionButton", button_font_color);
- theme->set_color("font_color_hover", "OptionButton", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_pressed", "OptionButton", highlight_color);
+ theme->set_stylebox("normal", "OptionButton", style_widget);
+ theme->set_stylebox("hover", "OptionButton", style_widget_hover);
+ theme->set_stylebox("pressed", "OptionButton", style_widget_pressed);
+ theme->set_stylebox("focus", "OptionButton", style_widget_focus);
+ theme->set_stylebox("disabled", "OptionButton", style_widget_disabled);
+
+ theme->set_color("font_color", "OptionButton", font_color);
+ theme->set_color("font_color_hover", "OptionButton", font_color_hl);
+ theme->set_color("font_color_pressed", "OptionButton", accent_color);
theme->set_color("font_color_disabled", "OptionButton", font_color_disabled);
- theme->set_color("icon_color_hover", "OptionButton", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("icon_color_hover", "OptionButton", font_color_hl);
theme->set_icon("arrow", "OptionButton", theme->get_icon("GuiOptionArrow", "EditorIcons"));
- theme->set_constant("arrow_margin", "OptionButton", 4);
+ theme->set_constant("arrow_margin", "OptionButton", 4 * EDSCALE);
theme->set_constant("modulate_arrow", "OptionButton", true);
// CheckButton
theme->set_icon("on", "CheckButton", theme->get_icon("GuiToggleOn", "EditorIcons"));
theme->set_icon("off", "CheckButton", theme->get_icon("GuiToggleOff", "EditorIcons"));
- theme->set_color("font_color", "CheckButton", button_font_color);
- theme->set_color("font_color_hover", "CheckButton", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_pressed", "CheckButton", highlight_color);
+ theme->set_color("font_color", "CheckButton", font_color);
+ theme->set_color("font_color_hover", "CheckButton", font_color_hl);
+ theme->set_color("font_color_pressed", "CheckButton", accent_color);
theme->set_color("font_color_disabled", "CheckButton", font_color_disabled);
- theme->set_color("icon_color_hover", "CheckButton", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("icon_color_hover", "CheckButton", font_color_hl);
// Checkbox
theme->set_icon("checked", "CheckBox", theme->get_icon("GuiChecked", "EditorIcons"));
@@ -398,21 +486,19 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
- theme->set_color("font_color", "CheckBox", button_font_color);
- theme->set_color("font_color_hover", "CheckBox", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_pressed", "CheckBox", highlight_color);
+ theme->set_color("font_color", "CheckBox", font_color);
+ theme->set_color("font_color_hover", "CheckBox", font_color_hl);
+ theme->set_color("font_color_pressed", "CheckBox", accent_color);
theme->set_color("font_color_disabled", "CheckBox", font_color_disabled);
- theme->set_color("icon_color_hover", "CheckBox", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("icon_color_hover", "CheckBox", font_color_hl);
// PopupMenu
- Ref<StyleBoxFlat> style_popup_menu = make_flat_stylebox(dark_color_1, 8, 8, 8, 8);
- style_popup_menu->set_border_width_all(MAX(EDSCALE, border_width));
- style_popup_menu->set_border_color_all(contrast_color_1);
+ Ref<StyleBoxFlat> style_popup_menu = style_popup;
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
theme->set_stylebox("separator", "PopupMenu", make_line_stylebox(separator_color, MAX(EDSCALE, border_width), 8 - MAX(EDSCALE, border_width)));
theme->set_color("font_color", "PopupMenu", font_color);
- theme->set_color("font_color_hover", "PopupMenu", HIGHLIGHT_COLOR_FONT);
- theme->set_color("font_color_accel", "PopupMenu", font_color);
+ theme->set_color("font_color_hover", "PopupMenu", font_color_hl);
+ theme->set_color("font_color_accel", "PopupMenu", font_color_disabled);
theme->set_color("font_color_disabled", "PopupMenu", font_color_disabled);
theme->set_icon("checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
@@ -420,8 +506,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
// Tree & ItemList background
- Ref<StyleBoxFlat> style_tree_bg = make_flat_stylebox(dark_color_1, 2, 4, 2, 4);
- style_tree_bg->set_border_width_all(border_width);
+ Ref<StyleBoxFlat> style_tree_bg = style_default->duplicate();
+ style_tree_bg->set_bg_color(dark_color_1);
style_tree_bg->set_border_color_all(dark_color_3);
theme->set_stylebox("bg", "Tree", style_tree_bg);
@@ -431,121 +517,147 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("arrow", "Tree", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
theme->set_icon("select_arrow", "Tree", theme->get_icon("GuiDropdown", "EditorIcons"));
- theme->set_stylebox("bg_focus", "Tree", focus_sbt);
+ theme->set_stylebox("bg_focus", "Tree", style_focus);
theme->set_stylebox("custom_button", "Tree", make_empty_stylebox());
theme->set_stylebox("custom_button_pressed", "Tree", make_empty_stylebox());
- theme->set_stylebox("custom_button_hover", "Tree", style_button_type);
- theme->set_color("custom_button_font_highlight", "Tree", HIGHLIGHT_COLOR_FONT);
+ theme->set_stylebox("custom_button_hover", "Tree", style_widget);
+ theme->set_color("custom_button_font_highlight", "Tree", font_color_hl);
theme->set_color("font_color", "Tree", font_color);
theme->set_color("font_color_selected", "Tree", font_color);
- Ref<StyleBox> style_tree_btn = make_flat_stylebox(contrast_color_1, 2, 4, 2, 4);
+ Ref<StyleBoxFlat> style_tree_btn = style_default->duplicate();
+ style_tree_btn->set_bg_color(contrast_color_1);
+ style_tree_btn->set_border_width_all(0);
theme->set_stylebox("button_pressed", "Tree", style_tree_btn);
- Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 2, 2, 2, 2);
+ Ref<StyleBoxFlat> style_tree_focus = style_default->duplicate();
+ style_tree_focus->set_bg_color(highlight_color);
+ style_tree_focus->set_border_width_all(0);
theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
- Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 2, 2, 2, 2);
+ Ref<StyleBoxFlat> style_tree_selected = style_tree_focus->duplicate();
theme->set_stylebox("selected", "Tree", style_tree_selected);
- Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_tree_cursor = style_default->duplicate();
style_tree_cursor->set_draw_center(false);
style_tree_cursor->set_border_width_all(border_width);
style_tree_cursor->set_border_color_all(contrast_color_1);
- Ref<StyleBoxFlat> style_tree_title = make_flat_stylebox(dark_color_3, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_tree_title = style_default->duplicate();
+ style_tree_title->set_bg_color(dark_color_3);
+ style_tree_title->set_border_width_all(0);
theme->set_stylebox("cursor", "Tree", style_tree_cursor);
theme->set_stylebox("cursor_unfocused", "Tree", style_tree_cursor);
theme->set_stylebox("title_button_normal", "Tree", style_tree_title);
theme->set_stylebox("title_button_hover", "Tree", style_tree_title);
theme->set_stylebox("title_button_pressed", "Tree", style_tree_title);
- Color prop_category_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.12) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.2);
- Color prop_section_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.09) : dark_color_1.linear_interpolate(Color(0, 1, 0, 1), 0.1);
- Color prop_subsection_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.06) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.1);
+ // Color prop_category_color = dark_color_1.linear_interpolate(mono_color, 0.12) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.2);
+ // Color prop_section_color = dark_color_1.linear_interpolate(mono_color, 0.09) : dark_color_1.linear_interpolate(Color(0, 1, 0, 1), 0.1);
+ // Color prop_subsection_color = dark_color_1.linear_interpolate(mono_color, 0.06) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.1);
+ Color prop_category_color = dark_color_1.linear_interpolate(mono_color, 0.12);
+ Color prop_section_color = dark_color_1.linear_interpolate(mono_color, 0.09);
+ Color prop_subsection_color = dark_color_1.linear_interpolate(mono_color, 0.06);
theme->set_color("prop_category", "Editor", prop_category_color);
theme->set_color("prop_section", "Editor", prop_section_color);
theme->set_color("prop_subsection", "Editor", prop_subsection_color);
- theme->set_color("drop_position_color", "Tree", highlight_color);
+ theme->set_color("drop_position_color", "Tree", accent_color);
// ItemList
- Ref<StyleBoxFlat> style_itemlist_bg = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_itemlist_bg = style_default->duplicate();
+ style_itemlist_bg->set_bg_color(dark_color_1);
style_itemlist_bg->set_border_width_all(border_width);
style_itemlist_bg->set_border_color_all(dark_color_3);
- Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 0, 0, 0, 0);
+ Ref<StyleBoxFlat> style_itemlist_cursor = style_default->duplicate();
style_itemlist_cursor->set_draw_center(false);
style_itemlist_cursor->set_border_width_all(border_width);
- style_itemlist_cursor->set_border_color_all(HIGHLIGHT_COLOR_BG);
+ style_itemlist_cursor->set_border_color_all(highlight_color);
theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor);
theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor);
theme->set_stylebox("selected_focus", "ItemList", style_tree_focus);
theme->set_stylebox("selected", "ItemList", style_tree_selected);
- theme->set_stylebox("bg_focus", "ItemList", focus_sbt);
+ theme->set_stylebox("bg_focus", "ItemList", style_focus);
theme->set_stylebox("bg", "ItemList", style_itemlist_bg);
theme->set_constant("vseparation", "ItemList", 5 * EDSCALE);
theme->set_color("font_color", "ItemList", font_color);
- Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(tab_color, 15, 5, 15, 5);
- Ref<StyleBoxFlat> style_tab_bg = make_flat_stylebox(tab_color, 15, 5, 15, 5);
- style_tab_bg->set_draw_center(false);
-
// Tabs & TabContainer
- theme->set_stylebox("tab_fg", "TabContainer", style_tab_fg);
- theme->set_stylebox("tab_bg", "TabContainer", style_tab_bg);
- theme->set_stylebox("tab_fg", "Tabs", style_tab_fg);
- theme->set_stylebox("tab_bg", "Tabs", style_tab_bg);
+ theme->set_stylebox("tab_fg", "TabContainer", style_tab_selected);
+ theme->set_stylebox("tab_bg", "TabContainer", style_tab_unselected);
+ theme->set_stylebox("tab_fg", "Tabs", style_tab_selected);
+ theme->set_stylebox("tab_bg", "Tabs", style_tab_unselected);
theme->set_color("font_color_fg", "TabContainer", font_color);
theme->set_color("font_color_bg", "TabContainer", font_color_disabled);
theme->set_color("font_color_fg", "Tabs", font_color);
theme->set_color("font_color_bg", "Tabs", font_color_disabled);
theme->set_icon("menu", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons"));
theme->set_icon("menu_hl", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons"));
- theme->set_stylebox("SceneTabFG", "EditorStyles", make_flat_stylebox(base_color, 10, 5, 10, 5));
- theme->set_stylebox("SceneTabBG", "EditorStyles", make_empty_stylebox(6, 5, 6, 5));
+ theme->set_stylebox("SceneTabFG", "EditorStyles", style_tab_selected);
+ theme->set_stylebox("SceneTabBG", "EditorStyles", style_tab_unselected);
theme->set_icon("close", "Tabs", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_stylebox("button_pressed", "Tabs", style_menu);
theme->set_stylebox("button", "Tabs", style_menu);
+ // Content of each tab
+ Ref<StyleBoxFlat> style_content_panel = style_default->duplicate();
+ style_content_panel->set_border_color_all(dark_color_3);
+ style_content_panel->set_border_width_all(border_width);
+ // compensate the border
+ style_content_panel->set_default_margin(MARGIN_TOP, margin_size_extra);
+ style_content_panel->set_default_margin(MARGIN_RIGHT, margin_size_extra);
+ style_content_panel->set_default_margin(MARGIN_BOTTOM, margin_size_extra);
+ style_content_panel->set_default_margin(MARGIN_LEFT, margin_size_extra);
+
+ // this is the stylebox used in 3d and 2d viewports (no borders)
+ Ref<StyleBoxFlat> style_content_panel_vp = style_content_panel->duplicate();
+ style_content_panel_vp->set_default_margin(MARGIN_LEFT, border_width * 2);
+ style_content_panel_vp->set_default_margin(MARGIN_TOP, default_margin_size);
+ style_content_panel_vp->set_default_margin(MARGIN_RIGHT, border_width * 2);
+ style_content_panel_vp->set_default_margin(MARGIN_BOTTOM, border_width * 2);
+ theme->set_stylebox("panel", "TabContainer", style_content_panel);
+ theme->set_stylebox("Content", "EditorStyles", style_content_panel_vp);
+
// Separators (no separators)
theme->set_stylebox("separator", "HSeparator", make_line_stylebox(separator_color, border_width));
theme->set_stylebox("separator", "VSeparator", make_line_stylebox(separator_color, border_width, 0, true));
- // Debugger
- Ref<StyleBoxFlat> style_panel_debugger = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
- theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
-
- Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
- Ref<StyleBoxFlat> style_tab_bg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
- style_tab_bg_debugger->set_draw_center(false);
+ // HACK Debuger panel
+ Ref<StyleBoxFlat> style_panel_debugger = style_content_panel->duplicate();
+ const int v_offset = theme->get_font("font", "Tabs")->get_height() + style_tab_selected->get_minimum_size().height + default_margin_size * EDSCALE;
+ style_panel_debugger->set_expand_margin_size(MARGIN_TOP, -v_offset);
+ theme->set_stylebox("debugger_panel", "EditorStyles", style_panel_debugger);
+ // Debugger
+ Ref<StyleBoxFlat> style_debugger_contents = style_content_panel->duplicate();
+ style_debugger_contents->set_default_margin(MARGIN_LEFT, 0);
+ style_debugger_contents->set_default_margin(MARGIN_BOTTOM, 0);
+ style_debugger_contents->set_default_margin(MARGIN_RIGHT, 0);
+ style_debugger_contents->set_border_width_all(0);
+ style_debugger_contents->set_expand_margin_size(MARGIN_TOP, -v_offset);
+ theme->set_stylebox("DebuggerPanel", "EditorStyles", style_debugger_contents);
+ Ref<StyleBoxFlat> style_tab_fg_debugger = style_tab_selected->duplicate();
+ style_tab_fg_debugger->set_expand_margin_size(MARGIN_LEFT, default_margin_size * EDSCALE + border_width);
+ style_tab_fg_debugger->set_default_margin(MARGIN_LEFT, tab_default_margin_side - default_margin_size * EDSCALE);
theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_fg_debugger);
+ Ref<StyleBoxFlat> style_tab_bg_debugger = style_tab_unselected->duplicate();
+ style_tab_bg_debugger->set_expand_margin_size(MARGIN_LEFT, default_margin_size * EDSCALE + border_width);
+ style_tab_bg_debugger->set_default_margin(MARGIN_LEFT, tab_default_margin_side - default_margin_size * EDSCALE);
theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_bg_debugger);
// LineEdit
- Ref<StyleBoxFlat> style_line_edit = make_flat_stylebox(dark_color_1, 6, 4, 6, 4);
- style_line_edit->set_border_width_all(border_width);
- style_line_edit = change_border_color(style_line_edit, contrast_color_1);
- Ref<StyleBoxFlat> style_line_edit_disabled = change_border_color(style_line_edit, dark_color_1);
- style_line_edit_disabled->set_bg_color(Color(0, 0, 0, .1));
- Ref<StyleBoxFlat> style_line_edit_focus = change_border_color(style_line_edit, highlight_color);
- theme->set_stylebox("normal", "LineEdit", style_line_edit);
- theme->set_stylebox("focus", "LineEdit", style_line_edit_focus);
- theme->set_stylebox("read_only", "LineEdit", style_line_edit_disabled);
+ theme->set_stylebox("normal", "LineEdit", style_widget);
+ theme->set_stylebox("focus", "LineEdit", style_widget_focus);
+ theme->set_stylebox("read_only", "LineEdit", style_widget_disabled);
theme->set_color("read_only", "LineEdit", font_color_disabled);
theme->set_color("font_color", "LineEdit", font_color);
theme->set_color("cursor_color", "LineEdit", font_color);
// TextEdit
- Ref<StyleBoxFlat> style_textedit_normal(memnew(StyleBoxFlat));
- style_textedit_normal->set_bg_color(dark_color_2);
- style_textedit_normal->set_default_margin(MARGIN_LEFT, 0);
- style_textedit_normal->set_default_margin(MARGIN_RIGHT, 0);
- style_textedit_normal->set_default_margin(MARGIN_BOTTOM, 0);
- style_textedit_normal->set_default_margin(MARGIN_TOP, 0);
- theme->set_stylebox("normal", "TextEdit", style_textedit_normal);
- theme->set_stylebox("focus", "TextEdit", focus_sbt);
+ theme->set_stylebox("normal", "TextEdit", style_widget);
+ theme->set_stylebox("focus", "TextEdit", style_widget_hover);
theme->set_constant("side_margin", "TabContainer", 0);
+ theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons"));
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));
@@ -554,13 +666,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("grabber", "VSplitContainer", theme->get_icon("GuiVsplitter", "EditorIcons"));
theme->set_icon("grabber", "HSplitContainer", theme->get_icon("GuiHsplitter", "EditorIcons"));
- theme->set_constant("separation", "HSplitContainer", 8 * EDSCALE);
- theme->set_constant("separation", "VSplitContainer", 8 * EDSCALE);
+ theme->set_constant("separation", "HSplitContainer", default_margin_size * 2 * EDSCALE);
+ theme->set_constant("separation", "VSplitContainer", default_margin_size * 2 * EDSCALE);
// WindowDialog
- Ref<StyleBoxFlat> style_window = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
- style_window->set_border_width_all(MAX(EDSCALE, border_width));
- style_window->set_border_color_all(base_color);
+ Ref<StyleBoxFlat> style_window = style_popup->duplicate();
+ style_window->set_border_color_all(tab_color);
style_window->set_border_width(MARGIN_TOP, 24 * EDSCALE);
style_window->set_expand_margin_size(MARGIN_TOP, 24 * EDSCALE);
theme->set_stylebox("panel", "WindowDialog", style_window);
@@ -571,6 +682,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("close_v_ofs", "WindowDialog", 20 * EDSCALE);
theme->set_constant("title_height", "WindowDialog", 24 * EDSCALE);
+ // complex window, for now only Editor settings and Project settings
+ Ref<StyleBoxFlat> style_complex_window = style_window->duplicate();
+ style_complex_window->set_bg_color(dark_color_2);
+ style_complex_window->set_border_color_all(highlight_tabs ? tab_color : dark_color_2);
+ theme->set_stylebox("panel", "EditorSettingsDialog", style_complex_window);
+ theme->set_stylebox("panel", "ProjectSettingsEditor", style_complex_window);
+ theme->set_stylebox("panel", "EditorAbout", style_complex_window);
+
// HScrollBar
Ref<Texture> empty_icon = memnew(ImageTexture);
@@ -598,21 +717,33 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
// HSlider
- theme->set_stylebox("slider", "HSlider", make_stylebox(theme->get_icon("GuiHsliderBg", "EditorIcons"), 4, 4, 4, 4));
- theme->set_icon("grabber", "HSlider", theme->get_icon("GuiSliderGrabber", "EditorIcons"));
theme->set_icon("grabber_highlight", "HSlider", theme->get_icon("GuiSliderGrabberHl", "EditorIcons"));
+ theme->set_icon("grabber", "HSlider", theme->get_icon("GuiSliderGrabber", "EditorIcons"));
+ theme->set_stylebox("slider", "HSlider", make_flat_stylebox(dark_color_3, 0, default_margin_size / 2, 0, default_margin_size / 2));
+ theme->set_stylebox("grabber_area", "HSlider", make_flat_stylebox(contrast_color_1, 0, default_margin_size / 2, 0, default_margin_size / 2));
// VSlider
- theme->set_stylebox("slider", "VSlider", make_stylebox(theme->get_icon("GuiVsliderBg", "EditorIcons"), 4, 4, 4, 4));
theme->set_icon("grabber", "VSlider", theme->get_icon("GuiSliderGrabber", "EditorIcons"));
theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("GuiSliderGrabberHl", "EditorIcons"));
+ theme->set_stylebox("slider", "VSlider", make_flat_stylebox(dark_color_3, default_margin_size / 2, 0, default_margin_size / 2, 0));
+ theme->set_stylebox("grabber_area", "VSlider", make_flat_stylebox(contrast_color_1, default_margin_size / 2, 0, default_margin_size / 2, 0));
//RichTextLabel
Color rtl_combined_bg_color = dark_color_1.linear_interpolate(script_bg_color, script_bg_color.a);
- Color rtl_font_color = (rtl_combined_bg_color.r + rtl_combined_bg_color.g + rtl_combined_bg_color.b > 0.5 * 3) ? Color(0, 0, 0) : Color(1, 1, 1);
+ Color rtl_mono_color = (rtl_combined_bg_color.r + rtl_combined_bg_color.g + rtl_combined_bg_color.b > 1.5) ? Color(0, 0, 0) : Color(1, 1, 1);
+ Color rtl_font_color = rtl_mono_color.linear_interpolate(rtl_combined_bg_color, 0.25);
theme->set_color("default_color", "RichTextLabel", rtl_font_color);
theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox());
- theme->set_stylebox("normal", "RichTextLabel", make_flat_stylebox(script_bg_color, 6, 6, 6, 6));
+ theme->set_stylebox("normal", "RichTextLabel", style_tree_bg);
+ Ref<StyleBoxFlat> style_code = style_tree_bg->duplicate();
+ style_code->set_bg_color(rtl_combined_bg_color);
+ theme->set_stylebox("code_normal", "RichTextLabel", style_code);
+ Ref<StyleBoxFlat> style_code_focus = style_tree_focus->duplicate();
+ style_code_focus->set_bg_color(rtl_combined_bg_color);
+ theme->set_stylebox("code_focus", "RichTextLabel", style_code_focus);
+
+ theme->set_color("font_color", "RichTextLabel", rtl_font_color);
+ theme->set_color("highlight_color", "RichTextLabel", rtl_mono_color);
// Panel
theme->set_stylebox("panel", "Panel", make_flat_stylebox(dark_color_1, 6, 4, 6, 4));
@@ -621,18 +752,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color", "Label", font_color);
// TooltipPanel
- Ref<StyleBoxFlat> style_tooltip = make_flat_stylebox(Color(1, 1, 1, 0.8), 8, 8, 8, 8);
+ Ref<StyleBoxFlat> style_tooltip = style_popup->duplicate();
+ style_tooltip->set_bg_color(Color(mono_color.r, mono_color.g, mono_color.b, 0.9));
style_tooltip->set_border_width_all(border_width);
- style_tooltip->set_border_color_all(HIGHLIGHT_COLOR_FONT);
+ style_tooltip->set_border_color_all(mono_color);
theme->set_color("font_color", "TooltipPanel", font_color);
theme->set_stylebox("panel", "TooltipPanel", style_tooltip);
// PopupPanel
- Ref<StyleBoxFlat> style_dock_select = make_flat_stylebox(base_color);
- style_dock_select->set_border_color_all(contrast_color_1);
- style_dock_select->set_expand_margin_size_all(2);
- style_dock_select->set_border_width_all(2);
- theme->set_stylebox("panel", "PopupPanel", style_dock_select);
+ theme->set_stylebox("panel", "PopupPanel", style_popup);
// SpinBox
theme->set_icon("updown", "SpinBox", theme->get_icon("GuiSpinboxUpdown", "EditorIcons"));
@@ -643,21 +771,24 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color", "ProgressBar", font_color);
// GraphEdit
- theme->set_stylebox("bg", "GraphEdit", make_flat_stylebox(dark_color_2, 4, 4, 4, 4));
- theme->set_color("grid_major", "GraphEdit", Color(font_color.r, font_color.g, font_color.b, 0.2));
- theme->set_color("grid_minor", "GraphEdit", Color(font_color_disabled.r, font_color_disabled.g, font_color_disabled.b, 0.2));
+ theme->set_stylebox("bg", "GraphEdit", style_tree_bg);
+ theme->set_color("grid_major", "GraphEdit", Color(font_color.r, font_color.g, font_color.b, 0.1));
+ theme->set_color("grid_minor", "GraphEdit", Color(font_color_disabled.r, font_color_disabled.g, font_color_disabled.b, 0.05));
theme->set_icon("minus", "GraphEdit", theme->get_icon("ZoomLess", "EditorIcons"));
theme->set_icon("more", "GraphEdit", theme->get_icon("ZoomMore", "EditorIcons"));
theme->set_icon("reset", "GraphEdit", theme->get_icon("ZoomReset", "EditorIcons"));
// GraphNode
+
Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
graphsb->set_border_width_all(border_width);
graphsb->set_border_color_all(Color(1, 1, 1, 0.6));
graphsb->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
graphsbselected->set_border_width_all(border_width);
- graphsbselected->set_border_color_all(Color(1, 1, 1, 0.9));
+ graphsbselected->set_border_color_all(Color(accent_color.r, accent_color.g, accent_color.b, 0.9));
+ graphsbselected->set_shadow_size(8 * EDSCALE);
+ graphsbselected->set_shadow_color(shadow_color);
graphsbselected->set_border_width(MARGIN_TOP, 22 * EDSCALE + border_width);
Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
graphsbcomment->set_border_width_all(border_width);
@@ -673,9 +804,81 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
// FileDialog
- Color disable_color = contrast_color_2;
- disable_color.a = 0.7;
- theme->set_color("files_disabled", "FileDialog", disable_color);
+ theme->set_color("files_disabled", "FileDialog", font_color_disabled);
+
+ // adaptive script theme constants
+ // for comments and elements with lower relevance
+ const Color dim_color = Color(font_color.r, font_color.g, font_color.b, 0.5);
+
+ const float mono_value = mono_color.r;
+ const Color alpha1 = Color(mono_value, mono_value, mono_value, 0.1);
+ const Color alpha2 = Color(mono_value, mono_value, mono_value, 0.3);
+ const Color alpha3 = Color(mono_value, mono_value, mono_value, 0.5);
+ const Color alpha4 = Color(mono_value, mono_value, mono_value, 0.7);
+
+ // editor main color
+ const Color main_color = Color::html(dark_theme ? "#57b3ff" : "#0480ff");
+
+ const Color symbol_color = Color::html("#5792ff").linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color keyword_color = main_color.linear_interpolate(mono_color, 0.4);
+ const Color basetype_color = Color::html(dark_theme ? "#42ffc2" : "#00c161");
+ const Color type_color = basetype_color.linear_interpolate(mono_color, dark_theme ? 0.7 : 0.5);
+ const Color comment_color = dim_color;
+ const Color string_color = Color::html(dark_theme ? "#ffd942" : "#ffd118").linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+
+ const Color te_background_color = Color(0, 0, 0, 0);
+ const Color completion_background_color = base_color;
+ const Color completion_selected_color = alpha1;
+ const Color completion_existing_color = alpha2;
+ const Color completion_scroll_color = alpha1;
+ const Color completion_font_color = font_color;
+ const Color text_color = font_color;
+ const Color line_number_color = dim_color;
+ const Color caret_color = mono_color;
+ const Color caret_background_color = mono_color.inverted();
+ const Color text_selected_color = dark_color_3;
+ const Color selection_color = alpha3;
+ const Color brace_mismatch_color = error_color;
+ const Color current_line_color = alpha1;
+ const Color line_length_guideline_color = warning_color;
+ const Color word_highlighted_color = alpha1;
+ const Color number_color = basetype_color.linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color function_color = main_color;
+ const Color member_variable_color = mono_color;
+ const Color mark_color = Color(error_color.r, error_color.g, error_color.b, 0.3);
+ const Color breakpoint_color = error_color;
+ const Color search_result_color = alpha1;
+ const Color search_result_border_color = alpha4;
+
+ theme->set_color("text_editor/theme/symbol_color", "Editor", symbol_color);
+ theme->set_color("text_editor/theme/keyword_color", "Editor", keyword_color);
+ theme->set_color("text_editor/theme/basetype_color", "Editor", basetype_color);
+ theme->set_color("text_editor/theme/type_color", "Editor", type_color);
+ theme->set_color("text_editor/theme/comment_color", "Editor", comment_color);
+ theme->set_color("text_editor/theme/string_color", "Editor", string_color);
+ theme->set_color("text_editor/theme/background_color", "Editor", te_background_color);
+ theme->set_color("text_editor/theme/completion_background_color", "Editor", completion_background_color);
+ theme->set_color("text_editor/theme/completion_selected_color", "Editor", completion_selected_color);
+ theme->set_color("text_editor/theme/completion_existing_color", "Editor", completion_existing_color);
+ theme->set_color("text_editor/theme/completion_scroll_color", "Editor", completion_scroll_color);
+ theme->set_color("text_editor/theme/completion_font_color", "Editor", completion_font_color);
+ theme->set_color("text_editor/theme/text_color", "Editor", text_color);
+ theme->set_color("text_editor/theme/line_number_color", "Editor", line_number_color);
+ theme->set_color("text_editor/theme/caret_color", "Editor", caret_color);
+ theme->set_color("text_editor/theme/caret_background_color", "Editor", caret_background_color);
+ theme->set_color("text_editor/theme/text_selected_color", "Editor", text_selected_color);
+ theme->set_color("text_editor/theme/selection_color", "Editor", selection_color);
+ theme->set_color("text_editor/theme/brace_mismatch_color", "Editor", brace_mismatch_color);
+ theme->set_color("text_editor/theme/current_line_color", "Editor", current_line_color);
+ theme->set_color("text_editor/theme/line_length_guideline_color", "Editor", line_length_guideline_color);
+ theme->set_color("text_editor/theme/word_highlighted_color", "Editor", word_highlighted_color);
+ theme->set_color("text_editor/theme/number_color", "Editor", number_color);
+ theme->set_color("text_editor/theme/function_color", "Editor", function_color);
+ theme->set_color("text_editor/theme/member_variable_color", "Editor", member_variable_color);
+ theme->set_color("text_editor/theme/mark_color", "Editor", mark_color);
+ theme->set_color("text_editor/theme/breakpoint_color", "Editor", breakpoint_color);
+ theme->set_color("text_editor/theme/search_result_color", "Editor", search_result_color);
+ theme->set_color("text_editor/theme/search_result_border_color", "Editor", search_result_border_color);
return theme;
}
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index ba90beee22..fccf7c323c 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -34,7 +34,7 @@
#include "io/marshalls.h"
//#define DEBUG_PRINT(m_p) print_line(m_p)
-#define DEBUG_TIME(m_what) printf("MS: %s - %lli\n", m_what, OS::get_singleton()->get_ticks_usec());
+#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec());
//#define DEBUG_TIME(m_what)
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index a66d1724a1..f0ace864e4 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -143,11 +143,7 @@ void FileSystemDock::_notification(int p_what) {
//button_instance->set_icon( get_icon("Add","EditorIcons"));
//button_open->set_icon( get_icon("Folder","EditorIcons"));
button_back->set_icon(get_icon("Filesystem", "EditorIcons"));
- if (display_mode == DISPLAY_THUMBNAILS) {
- button_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
- } else {
- button_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
- }
+ _update_file_display_toggle_button();
button_display_mode->connect("pressed", this, "_change_file_display");
//file_options->set_icon( get_icon("Tools","EditorIcons"));
files->connect("item_activated", this, "_select_file");
@@ -204,20 +200,13 @@ void FileSystemDock::_notification(int p_what) {
button_reload->set_icon(get_icon("Reload", "EditorIcons"));
button_favorite->set_icon(get_icon("Favorites", "EditorIcons"));
button_back->set_icon(get_icon("Filesystem", "EditorIcons"));
- if (display_mode == DISPLAY_THUMBNAILS) {
- button_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
- } else {
- button_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
- }
+ _update_file_display_toggle_button();
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
button_hist_next->set_icon(get_icon("Forward", "EditorIcons"));
button_hist_prev->set_icon(get_icon("Back", "EditorIcons"));
- Theme::get_default()->clear_icon("ResizedFolder", "EditorIcons");
- Theme::get_default()->clear_icon("ResizedFile", "EditorIcons");
-
if (new_mode != display_mode) {
set_display_mode(new_mode);
} else {
@@ -354,15 +343,22 @@ void FileSystemDock::_thumbnail_done(const String &p_path, const Ref<Texture> &p
}
}
-void FileSystemDock::_change_file_display() {
+void FileSystemDock::_update_file_display_toggle_button() {
if (button_display_mode->is_pressed()) {
display_mode = DISPLAY_LIST;
button_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
+ button_display_mode->set_tooltip(TTR("View items as a grid of thumbnails"));
} else {
display_mode = DISPLAY_THUMBNAILS;
button_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
+ button_display_mode->set_tooltip(TTR("View items as a list"));
}
+}
+
+void FileSystemDock::_change_file_display() {
+
+ _update_file_display_toggle_button();
EditorSettings::get_singleton()->set("docks/filesystem/display_mode", display_mode);
@@ -426,8 +422,10 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
Ref<Texture> file_thumbnail;
Ref<Texture> file_thumbnail_broken;
+ bool always_show_folders = EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders");
+
bool use_thumbnails = (display_mode == DISPLAY_THUMBNAILS);
- bool use_folders = search_box->get_text().length() == 0 && split_mode;
+ bool use_folders = search_box->get_text().length() == 0 && (split_mode || always_show_folders);
if (use_thumbnails) { //thumbnails
@@ -437,39 +435,15 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
files->set_max_text_lines(2);
files->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
- if (!has_icon("ResizedFolder", "EditorIcons")) {
- Ref<ImageTexture> folder = get_icon("FolderBig", "EditorIcons");
- Ref<Image> img = folder->get_data();
- img = img->duplicate();
- img->resize(thumbnail_size, thumbnail_size);
- Ref<ImageTexture> resized_folder = Ref<ImageTexture>(memnew(ImageTexture));
- resized_folder->create_from_image(img, 0);
- Theme::get_default()->set_icon("ResizedFolder", "EditorIcons", resized_folder);
- }
-
- folder_thumbnail = get_icon("ResizedFolder", "EditorIcons");
-
- if (!has_icon("ResizedFile", "EditorIcons")) {
- Ref<ImageTexture> file = get_icon("FileBig", "EditorIcons");
- Ref<Image> img = file->get_data();
- img->resize(thumbnail_size, thumbnail_size);
- Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
- resized_file->create_from_image(img, 0);
- Theme::get_default()->set_icon("ResizedFile", "EditorIcons", resized_file);
- }
-
- if (!has_icon("ResizedFileBroken", "EditorIcons")) {
- Ref<ImageTexture> file = get_icon("FileBigBroken", "EditorIcons");
- Ref<Image> img = file->get_data();
- img->resize(thumbnail_size, thumbnail_size);
- Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
- resized_file->create_from_image(img, 0);
- Theme::get_default()->set_icon("ResizedFileBroken", "EditorIcons", resized_file);
+ if (thumbnail_size < 64) {
+ folder_thumbnail = get_icon("FolderMediumThumb", "EditorIcons");
+ file_thumbnail = get_icon("FileMediumThumb", "EditorIcons");
+ file_thumbnail_broken = get_icon("FileDeadMediumThumb", "EditorIcons");
+ } else {
+ folder_thumbnail = get_icon("FolderBigThumb", "EditorIcons");
+ file_thumbnail = get_icon("FileBigThumb", "EditorIcons");
+ file_thumbnail_broken = get_icon("FileDeadBigThumb", "EditorIcons");
}
-
- file_thumbnail = get_icon("ResizedFile", "EditorIcons");
-
- file_thumbnail_broken = get_icon("ResizedFileBroken", "EditorIcons");
} else {
files->set_icon_mode(ItemList::ICON_MODE_LEFT);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index a35b145085..aec049ba43 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -144,6 +144,7 @@ private:
void _file_option(int p_option);
void _folder_option(int p_option);
void _update_files(bool p_keep_selection);
+ void _update_file_display_toggle_button();
void _change_file_display();
void _fs_changed();
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 534a8186a5..e28c229a38 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -39,18 +39,44 @@ def make_editor_icons_action(target, source, env):
s.write(icons_string.getvalue())
s.write('};\n\n')
s.write("static const char *editor_icons_names[] = {\n")
+
+ # this is used to store the indices of thumbnail icons
+ thumb_medium_indices = [];
+ thumb_big_indices = [];
+ index = 0
for f in svg_icons:
fname = str(f)
icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ if icon_name.endswith("MediumThumb"): # dont know a better way to handle this
+ thumb_medium_indices.append(str(index))
+ if icon_name.endswith("BigThumb"): # dont know a better way to handle this
+ thumb_big_indices.append(str(index))
s.write('\t"%s"' % icon_name)
if fname != svg_icons[-1]:
s.write(",")
s.write('\n')
+
+ index += 1
+
s.write('};\n')
+
+ if thumb_medium_indices:
+ s.write("\n\n")
+ s.write("static const int editor_md_thumbs_count = %s;\n" % len(thumb_medium_indices))
+ s.write("static const int editor_md_thumbs_indices[] = {")
+ s.write(", ".join(thumb_medium_indices))
+ s.write("};\n")
+ if thumb_big_indices:
+ s.write("\n\n")
+ s.write("static const int editor_bg_thumbs_count = %s;\n" % len(thumb_big_indices))
+ s.write("static const int editor_bg_thumbs_indices[] = {")
+ s.write(", ".join(thumb_big_indices))
+ s.write("};\n")
+
s.write("#endif\n")
diff --git a/editor/icons/icon_GUI_hslider_bg.svg b/editor/icons/icon_GUI_hslider_bg.svg
deleted file mode 100644
index e298d06c4c..0000000000
--- a/editor/icons/icon_GUI_hslider_bg.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="1" y="1041.4" width="14" height="6" ry="0" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_GUI_tab.svg b/editor/icons/icon_GUI_tab.svg
new file mode 100644
index 0000000000..3eed0680c0
--- /dev/null
+++ b/editor/icons/icon_GUI_tab.svg
@@ -0,0 +1,5 @@
+<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1044.4)">
+<path transform="translate(0 1044.4)" d="m6 0v8h2v-8h-2zm-5.0137 0.0019531a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l2.293 2.293-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l3-3a1.0001 1.0001 0 0 0 0 -1.4141l-3-3a1 1 0 0 0 -0.7207 -0.29102z" fill="#fff" fill-opacity=".19608"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_GUI_vslider_bg.svg b/editor/icons/icon_GUI_vslider_bg.svg
deleted file mode 100644
index 99d01420b6..0000000000
--- a/editor/icons/icon_GUI_vslider_bg.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="6" y="1037.4" width="4" height="14" ry="0" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_class_list.svg b/editor/icons/icon_class_list.svg
index 1f2b37bd25..87a20743c7 100644
--- a/editor/icons/icon_class_list.svg
+++ b/editor/icons/icon_class_list.svg
@@ -1,11 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<rect x="1" y="1038.4" width="5" height=".99998"/>
-<rect x="6" y="1037.4" width="6" height="3"/>
-<rect x="3" y="1038.4" width="1" height="11"/>
-<rect x="4" y="1043.4" width="5" height="1"/>
-<rect x="9" y="1042.4" width="6" height="3"/>
-<rect x="4" y="1048.4" width="5" height="1"/>
-<rect x="9" y="1047.4" width="6" height="3"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m6 1v1h-5v1h2v10h1 5v1h6v-3h-6v1h-5v-4h5v1h6v-3h-6v1h-5v-4h2v1h6v-3h-6z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_file.svg b/editor/icons/icon_file.svg
new file mode 100644
index 0000000000..67a081a704
--- /dev/null
+++ b/editor/icons/icon_file.svg
@@ -0,0 +1,7 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 1036.4)" d="m2 1v14h12v-9h-5v-5zm8 0v4h4z" fill="#e0e0e0"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_file_big.svg b/editor/icons/icon_file_big_thumb.svg
index 569b449a59..569b449a59 100644
--- a/editor/icons/icon_file_big.svg
+++ b/editor/icons/icon_file_big_thumb.svg
diff --git a/editor/icons/icon_file_big_broken.svg b/editor/icons/icon_file_broken_big_thumb.svg
index 167bb1bb5f..167bb1bb5f 100644
--- a/editor/icons/icon_file_big_broken.svg
+++ b/editor/icons/icon_file_broken_big_thumb.svg
diff --git a/editor/icons/icon_file_dead.svg b/editor/icons/icon_file_dead.svg
new file mode 100644
index 0000000000..e0aee6fd90
--- /dev/null
+++ b/editor/icons/icon_file_dead.svg
@@ -0,0 +1,7 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 1036.4)" d="m2 1v14h12v-9h-5v-5zm8 0v4h4zm-6.0078 6c0.1353-0.0020779 0.26567 0.050774 0.36133 0.14648l0.64648 0.64648 0.64648-0.64648c0.09183-0.091882 0.21582-0.14442 0.3457-0.14648 0.1353-0.00208 0.26567 0.050774 0.36133 0.14648 0.19521 0.19525 0.19521 0.51178 0 0.70703l-0.64648 0.64648 0.64648 0.64648c0.19521 0.19525 0.19521 0.51178 0 0.70703-0.19525 0.19521-0.51178 0.19521-0.70703 0l-0.64648-0.64648-0.64648 0.64648c-0.19525 0.19521-0.51178 0.19521-0.70703 0-0.19521-0.19525-0.19521-0.51178 0-0.70703l0.64648-0.64648-0.64648-0.64648c-0.19521-0.19525-0.19521-0.51178 0-0.70703 0.09183-0.091882 0.21582-0.14442 0.3457-0.14648zm6 0c0.1353-0.00208 0.26567 0.050774 0.36133 0.14648l0.64648 0.64648 0.64648-0.64648c0.09183-0.091883 0.21582-0.14442 0.3457-0.14648 0.1353-0.00208 0.26567 0.050774 0.36133 0.14648 0.19521 0.19525 0.19521 0.51178 0 0.70703l-0.64648 0.64648 0.64648 0.64648c0.19521 0.19525 0.19521 0.51178 0 0.70703-0.19525 0.19521-0.51178 0.19521-0.70703 0l-0.64648-0.64648-0.64648 0.64648c-0.19525 0.19521-0.51178 0.19521-0.70703 0-0.19521-0.19525-0.19521-0.51178 0-0.70703l0.64648-0.64648-0.64648-0.64648c-0.19521-0.19525-0.19521-0.51178 0-0.70703 0.09183-0.091882 0.21582-0.14442 0.3457-0.14648zm-6.4922 4h9c0.277 0 0.5 0.223 0.5 0.5s-0.223 0.5-0.5 0.5h-4.5c0 1.1046-0.89543 2-2 2s-2-0.8954-2-2h-0.5c-0.277 0-0.5-0.223-0.5-0.5s0.223-0.5 0.5-0.5zm1.5 1c-1.9e-5 0.5523 0.44771 1 1 1s1-0.4477 1-1z" fill="#ff8484"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_file_big_dead.svg b/editor/icons/icon_file_dead_big_thumb.svg
index c8aab912f1..c8aab912f1 100644
--- a/editor/icons/icon_file_big_dead.svg
+++ b/editor/icons/icon_file_dead_big_thumb.svg
diff --git a/editor/icons/icon_file_dead_medium_thumb.svg b/editor/icons/icon_file_dead_medium_thumb.svg
new file mode 100644
index 0000000000..60a456a600
--- /dev/null
+++ b/editor/icons/icon_file_dead_medium_thumb.svg
@@ -0,0 +1,7 @@
+<svg width="32" height="32" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1020.4)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 1020.4)" d="m5 1c-1.6447 0-3 1.3553-3 3v24c0 1.6447 1.3553 3 3 3h22c1.6447 0 3-1.3553 3-3v-16.809c-5.1e-5 -0.2652-0.10543-0.51952-0.29297-0.70703l-9.1816-9.1895c-0.18719-0.18825-0.44155-0.29435-0.70703-0.29492h-14.818zm0 2h14v6c0 1.6447 1.3553 3 3 3h6v16c0 0.5713-0.42868 1-1 1h-22c-0.57133 0-1-0.4287-1-1v-24c0-0.5713 0.42867-1 1-1zm1.9863 11.002a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l1.293 1.293-1.293 1.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l1.293-1.293 1.293 1.293a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-1.293-1.293 1.293-1.293a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.7207 -0.29102 1 1 0 0 0 -0.69336 0.29102l-1.293 1.293-1.293-1.293a1 1 0 0 0 -0.7207 -0.29102zm14 0a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l1.293 1.293-1.293 1.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l1.293-1.293 1.293 1.293a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-1.293-1.293 1.293-1.293a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.7207 -0.29102 1 1 0 0 0 -0.69336 0.29102l-1.293 1.293-1.293-1.293a1 1 0 0 0 -0.7207 -0.29102zm-13.986 7.998a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h1a4 4 0 0 0 2 3.4648 4 4 0 0 0 4 0 4 4 0 0 0 2 -3.4648h9a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-18zm3 2h4a2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff8484" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_file_medium_thumb.svg b/editor/icons/icon_file_medium_thumb.svg
new file mode 100644
index 0000000000..a143aa5c8f
--- /dev/null
+++ b/editor/icons/icon_file_medium_thumb.svg
@@ -0,0 +1,7 @@
+<svg width="32" height="32" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1020.4)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 1020.4)" d="m5 1c-1.6447 0-3 1.3553-3 3v24c0 1.6447 1.3553 3 3 3h22c1.6447 0 3-1.3553 3-3v-16.809c-5.1e-5 -0.2652-0.10543-0.51952-0.29297-0.70703l-9.1816-9.1895c-0.18719-0.18825-0.44155-0.29435-0.70703-0.29492zm0 2h14v6c0 1.6447 1.3553 3 3 3h6v16c0 0.5713-0.42868 1-1 1h-22c-0.57133 0-1-0.4287-1-1v-24c0-0.5713 0.42867-1 1-1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fff" fill-opacity=".58824" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_filesystem.svg b/editor/icons/icon_filesystem.svg
new file mode 100644
index 0000000000..41e0348d68
--- /dev/null
+++ b/editor/icons/icon_filesystem.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m1 1v5h2v8h1 5v1h6v-3h-6v1h-5v-4h5v1h6v-3h-6v1h-5v-2h3v-4h-2l-1-1h-3z" fill="#e0e0e0"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_folder_big.svg b/editor/icons/icon_folder_big.svg
deleted file mode 100644
index 1c0cd3584e..0000000000
--- a/editor/icons/icon_folder_big.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<path transform="translate(0 988.36)" d="m13 11.996a5.0039 5.0039 0 0 0 -5.0039 5.0039 5.0039 5.0039 0 0 0 0.0039062 0.11719v2.8828 8 22.92a5.0039 5.0039 0 0 0 -0.0039062 0.076172 5.0039 5.0039 0 0 0 5.0039 5.0039h37.996a5.0039 5.0039 0 0 0 5.0039 -5.0039v-25.916a5.0039 5.0039 0 0 0 0.003906 -0.076172 5.0039 5.0039 0 0 0 -5.0039 -5.0039h-11v-0.039062a3.5 3.5 0 0 1 -0.5 0.039062 3.5 3.5 0 0 1 -3.5 -3.5v0.38281a5.0039 5.0039 0 0 0 -5 -4.8867 5.0039 5.0039 0 0 0 -0.11719 0.003906h-17.807a5.0039 5.0039 0 0 0 -0.076172 -0.003906zm23 4.5039a3.5 3.5 0 0 1 0.041016 -0.5h-0.041016v0.5z" fill="#e0e0e0"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_folder_big_thumb.svg b/editor/icons/icon_folder_big_thumb.svg
new file mode 100644
index 0000000000..a7e830b019
--- /dev/null
+++ b/editor/icons/icon_folder_big_thumb.svg
@@ -0,0 +1,5 @@
+<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -988.36)">
+<path transform="translate(0 988.36)" d="m12 10c-2.2091 0-4 1.7909-4 4v37h0.13086c0.45564 1.7647 2.0466 2.9982 3.8691 3h40c2.2091 0 4-1.7909 4-4v-28c0-2.2091-1.7909-4-4-4h-16l-2-4c-0.98796-1.9759-1.7909-4-4-4z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_folder_medium_thumb.svg b/editor/icons/icon_folder_medium_thumb.svg
new file mode 100644
index 0000000000..23b9ffc25c
--- /dev/null
+++ b/editor/icons/icon_folder_medium_thumb.svg
@@ -0,0 +1,5 @@
+<svg width="32" height="32" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1020.4)">
+<path d="m6 1025.4c-1.1046 0-2 0.8954-2 2v18.5h0.06543c0.22782 0.8823 1.0233 1.4991 1.9346 1.5h20c1.1046 0 2-0.8954 2-2v-14c0-1.1046-0.89543-2-2-2h-8l-1-2c-0.49398-0.988-0.89543-2-2-2z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_godot.svg b/editor/icons/icon_godot.svg
index 32a1eeb6ec..b8bdfcc023 100644
--- a/editor/icons/icon_godot.svg
+++ b/editor/icons/icon_godot.svg
@@ -26,8 +26,5 @@
<path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042"/>
</g>
</g>
-<path d="m4 1041.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<path d="m12 1041.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<rect x="6" y="1043.4" width="4" height="1" ry="0"/>
</g>
</svg>
diff --git a/editor/icons/icon_godot_docs.svg b/editor/icons/icon_godot_docs.svg
new file mode 100644
index 0000000000..9caa09066d
--- /dev/null
+++ b/editor/icons/icon_godot_docs.svg
@@ -0,0 +1,31 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<g transform="matrix(.017241 0 0 .017241 -.82759 1033.7)" stroke-width=".32031">
+<g transform="matrix(4.1626 0 0 -4.1626 919.24 771.67)">
+<path d="m0 0s-0.325 1.994-0.515 1.976l-36.182-3.491c-2.879-0.278-5.115-2.574-5.317-5.459l-0.994-14.247-27.992-1.997-1.904 12.912c-0.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-0.994 14.247c-0.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-0.187 0.018-0.324-1.978-0.511-1.978l-0.049-7.83 30.658-4.944 1.004-14.374c0.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c0.146-0.01 0.29-0.016 0.434-0.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c0.423-2.871 2.93-5.037 5.831-5.037 0.142 0 0.284 5e-3 0.423 0.015l38.556 2.75c2.911 0.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 104.7 525.91)">
+<path d="m0 0v-59.041c0.108-1e-3 0.216-5e-3 0.323-0.015l36.196-3.49c1.896-0.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c0.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c0.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c0.107 0.01 0.214 0.014 0.322 0.015v4.711l0.015 5e-3v54.325h0.134c4.795 6.12 9.232 12.569 13.487 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842 0.642-7.702 0.88-11.567 0.926v6e-3c-0.027 0-0.052-6e-3 -0.075-6e-3 -0.024 0-0.049 6e-3 -0.073 6e-3v-6e-3c-3.872-0.046-7.729-0.284-11.572-0.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17 0.216-8.34 0.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.253-6.88 8.693-13.329 13.487-19.449z" fill="#478cbf"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 784.07 817.24)">
+<path d="m0 0-1.121-16.063c-0.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-0.094-7e-3 -0.188-0.01-0.281-0.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-0.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936 0.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c0.015-3.498 0.06-7.33 0.06-8.093 0-34.374 43.605-50.896 97.781-51.086h0.133c54.176 0.19 97.766 16.712 97.766 51.086 0 0.777 0.047 4.593 0.063 8.093z" fill="#478cbf"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 389.21 625.67)">
+<path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 367.37 631.06)">
+<path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 511.99 724.74)">
+<path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 634.79 625.67)">
+<path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff"/>
+</g>
+<g transform="matrix(4.1626 0 0 -4.1626 656.64 631.06)">
+<path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042"/>
+</g>
+</g>
+<path transform="translate(0 1036.4)" d="m4 5a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3h2a3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3 3 3 0 0 0 -2.8262 2h-2.3496a3 3 0 0 0 -2.8242 -2zm0 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm8 0a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_key_call.svg b/editor/icons/icon_key_call.svg
new file mode 100644
index 0000000000..7fcc65801a
--- /dev/null
+++ b/editor/icons/icon_key_call.svg
@@ -0,0 +1,5 @@
+<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1044.4)">
+<rect transform="rotate(-45)" x="-741.53" y="741.08" width="6.1027" height="6.1027" ry=".76286" fill="#adf18f"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_logo.svg b/editor/icons/icon_logo.svg
new file mode 100644
index 0000000000..269fe1b245
--- /dev/null
+++ b/editor/icons/icon_logo.svg
@@ -0,0 +1,7 @@
+<svg width="187" height="69" version="1.1" viewBox="0 0 187 69" xmlns="http://www.w3.org/2000/svg">
+<path d="m91.912 19.51c-3.5233 0-6.278 1.1097-8.2676 3.3281-1.9911 2.2193-2.9844 5.1004-2.9844 8.6465 0 4.1636 1.0165 7.3207 3.0508 9.4707 2.0379 2.1497 4.7123 3.2227 8.0293 3.2227 1.7838 0 3.3686-0.15384 4.752-0.46289 1.3848-0.30784 2.3038-0.62367 2.7617-0.94336l0.13867-10.736c0-0.62388-1.6471-0.90785-3.4941-0.93945-1.847-0.02857-3.9609 0.35742-3.9609 0.35742v3.6055h2.125l-0.023438 1.6055c0 0.59532-0.59062 0.89453-1.7676 0.89453-1.1785 0-2.2182-0.4989-3.1211-1.4941-0.90498-0.99645-1.3555-2.4517-1.3555-4.3711 0-1.9233 0.43964-3.3428 1.3203-4.2578 0.87885-0.9141 2.0322-1.3711 3.4492-1.3711 0.59532 0 1.2107 0.095008 1.8516 0.29102 0.64121 0.19418 1.0686 0.37639 1.2871 0.54688 0.21667 0.17534 0.42435 0.25781 0.61914 0.25781 0.19388 0 0.50715-0.22698 0.94141-0.68555 0.43487-0.45735 0.82427-1.1501 1.168-2.0742 0.34218-0.92899 0.51367-1.6414 0.51367-2.1465 0-0.50111-0.011023-0.84501-0.033203-1.0273-0.48045-0.52573-1.3668-0.94394-2.6602-1.2539-1.2909-0.30906-2.7387-0.46289-4.3398-0.46289zm21.049 0c-3.2367 0-5.8788 1.0413-7.9258 3.1211-2.0464 2.0826-3.0703 5.1404-3.0703 9.1797 0 4.0369 1.0128 7.1085 3.0352 9.2129 2.0251 2.1026 4.6444 3.1543 7.8574 3.1543 3.2145 0 5.8383-1.0111 7.875-3.0332 2.0367-2.0263 3.0527-5.1142 3.0527-9.2656 0-4.1484-0.99433-7.2508-2.9863-9.2969-1.9884-2.05-4.6018-3.0723-7.8379-3.0723zm45.504 0c-3.2379 0-5.8792 1.0413-7.9277 3.1211-2.0461 2.0826-3.0684 5.1404-3.0684 9.1797 0 4.0369 1.0104 7.1085 3.0352 9.2129 2.0233 2.1026 4.6432 3.1543 7.8574 3.1543 3.213 0 5.8373-1.0111 7.873-3.0332 2.0364-2.0263 3.0547-5.1142 3.0547-9.2656 0-4.1484-0.9939-7.2508-2.9844-9.2969-1.9908-2.05-4.6031-3.0723-7.8398-3.0723zm-30.105 0.30859c-0.45888 0-0.82988 0.16637-1.1152 0.49609-0.28717 0.33489-0.42969 0.78715-0.42969 1.3594v20.584c0 1.053 0.58624 1.5781 1.752 1.5781h5.8652c7.1824-1e-6 10.773-4.2092 10.773-12.627 0-3.9348-0.94335-6.8151-2.832-8.6445-1.8853-1.83-4.6472-2.7461-8.2832-2.7461h-5.7305zm42.807 0c-0.38928 0-0.66468 0.52801-0.82422 1.5801-0.0687 0.50294-0.10157 1.0191-0.10157 1.543 0 0.52694 0.03287 1.0409 0.10157 1.543 0.15954 1.0548 0.43494 1.5801 0.82422 1.5801h4.1152v17.225c0 0.45462 1.1351 0.68555 3.3984 0.68555 2.2655 0 3.3965-0.23093 3.3965-0.68555v-17.225h4.0137c0.38868 0 0.66225-0.52528 0.82422-1.5801 0.0672-0.50202 0.10156-1.016 0.10156-1.543 1e-5 -0.52391-0.03436-1.04-0.10156-1.543-0.16197-1.0521-0.43554-1.5801-0.82422-1.5801h-14.924zm-58.291 6.2793c1.0989 0 2.0193 0.49244 2.7617 1.4746 0.74331 0.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-0.35955 3.2363-1.0801 4.2188-0.72053 0.98612-1.6597 1.4785-2.8145 1.4785-1.1554 0-2.0859-0.48441-2.7949-1.459-0.71019-0.97154-1.0644-2.3663-1.0644-4.1875 0-1.8173 0.37148-3.2302 1.1133-4.2363 0.74574-1.0053 1.6663-1.5098 2.7637-1.5098zm45.504 0c1.0989 0 2.0181 0.49244 2.7617 1.4746 0.74331 0.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-0.3612 3.2363-1.082 4.2188-0.71961 0.98612-1.6574 1.4785-2.8125 1.4785-1.1554 0-2.0888-0.48441-2.7969-1.459-0.70806-0.97154-1.0625-2.3663-1.0625-4.1875 0-1.8173 0.37179-3.2302 1.1133-4.2363 0.74453-1.0053 1.666-1.5098 2.7637-1.5098zm-24.977 0.23828h0.34375c1.4638 0 2.5334 0.33466 3.209 0.99805 0.6722 0.66157 1.0098 2.0859 1.0098 4.2715 0 2.1847-0.32289 3.7447-0.97656 4.6816-0.65214 0.9378-1.6059 1.4082-2.8652 1.4082-0.34218 0-0.54909-0.063339-0.61719-0.18945-0.06873-0.12672-0.10352-0.42897-0.10352-0.9082v-10.262z" fill="#fff"/>
+<path d="m137.91 48.551v1.2109h0.85938v-1.2109h-0.85938zm-52.396 0.58984c-0.99736 0-1.7963 0.32424-2.3926 0.96484-0.59745 0.64576-0.89453 1.5712-0.89453 2.7773v3.0742c0 1.2329 0.31639 2.1765 0.94727 2.832 0.6333 0.66066 1.467 0.98828 2.5039 0.98828 0.78586 0 1.4321-0.16147 1.9414-0.48633 0.50993-0.32273 0.8592-0.67938 1.0488-1.0684v-3.6875h-3.0059v0.74805h2.1465v2.6934c-0.13766 0.30115-0.38143 0.55386-0.73242 0.76172-0.34978 0.2109-0.8171 0.31445-1.3984 0.31445-0.79619 0-1.4265-0.2632-1.8945-0.78711-0.46799-0.52786-0.70312-1.2936-0.70312-2.2988v-3.0918c0-0.96941 0.21778-1.7078 0.65234-2.2168 0.43578-0.51023 1.0297-0.76367 1.7812-0.76367 0.74271 0 1.3056 0.19019 1.6836 0.56641 0.38017 0.37925 0.58276 0.91542 0.61133 1.6113h0.79492l0.013672-0.041016c-0.024311-0.90802-0.30456-1.6179-0.83789-2.127-0.53484-0.50719-1.2907-0.76367-2.2656-0.76367zm7.6133 2.6641c-0.719 0-1.3111 0.22524-1.7715 0.67773-0.46222 0.45371-0.68069 0.96571-0.6582 1.5449l0.013672 0.041015 0.79688 0.007813c0-0.42696 0.14768-0.78487 0.44336-1.0781 0.2966-0.29508 0.67455-0.44141 1.1328-0.44141 0.4926 0 0.87459 0.15388 1.1523 0.45898 0.27198 0.30906 0.41016 0.73655 0.41016 1.2793v0.94531h-1.3418c-0.85666 0-1.5379 0.21084-2.0391 0.63477-0.50142 0.42392-0.75195 0.99502-0.75195 1.707 0 0.67372 0.17358 1.2075 0.51758 1.6035 0.34613 0.39445 0.83497 0.5918 1.4707 0.5918 0.45462 0 0.86723-0.12355 1.2383-0.37305 0.37166-0.24767 0.67317-0.56424 0.90625-0.94531 0 0.17413 0.01089 0.34527 0.03125 0.51758 0.02097 0.16927 0.053163 0.38614 0.095703 0.65234h0.88867c-0.062302-0.24767-0.10234-0.49621-0.12695-0.75391-0.02401-0.25436-0.037109-0.52051-0.037109-0.79492v-3.7676c0-0.80622-0.21809-1.4265-0.65234-1.8613-0.43669-0.43061-1.0083-0.64648-1.7188-0.64648zm7.1152 0c-0.45462 0-0.85109 0.11505-1.1875 0.3457-0.33519 0.23369-0.60486 0.56357-0.80664 0.99023l-0.074219-1.1934h-0.75195v7.6816h0.85352v-5.5293c0.11791-0.47346 0.31244-0.84655 0.58594-1.1191 0.27168-0.27107 0.63379-0.4082 1.082-0.4082 0.4689 0 0.83314 0.19466 1.0957 0.58789 0.26378 0.39323 0.39258 1.0508 0.39258 1.9707v4.498h0.85351v-4.6211-0.19922c0.0623-0.64455 0.23396-1.1785 0.51172-1.6055 0.27927-0.42696 0.66855-0.63672 1.166-0.63672 0.47285 0 0.83879 0.19223 1.0938 0.57422 0.25345 0.38138 0.38281 1.0443 0.38281 1.9863v4.502h0.85742v-4.4863c0-1.1332-0.18468-1.9728-0.55664-2.5195-0.37044-0.54548-0.89268-0.81836-1.5664-0.81836-0.48897 0-0.91182 0.1465-1.2598 0.43945-0.34796 0.29234-0.61537 0.69589-0.80469 1.207-0.148-0.55369-0.38151-0.966-0.69726-1.2383-0.31543-0.2732-0.70589-0.4082-1.1699-0.4082zm10.316 0c-0.74423-1e-6 -1.3797 0.32125-1.9082 0.96094-0.52725 0.64273-0.78906 1.4505-0.78906 2.4199v1.2754c0 0.96758 0.26259 1.762 0.7871 2.3828 0.52604 0.62206 1.2032 0.93359 2.0312 0.93359 0.5157 0 0.95833-0.090281 1.3242-0.26562 0.36679-0.17626 0.66658-0.41287 0.89844-0.70703l-0.34961-0.60547c-0.21728 0.27441-0.4784 0.4836-0.7832 0.63281-0.3048 0.14586-0.66987 0.2207-1.0898 0.2207-0.60443 0-1.0864-0.24489-1.4414-0.74023-0.35433-0.49412-0.53321-1.1138-0.53321-1.8574v-0.63867h4.3965v-0.84375c0-0.96667-0.22381-1.7371-0.66992-2.3105-0.44519-0.57253-1.0684-0.85742-1.873-0.85742zm9.4727 0c-0.74423-1e-6 -1.3782 0.32125-1.9082 0.96094-0.52603 0.64273-0.79101 1.4505-0.79101 2.4199v1.2754c0 0.96758 0.26241 1.762 0.78906 2.3828 0.52512 0.62206 1.2028 0.93359 2.0312 0.93359 0.51601 0 0.95639-0.090281 1.3223-0.26562 0.36741-0.17626 0.66822-0.41287 0.90039-0.70703l-0.34766-0.60547c-0.21972 0.27441-0.4811 0.4836-0.78711 0.63281-0.30389 0.14586-0.66639 0.2207-1.0879 0.2207-0.60656 0-1.0883-0.24489-1.4414-0.74023-0.35646-0.49412-0.5332-1.1138-0.5332-1.8574v-0.63867h4.3945v-0.84375c0-0.96667-0.22338-1.7371-0.66797-2.3105-0.44398-0.57253-1.0699-0.85742-1.873-0.85742zm6.8672 0c-0.45614 0-0.85274 0.12451-1.1894 0.36914-0.33975 0.24342-0.60962 0.5923-0.81445 1.043l-0.07031-1.2695h-0.76172v7.6816h0.85351v-5.4824c0.14617-0.47923 0.36569-0.85918 0.66016-1.1445 0.29325-0.28809 0.65767-0.42969 1.0938-0.42969 0.48622 0 0.85922 0.17765 1.1133 0.5332 0.25557 0.35555 0.38477 0.96807 0.38477 1.8457v4.6777h0.85937v-4.6855c0-1.0736-0.18381-1.866-0.55273-2.375-0.36497-0.50993-0.89-0.76367-1.5762-0.76367zm6.2539 0c-0.77674 0-1.386 0.32888-1.8242 0.98437-0.44186 0.65883-0.66211 1.5326-0.66211 2.6211l0.00196 1.0508c0 1.0031 0.21834 1.8072 0.65625 2.4102 0.43699 0.60413 1.0429 0.90625 1.8144 0.90625 0.41602 0 0.78387-0.091234 1.0996-0.27539 0.31695-0.18324 0.58484-0.4491 0.80273-0.79492v0.92969c0 0.75881-0.14785 1.3303-0.4414 1.7266-0.29235 0.39111-0.74301 0.58789-1.3535 0.58789-0.30359 0-0.59763-0.04082-0.88086-0.125-0.28565-0.081443-0.54279-0.19619-0.77344-0.3457l-0.23632 0.74805c0.27047 0.15164 0.57916 0.27315 0.92773 0.36523 0.34795 0.092075 0.67388 0.13867 0.97656 0.13867 0.84208 0 1.494-0.27297 1.9531-0.81055 0.45857-0.53971 0.68554-1.3009 0.68554-2.2852v-7.6895h-0.72265l-0.08399 1.0684c-0.21485-0.38533-0.48269-0.68758-0.80664-0.89453-0.32334-0.2109-0.70159-0.31641-1.1328-0.31641zm10.467 0c-0.45401 0-0.85062 0.12451-1.1895 0.36914-0.33914 0.24342-0.60902 0.5923-0.81445 1.043l-0.07031-1.2695h-0.75977v7.6816h0.85352v-5.4824c0.14556-0.47923 0.3663-0.85918 0.66016-1.1445 0.29295-0.28809 0.65797-0.42969 1.0937-0.42969 0.48775 0 0.85711 0.17765 1.1133 0.5332 0.25496 0.35555 0.38476 0.96807 0.38476 1.8457v4.6777h0.85742v-4.6855c0-1.0736-0.18081-1.866-0.54882-2.375-0.36588-0.50993-0.8939-0.76367-1.5801-0.76367zm6.4043 0c-0.74271-1e-6 -1.3778 0.32125-1.9062 0.96094-0.52724 0.64273-0.79101 1.4505-0.79101 2.4199v1.2754c0 0.96758 0.26334 1.762 0.78906 2.3828 0.52361 0.62206 1.2007 0.93359 2.0312 0.93359 0.5154 0 0.9567-0.090281 1.3223-0.26562 0.3668-0.17626 0.6667-0.41287 0.90039-0.70703l-0.34961-0.60547c-0.2194 0.27441-0.47958 0.4836-0.78711 0.63281-0.30359 0.14586-0.66597 0.2207-1.0859 0.2207-0.60717 0-1.089-0.24489-1.4434-0.74023-0.35464-0.49412-0.5332-1.1138-0.5332-1.8574v-0.63867h4.3965v-0.84375c0-0.96667-0.22369-1.7371-0.66797-2.3105-0.44551-0.57253-1.0709-0.85742-1.875-0.85742zm-12.113 0.14258v7.6816h0.85938v-7.6816h-0.85938zm-27.352 0.60938c0.53029 0 0.9445 0.20789 1.2441 0.62695 0.29781 0.41876 0.44531 0.94616 0.44531 1.5801v0.33008h-3.543c0.01429-0.71688 0.19281-1.3186 0.53711-1.8066 0.34401-0.48622 0.78217-0.73047 1.3164-0.73047zm9.4727 0c0.52998 0 0.94406 0.20789 1.2422 0.62695 0.29963 0.41876 0.44727 0.94616 0.44727 1.5801v0.33008h-3.543c0.0155-0.71688 0.19298-1.3186 0.53516-1.8066 0.3437-0.48622 0.7826-0.73047 1.3184-0.73047zm29.992 0c0.53089 0 0.94602 0.20789 1.2441 0.62695 0.29902 0.41876 0.44532 0.94616 0.44532 1.5801v0.33008h-3.543c0.01519-0.71688 0.19402-1.3186 0.53711-1.8066 0.34218-0.48622 0.78064-0.73047 1.3164-0.73047zm-16.686 0.015625c0.42119 0 0.77033 0.1246 1.0469 0.375 0.27684 0.25466 0.4967 0.58706 0.65625 0.99609v3.8047c-0.16593 0.39718-0.39 0.70872-0.67383 0.93359-0.28475 0.22488-0.63089 0.33594-1.043 0.33594-0.6014 0-1.0536-0.22975-1.3496-0.69531-0.29964-0.4613-0.44727-1.0819-0.44727-1.8613v-1.0508c0-0.84177 0.15149-1.527 0.45508-2.0527 0.30146-0.52482 0.75528-0.78516 1.3555-0.78516zm-40.057 3.3281h1.3652v1.6621c-0.15286 0.42089-0.40964 0.76752-0.77734 1.041-0.3671 0.27228-0.78783 0.40625-1.2598 0.40625-0.39262 0-0.69782-0.12824-0.91602-0.38867-0.2185-0.25952-0.32617-0.59591-0.32617-1.0059 0-0.48531 0.17262-0.89402 0.52148-1.2207 0.34795-0.32881 0.81215-0.49414 1.3926-0.49414z" fill="#e0e0e0"/>
+<path d="m27 3c-3.0948 0.68801-6.1571 1.6452-9.0273 3.0898 0.06564 2.5344 0.23035 4.963 0.5625 7.4297-1.1147 0.71414-2.287 1.3281-3.3281 2.1641-1.0578 0.81382-2.1378 1.5912-3.0957 2.543-1.9136-1.2657-3.9389-2.454-6.0254-3.5039-2.2491 2.4205-4.3524 5.0317-6.0703 7.9551 1.2924 2.0908 2.6428 4.0523 4.0996 5.9121h0.041016v14.438 1.834 1.6699c0.03282 3.04e-4 0.06514 8.06e-4 0.097656 0.003906l11 1.0605c0.57617 0.05561 1.0282 0.52027 1.0684 1.0977l0.33789 4.8555 9.5957 0.68359 0.66016-4.4805c0.0857-0.58104 0.58415-1.0117 1.1719-1.0117h11.605c0.58742 0 1.0862 0.43068 1.1719 1.0117l0.66016 4.4805 9.5957-0.68359 0.33789-4.8555c0.04042-0.57739 0.49219-1.0417 1.0684-1.0977l10.996-1.0605c0.032519-3e-3 0.064836-0.003606 0.097656-0.003906v-1.4316l0.003906-0.001953v-16.508h0.041016c1.4571-1.8598 2.8066-3.8214 4.0996-5.9121-1.7173-2.9234-3.8232-5.5346-6.0723-7.9551-2.0859 1.0499-4.1118 2.2382-6.0254 3.5039-0.95756-0.95178-2.0363-1.7292-3.0957-2.543-1.0408-0.836-2.2136-1.4499-3.3262-2.1641 0.33124-2.4667 0.49656-4.8952 0.5625-7.4297-2.8706-1.4447-5.933-2.4018-9.0293-3.0898-1.2362 2.0777-2.367 4.3278-3.3516 6.5273-1.1675-0.1951-2.3391-0.26727-3.5137-0.28125v-0.0019532c-0.0082 0-0.016447 0.0019531-0.023437 0.0019532-0.0073 0-0.014194-0.0019532-0.021484-0.0019532v0.0019532c-1.1767 0.013979-2.3497 0.086153-3.5176 0.28125-0.98399-2.1996-2.1135-4.4497-3.3516-6.5273zm-22.863 45.904c0.0045599 1.063 0.019531 2.2271 0.019531 2.459 0 10.446 13.251 15.468 29.715 15.525h0.019531 0.019531c16.464-0.05774 29.711-5.0795 29.711-15.525 0-0.23612 0.014661-1.3954 0.019531-2.459l-9.8867 0.95312-0.3418 4.8809c-0.04102 0.58833-0.50933 1.0574-1.0977 1.0996l-11.717 0.83594c-0.02857 0.0021-0.055724 0.003906-0.083984 0.003906-0.58225 0-1.0859-0.42704-1.1719-1.0117l-0.67188-4.5566h-9.5586l-0.67188 4.5566c-0.09025 0.61325-0.63836 1.0531-1.2559 1.0078l-11.717-0.83594c-0.58833-0.04224-1.0566-0.51128-1.0977-1.0996l-0.3418-4.8809-9.8906-0.95312z" fill="#478cbf"/>
+<path d="m18.299 29.246c-3.6594 0-6.6289 2.9669-6.6289 6.627 0 3.6625 2.9695 6.6289 6.6289 6.6289 3.6613 0 6.627-2.9664 6.627-6.6289 0-3.66-2.9657-6.627-6.627-6.627zm31.186 0c-3.6619 0-6.6289 2.9669-6.6289 6.627 0 3.6625 2.967 6.6289 6.6289 6.6289 3.6591 0 6.627-2.9664 6.627-6.6289 0-3.66-2.9678-6.627-6.627-6.627zm-15.594 3.8789c-1.1785 0-2.1348 0.86781-2.1348 1.9375v6.1035c0 1.0706 0.95628 1.9395 2.1348 1.9395s2.1348-0.86885 2.1348-1.9395v-6.1035c0-1.0697-0.95628-1.9375-2.1348-1.9375z" fill="#f6f6f6"/>
+<path d="m18.932 31.865c-2.4299 0-4.4004 1.9711-4.4004 4.4004s1.9705 4.3984 4.4004 4.3984c2.4311 0 4.4004-1.9691 4.4004-4.3984s-1.9693-4.4004-4.4004-4.4004zm29.916 0c-2.4293 0-4.3984 1.9711-4.3984 4.4004s1.9691 4.3984 4.3984 4.3984c2.4317 0 4.4004-1.9691 4.4004-4.3984s-1.9687-4.4004-4.4004-4.4004z" fill="#414042"/>
+</svg>
diff --git a/editor/icons/icon_mini_checkerboard.svg b/editor/icons/icon_mini_checkerboard.svg
new file mode 100644
index 0000000000..e740113b2d
--- /dev/null
+++ b/editor/icons/icon_mini_checkerboard.svg
@@ -0,0 +1,4 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<path d="m0 0v8h8v-8h-8zm8 8v8h8v-8h-8z" fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9994"/>
+<path d="m8 0v8h8v-8h-8zm0 8h-8v8h8v-8z" fill="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9994"/>
+</svg>
diff --git a/editor/icons/icon_shader_material.svg b/editor/icons/icon_shader_material.svg
new file mode 100644
index 0000000000..f77aa837c5
--- /dev/null
+++ b/editor/icons/icon_shader_material.svg
@@ -0,0 +1,11 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v1h2 6 3l-2-2h-8z" fill="#ff7070"/>
+<path transform="translate(0 1036.4)" d="m1 3v2h2v-2h-2zm8 0v2h5l-2-2h-3z" fill="#ffeb70"/>
+<path transform="translate(0 1036.4)" d="m1 5v2h2v-2h-2zm8 0v1c0 0.554 0.44599 1 1 1h3 2v-1l-1-1h-5z" fill="#9dff70"/>
+<path transform="translate(0 1036.4)" d="m1 7v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#70ffb9"/>
+<path transform="translate(0 1036.4)" d="m1 9v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#70deff"/>
+<path transform="translate(0 1036.4)" d="m1 13v1c5.52e-5 0.5523 0.44774 0.9999 1 1h12c0.55226-1e-4 0.99994-0.4477 1-1v-1h-2-10-2z" fill="#ff70ac"/>
+<path transform="translate(0 1036.4)" d="m1 11v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#9f70ff"/>
+</g>
+</svg>
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index 21cf08f524..831eb74b66 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -55,8 +55,8 @@ Error EditorSceneImporterGLTF::_parse_glb(const String &p_path, GLTFState &state
uint32_t magic = f->get_32();
ERR_FAIL_COND_V(magic != 0x46546C67, ERR_FILE_UNRECOGNIZED); //glTF
- uint32_t version = f->get_32();
- uint32_t length = f->get_32();
+ f->get_32(); // version
+ f->get_32(); // length
uint32_t chunk_length = f->get_32();
uint32_t chunk_type = f->get_32();
@@ -1945,7 +1945,7 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
bool last = false;
while (true) {
- float value = _interpolate_track<float>(track.weight_tracks[i].times, track.weight_tracks[i].values, time, track.weight_tracks[i].interpolation);
+ _interpolate_track<float>(track.weight_tracks[i].times, track.weight_tracks[i].values, time, track.weight_tracks[i].interpolation);
if (last) {
break;
}
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 594728d2e0..cc519c1c4b 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -40,6 +40,8 @@
#include "scene/3d/portal.h"
#include "scene/3d/room_instance.h"
#include "scene/3d/vehicle_body.h"
+#include "scene/animation/animation_player.h"
+#include "scene/resources/animation.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/plane_shape.h"
#include "scene/resources/ray_shape.h"
@@ -118,9 +120,13 @@ String ResourceImporterScene::get_preset_name(int p_idx) const {
switch (p_idx) {
case PRESET_SINGLE_SCENE: return TTR("Import as Single Scene");
+ case PRESET_SEPERATE_ANIMATIONS: return TTR("Import with Seperate Animations");
case PRESET_SEPARATE_MATERIALS: return TTR("Import with Separate Materials");
case PRESET_SEPARATE_MESHES: return TTR("Import with Separate Objects");
case PRESET_SEPARATE_MESHES_AND_MATERIALS: return TTR("Import with Separate Objects+Materials");
+ case PRESET_SEPARATE_MESHES_AND_ANIMATIONS: return TTR("Import with Seperate Objects+Animations");
+ case PRESET_SEPERATE_MATERIALS_AND_ANIMATIONS: return TTR("Import with Seperate Materials+Animations");
+ case PRESET_SEPERATE_MESHES_MATERIALS_AND_ANIMATIONS: return TTR("Import with Seperate Objects+Materials+Animations");
case PRESET_MULTIPLE_SCENES: return TTR("Import as Multiple Scenes");
case PRESET_MULTIPLE_SCENES_AND_MATERIALS: return TTR("Import as Multiple Scenes+Materials");
}
@@ -230,8 +236,8 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
if (isroot)
return p_node;
-
- if (MeshInstance *mi = Object::cast_to<MeshInstance>(p_node)) {
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
+ if (mi) {
Node *col = mi->create_trimesh_collision_node();
ERR_FAIL_COND_V(!col, NULL);
@@ -810,12 +816,33 @@ static String _make_extname(const String &p_str) {
return ext_name;
}
-void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_materials, bool p_keep_materials, bool p_make_meshes, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes) {
+void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_make_materials, bool p_keep_materials, bool p_make_meshes, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes) {
List<PropertyInfo> pi;
print_line("node: " + String(p_node->get_name()));
+ if (p_make_animations) {
+ if (Object::cast_to<AnimationPlayer>(p_node)) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
+
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
+ for (List<StringName>::Element *E = anims.front(); E; E = E->next()) {
+
+ Ref<Animation> anim = ap->get_animation(E->get());
+ ERR_CONTINUE(anim.is_null());
+
+ if (!p_animations.has(anim)) {
+
+ String ext_name = p_base_path.plus_file(_make_extname(E->get()) + ".anim");
+ ResourceSaver::save(ext_name, anim, ResourceSaver::FLAG_CHANGE_PATH);
+ p_animations[anim] = anim;
+ }
+ }
+ }
+ }
+
p_node->get_property_list(&pi);
for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
@@ -907,7 +934,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
for (int i = 0; i < p_node->get_child_count(); i++) {
- _make_external_resources(p_node->get_child(i), p_base_path, p_make_materials, p_keep_materials, p_make_meshes, p_materials, p_meshes);
+ _make_external_resources(p_node->get_child(i), p_base_path, p_make_animations, p_make_materials, p_keep_materials, p_make_meshes, p_animations, p_materials, p_meshes);
}
}
@@ -927,9 +954,10 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
script_ext_hint += "*." + E->get();
}
- bool materials_out = p_preset == PRESET_SEPARATE_MATERIALS || p_preset == PRESET_SEPARATE_MESHES_AND_MATERIALS || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS;
- bool meshes_out = p_preset == PRESET_SEPARATE_MESHES || p_preset == PRESET_SEPARATE_MESHES_AND_MATERIALS;
+ bool materials_out = p_preset == PRESET_SEPARATE_MATERIALS || p_preset == PRESET_SEPARATE_MESHES_AND_MATERIALS || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS || p_preset == PRESET_SEPERATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPERATE_MESHES_MATERIALS_AND_ANIMATIONS;
+ bool meshes_out = p_preset == PRESET_SEPARATE_MESHES || p_preset == PRESET_SEPARATE_MESHES_AND_MATERIALS || PRESET_SEPARATE_MESHES_AND_ANIMATIONS || PRESET_SEPERATE_MESHES_MATERIALS_AND_ANIMATIONS;
bool scenes_out = p_preset == PRESET_MULTIPLE_SCENES || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS;
+ bool animations_out = p_preset == PRESET_SEPERATE_ANIMATIONS || PRESET_SEPARATE_MESHES_AND_ANIMATIONS || p_preset == PRESET_SEPERATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPERATE_MESHES_MATERIALS_AND_ANIMATIONS;
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0));
@@ -943,6 +971,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "animation/filter_script", PROPERTY_HINT_MULTILINE_TEXT), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/storage", PROPERTY_HINT_ENUM, "Built-In,Files"), animations_out ? true : false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_linear_error"), 0.05));
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angular_error"), 0.01));
@@ -1024,7 +1053,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
String root_type = p_options["nodes/root_type"];
if (scene->get_class() != root_type) {
- Node *base_node = base_node = Object::cast_to<Node>(ClassDB::instance(root_type));
+ Node *base_node = Object::cast_to<Node>(ClassDB::instance(root_type));
if (base_node) {
@@ -1078,13 +1107,14 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
_filter_tracks(scene, animation_filter);
}
+ bool external_animations = int(p_options["animation/storage"]) == 1;
bool external_materials = p_options["materials/storage"];
bool external_meshes = p_options["meshes/storage"];
bool external_scenes = int(p_options["nodes/storage"]) == 1;
String base_path = p_source_file.get_base_dir();
- if (external_materials || external_meshes || external_scenes) {
+ if (external_animations || external_materials || external_meshes || external_scenes) {
if (bool(p_options["external_files/store_in_subdir"])) {
String subdir_name = p_source_file.get_file().get_basename();
@@ -1097,13 +1127,14 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
}
- if (external_materials || external_meshes) {
+ if (external_animations || external_materials || external_meshes) {
+ Map<Ref<Animation>, Ref<Animation> > anim_map;
Map<Ref<Material>, Ref<Material> > mat_map;
Map<Ref<ArrayMesh>, Ref<ArrayMesh> > mesh_map;
bool keep_materials = bool(p_options["materials/keep_on_reimport"]);
- _make_external_resources(scene, base_path, external_materials, keep_materials, external_meshes, mat_map, mesh_map);
+ _make_external_resources(scene, base_path, external_animations, external_materials, keep_materials, external_meshes, anim_map, mat_map, mesh_map);
}
progress.step(TTR("Running Custom Script.."), 2);
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 9c3d5e7876..652977b98a 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -85,8 +85,15 @@ class ResourceImporterScene : public ResourceImporter {
enum Presets {
PRESET_SEPARATE_MATERIALS,
PRESET_SEPARATE_MESHES,
+ PRESET_SEPERATE_ANIMATIONS,
+
PRESET_SINGLE_SCENE,
+
PRESET_SEPARATE_MESHES_AND_MATERIALS,
+ PRESET_SEPARATE_MESHES_AND_ANIMATIONS,
+ PRESET_SEPERATE_MATERIALS_AND_ANIMATIONS,
+ PRESET_SEPERATE_MESHES_MATERIALS_AND_ANIMATIONS,
+
PRESET_MULTIPLE_SCENES,
PRESET_MULTIPLE_SCENES_AND_MATERIALS,
};
@@ -112,7 +119,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_materials, bool p_keep_materials, bool p_make_meshes, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes);
+ void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_make_materials, bool p_keep_materials, bool p_make_meshes, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes);
Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<ArrayMesh>, Ref<Shape> > &collision_map);
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index f29bdde634..3e3f1d1e19 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -30,10 +30,11 @@
#include "resource_importer_texture.h"
#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
#include "io/config_file.h"
#include "io/image_loader.h"
#include "scene/resources/texture.h"
-#include "editor/editor_node.h"
+
void ResourceImporterTexture::_texture_reimport_srgb(const Ref<StreamTexture> &p_tex) {
singleton->mutex->lock();
@@ -412,13 +413,13 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
//must import in all formats, in order of priority (so platform choses the best supported one. IE, etc2 over etc).
//Android, GLES 2.x
- bool ok_on_pc=false;
+ bool ok_on_pc = false;
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_s3tc")) {
_save_stex(image, p_save_path + ".s3tc.stex", compress_mode, lossy, Image::COMPRESS_S3TC, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
r_platform_variants->push_back("s3tc");
- ok_on_pc=true;
+ ok_on_pc = true;
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index e2bacd70e4..025dbbaacf 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -103,7 +103,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
/* GET FILESIZE */
- uint32_t filesize = file->get_32();
+ file->get_32(); // filesize
/* CHECK WAVE */
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index cc7fc57cde..d7762a66df 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -55,79 +55,87 @@ void AnimationPlayerEditor::_gui_input(Ref<InputEvent> p_event) {
}
void AnimationPlayerEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_PROCESS: {
- if (p_what == NOTIFICATION_PROCESS) {
-
- if (!player)
- return;
+ if (!player)
+ return;
- updating = true;
+ updating = true;
- if (player->is_playing()) {
+ if (player->is_playing()) {
- {
- String animname = player->get_current_animation();
+ {
+ String animname = player->get_current_animation();
- if (player->has_animation(animname)) {
- Ref<Animation> anim = player->get_animation(animname);
- if (!anim.is_null()) {
+ if (player->has_animation(animname)) {
+ Ref<Animation> anim = player->get_animation(animname);
+ if (!anim.is_null()) {
- frame->set_max(anim->get_length());
+ frame->set_max(anim->get_length());
+ }
}
}
+ frame->set_value(player->get_current_animation_pos());
+ key_editor->set_anim_pos(player->get_current_animation_pos());
+ EditorNode::get_singleton()->get_property_editor()->refresh();
+
+ } else if (last_active) {
+ //need the last frame after it stopped
+
+ frame->set_value(player->get_current_animation_pos());
}
- frame->set_value(player->get_current_animation_pos());
- key_editor->set_anim_pos(player->get_current_animation_pos());
- EditorNode::get_singleton()->get_property_editor()->refresh();
- } else if (last_active) {
- //need the last frame after it stopped
+ last_active = player->is_playing();
+ //seek->set_val(player->get_position());
+ updating = false;
- frame->set_value(player->get_current_animation_pos());
- }
+ } break;
- last_active = player->is_playing();
- //seek->set_val(player->get_position());
- updating = false;
- }
+ case NOTIFICATION_ENTER_TREE: {
+
+ save_anim->get_popup()->connect("id_pressed", this, "_animation_save_menu");
+
+ tool_anim->get_popup()->connect("id_pressed", this, "_animation_tool_menu");
+
+ blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
- if (p_what == NOTIFICATION_ENTER_TREE) {
-
- //editor->connect("hide_animation_player_editors",this,"_hide_anim_editors");
- add_anim->set_icon(get_icon("New", "EditorIcons"));
- rename_anim->set_icon(get_icon("Rename", "EditorIcons"));
- duplicate_anim->set_icon(get_icon("Duplicate", "EditorIcons"));
- autoplay->set_icon(get_icon("AutoPlay", "EditorIcons"));
- load_anim->set_icon(get_icon("Folder", "EditorIcons"));
- save_anim->set_icon(get_icon("Save", "EditorIcons"));
- save_anim->get_popup()->connect("id_pressed", this, "_animation_save_menu");
- remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
-
- blend_anim->set_icon(get_icon("Blend", "EditorIcons"));
- play->set_icon(get_icon("PlayStart", "EditorIcons"));
- play_from->set_icon(get_icon("Play", "EditorIcons"));
- play_bw->set_icon(get_icon("PlayStartBackwards", "EditorIcons"));
- play_bw_from->set_icon(get_icon("PlayBackwards", "EditorIcons"));
-
- autoplay_icon = get_icon("AutoPlay", "EditorIcons");
- stop->set_icon(get_icon("Stop", "EditorIcons"));
- resource_edit_anim->set_icon(get_icon("EditResource", "EditorIcons"));
- pin->set_icon(get_icon("Pin", "EditorIcons"));
- tool_anim->set_icon(get_icon("Tools", "EditorIcons"));
- tool_anim->get_popup()->connect("id_pressed", this, "_animation_tool_menu");
-
- blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
-
- /*
- anim_editor_load->set_normal_texture( get_icon("AnimGet","EditorIcons"));
- anim_editor_store->set_normal_texture( get_icon("AnimSet","EditorIcons"));
- anim_editor_load->set_pressed_texture( get_icon("AnimGet","EditorIcons"));
- anim_editor_store->set_pressed_texture( get_icon("AnimSet","EditorIcons"));
- anim_editor_load->set_hover_texture( get_icon("AnimGetHl","EditorIcons"));
- anim_editor_store->set_hover_texture( get_icon("AnimSetHl","EditorIcons"));
-*/
-
- get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_removed", this, "_node_removed");
+
+ add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel"));
+ add_constant_override("separation", get_constant("separation", "VBoxContainer"));
+ } break;
+
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
+ add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel"));
+ add_constant_override("separation", get_constant("separation", "VBoxContainer"));
+ } break;
+
+ case NOTIFICATION_THEME_CHANGED: {
+
+ add_anim->set_icon(get_icon("New", "EditorIcons"));
+ rename_anim->set_icon(get_icon("Rename", "EditorIcons"));
+ duplicate_anim->set_icon(get_icon("Duplicate", "EditorIcons"));
+ autoplay->set_icon(get_icon("AutoPlay", "EditorIcons"));
+ load_anim->set_icon(get_icon("Folder", "EditorIcons"));
+ save_anim->set_icon(get_icon("Save", "EditorIcons"));
+
+ remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
+
+ blend_anim->set_icon(get_icon("Blend", "EditorIcons"));
+ play->set_icon(get_icon("PlayStart", "EditorIcons"));
+ play_from->set_icon(get_icon("Play", "EditorIcons"));
+ play_bw->set_icon(get_icon("PlayStartBackwards", "EditorIcons"));
+ play_bw_from->set_icon(get_icon("PlayBackwards", "EditorIcons"));
+
+ autoplay_icon = get_icon("AutoPlay", "EditorIcons");
+ stop->set_icon(get_icon("Stop", "EditorIcons"));
+ resource_edit_anim->set_icon(get_icon("EditResource", "EditorIcons"));
+ pin->set_icon(get_icon("Pin", "EditorIcons"));
+ tool_anim->set_icon(get_icon("Tools", "EditorIcons"));
+
+ } break;
}
}
@@ -1176,7 +1184,6 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
set_focus_mode(FOCUS_ALL);
player = NULL;
- add_style_override("panel", editor->get_gui_base()->get_stylebox("panel", "Panel"));
Label *l;
@@ -1376,7 +1383,6 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
key_editor = memnew(AnimationKeyEditor);
add_child(key_editor);
- add_constant_override("separation", get_constant("separation", "VBoxContainer"));
key_editor->set_v_size_flags(SIZE_EXPAND_FILL);
key_editor->connect("timeline_changed", this, "_animation_key_editor_seek");
key_editor->connect("animation_len_changed", this, "_animation_key_editor_anim_len_changed");
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 054124da8f..414b091475 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -476,7 +476,7 @@ void AnimationTreeEditor::_draw_node(const StringName &p_node) {
Color font_color = get_color("font_color", "PopupMenu");
Color font_color_title = get_color("font_color_hover", "PopupMenu");
font_color_title.a *= 0.8;
- Ref<Texture> slot_icon = get_icon("NodeRealSlot", "EditorIcons");
+ Ref<Texture> slot_icon = get_icon("VisualShaderPort", "EditorIcons");
Size2 size = get_node_size(p_node);
Point2 pos = anim_tree->node_get_pos(p_node);
@@ -599,7 +599,7 @@ void AnimationTreeEditor::_draw_node(const StringName &p_node) {
if (editable) {
- Ref<Texture> arrow = get_icon("arrow", "Tree");
+ Ref<Texture> arrow = get_icon("GuiDropdown", "EditorIcons");
Point2 arrow_ofs(w - arrow->get_width(), Math::floor((h - arrow->get_height()) / 2));
arrow->draw(ci, ofs + arrow_ofs);
}
@@ -671,7 +671,7 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName &p_node_id, bool p_in
Ref<StyleBox> style = get_stylebox("panel", "PopupMenu");
Ref<Font> font = get_font("font", "PopupMenu");
- Ref<Texture> slot_icon = get_icon("NodeRealSlot", "EditorIcons");
+ Ref<Texture> slot_icon = get_icon("VisualShaderPort", "EditorIcons");
Size2 size = get_node_size(p_node_id);
Point2 pos = anim_tree->node_get_pos(p_node_id);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index df4598793c..b28da54c6d 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -580,7 +580,8 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
} else { // p_move_mode==MOVE_LOCAL_BASE || p_move_mode==MOVE_LOCAL_WITH_ROT
- if (Node2D *node_2d = Object::cast_to<Node2D>(canvas_item)) {
+ Node2D *node_2d = Object::cast_to<Node2D>(canvas_item);
+ if (node_2d) {
if (p_move_mode == MOVE_LOCAL_WITH_ROT) {
Transform2D m;
@@ -589,9 +590,10 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
}
node_2d->set_position(node_2d->get_position() + drag);
- } else if (Control *control = Object::cast_to<Control>(canvas_item)) {
-
- control->set_position(control->get_position() + drag);
+ } else {
+ Control *control = Object::cast_to<Control>(canvas_item);
+ if (control)
+ control->set_position(control->get_position() + drag);
}
}
}
@@ -742,7 +744,8 @@ float CanvasItemEditor::_anchor_snap(float p_anchor, bool *p_snapped, float p_op
float radius = 0.05 / zoom;
float basic_anchors[3] = { 0.0, 0.5, 1.0 };
for (int i = 0; i < 3; i++) {
- if ((dist = fabs(p_anchor - basic_anchors[i])) < radius) {
+ dist = fabs(p_anchor - basic_anchors[i]);
+ if (dist < radius) {
if (!snapped || dist <= dist_min) {
p_anchor = basic_anchors[i];
dist_min = dist;
@@ -750,7 +753,8 @@ float CanvasItemEditor::_anchor_snap(float p_anchor, bool *p_snapped, float p_op
}
}
}
- if (p_opposite_anchor >= 0 && (dist = fabs(p_anchor - p_opposite_anchor)) < radius) {
+ dist = fabs(p_anchor - p_opposite_anchor);
+ if (p_opposite_anchor >= 0 && dist < radius) {
if (!snapped || dist <= dist_min) {
p_anchor = p_opposite_anchor;
dist_min = dist;
@@ -841,6 +845,8 @@ void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) {
se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
if (Object::cast_to<Control>(canvas_item))
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
+
+ se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
}
if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0])) {
@@ -1407,6 +1413,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
if (Object::cast_to<Control>(canvas_item))
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
+ se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
return;
}
@@ -1428,6 +1435,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
if (Object::cast_to<Control>(canvas_item))
se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
+ se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
return;
}
@@ -1437,6 +1445,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
if (drag != DRAG_NONE) {
drag_from = transform.affine_inverse().xform(click);
se->undo_state = canvas_item->edit_get_state();
+ se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
return;
}
}
@@ -1515,7 +1524,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
}
if (drag == DRAG_NONE) {
- if ((m->get_button_mask() & BUTTON_MASK_LEFT && tool == TOOL_PAN) || m->get_button_mask() & BUTTON_MASK_MIDDLE || (m->get_button_mask() & BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
+ if (((m->get_button_mask() & BUTTON_MASK_LEFT) && tool == TOOL_PAN) || (m->get_button_mask() & BUTTON_MASK_MIDDLE) || ((m->get_button_mask() & BUTTON_MASK_LEFT) && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
// Pan the viewport
Point2i relative;
if (bool(EditorSettings::get_singleton()->get("editors/2d/warped_mouse_panning"))) {
@@ -1989,6 +1998,23 @@ void CanvasItemEditor::_viewport_draw() {
Rect2 rect = canvas_item->get_item_rect();
+ if (drag != DRAG_NONE && drag != DRAG_PIVOT) {
+ const Transform2D pre_drag_xform = transform * se->pre_drag_xform;
+ const Color pre_drag_color = Color(0.4, 0.6, 1, 0.7);
+
+ Vector2 pre_drag_endpoints[4] = {
+
+ pre_drag_xform.xform(rect.position),
+ pre_drag_xform.xform(rect.position + Vector2(rect.size.x, 0)),
+ pre_drag_xform.xform(rect.position + rect.size),
+ pre_drag_xform.xform(rect.position + Vector2(0, rect.size.y))
+ };
+
+ for (int i = 0; i < 4; i++) {
+ viewport->draw_line(pre_drag_endpoints[i], pre_drag_endpoints[(i + 1) % 4], pre_drag_color, 2);
+ }
+ }
+
Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
VisualServer::get_singleton()->canvas_item_add_set_transform(ci, xform);
@@ -2269,6 +2295,8 @@ void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));
+
List<Node *> &selection = editor_selection->get_selected_node_list();
bool all_control = true;
@@ -2295,19 +2323,24 @@ void CanvasItemEditor::_notification(int p_what) {
Rect2 r = canvas_item->get_item_rect();
Transform2D xform = canvas_item->get_transform();
- float anchors[4];
- Vector2 pivot;
+ if (r != se->prev_rect || xform != se->prev_xform) {
+ viewport->update();
+ se->prev_rect = r;
+ se->prev_xform = xform;
+ }
+
if (Object::cast_to<Control>(canvas_item)) {
+ float anchors[4];
+ Vector2 pivot;
+
pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
anchors[MARGIN_LEFT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_LEFT);
anchors[MARGIN_RIGHT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_RIGHT);
anchors[MARGIN_TOP] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_TOP);
anchors[MARGIN_BOTTOM] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_BOTTOM);
- if (r != se->prev_rect || xform != se->prev_xform || pivot != se->prev_pivot || anchors[MARGIN_LEFT] != se->prev_anchors[MARGIN_LEFT] || anchors[MARGIN_RIGHT] != se->prev_anchors[MARGIN_RIGHT] || anchors[MARGIN_TOP] != se->prev_anchors[MARGIN_TOP] || anchors[MARGIN_BOTTOM] != se->prev_anchors[MARGIN_BOTTOM]) {
+ if (pivot != se->prev_pivot || anchors[MARGIN_LEFT] != se->prev_anchors[MARGIN_LEFT] || anchors[MARGIN_RIGHT] != se->prev_anchors[MARGIN_RIGHT] || anchors[MARGIN_TOP] != se->prev_anchors[MARGIN_TOP] || anchors[MARGIN_BOTTOM] != se->prev_anchors[MARGIN_BOTTOM]) {
viewport->update();
- se->prev_rect = r;
- se->prev_xform = xform;
se->prev_pivot = pivot;
se->prev_anchors[MARGIN_LEFT] = anchors[MARGIN_LEFT];
se->prev_anchors[MARGIN_RIGHT] = anchors[MARGIN_RIGHT];
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 2e1a2eac5f..f61bfc9ebb 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -58,6 +58,8 @@ public:
Vector2 prev_pivot;
float prev_anchors[4];
+ Transform2D pre_drag_xform;
+
CanvasItemEditorSelectedItem() { prev_rot = 0; }
};
@@ -315,7 +317,7 @@ class CanvasItemEditor : public VBoxContainer {
void _prepare_drag(const Point2 &p_click_pos);
DragType _get_anchor_handle_drag_type(const Point2 &p_click, Vector2 &r_point);
- float _anchor_snap(float anchor, bool *snapped = NULL, float p_opposite_anchor = -1);
+ float _anchor_snap(float p_anchor, bool *p_snapped = NULL, float p_opposite_anchor = -1);
Vector2 _anchor_to_position(Control *p_control, Vector2 anchor);
Vector2 _position_to_anchor(Control *p_control, Vector2 position);
diff --git a/editor/plugins/navigation_mesh_editor_plugin.cpp b/editor/plugins/navigation_mesh_editor_plugin.cpp
new file mode 100644
index 0000000000..f0f5a62494
--- /dev/null
+++ b/editor/plugins/navigation_mesh_editor_plugin.cpp
@@ -0,0 +1,165 @@
+/*************************************************************************/
+/* navigation_mesh_editor_plugin.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "navigation_mesh_editor_plugin.h"
+#include "io/marshalls.h"
+#include "io/resource_saver.h"
+#include "scene/3d/mesh_instance.h"
+#include "scene/gui/box_container.h"
+
+#ifdef RECAST_ENABLED
+
+void NavigationMeshEditor::_node_removed(Node *p_node) {
+
+ if (p_node == node) {
+ node = NULL;
+
+ hide();
+ }
+}
+
+void NavigationMeshEditor::_notification(int p_option) {
+
+ if (p_option == NOTIFICATION_ENTER_TREE) {
+
+ button_bake->set_icon(get_icon("Bake", "EditorIcons"));
+ button_reset->set_icon(get_icon("Reload", "EditorIcons"));
+ }
+}
+
+void NavigationMeshEditor::_bake_pressed() {
+
+ ERR_FAIL_COND(!node);
+ const String conf_warning = node->get_configuration_warning();
+ if (!conf_warning.empty()) {
+ err_dialog->set_text(conf_warning);
+ err_dialog->popup_centered_minsize();
+ button_bake->set_pressed(false);
+ return;
+ }
+
+ NavigationMeshGenerator::clear(node->get_navigation_mesh());
+ NavigationMeshGenerator::bake(node->get_navigation_mesh(), node);
+
+ if (node) {
+ node->update_gizmo();
+ }
+}
+
+void NavigationMeshEditor::_clear_pressed() {
+
+ if (node)
+ NavigationMeshGenerator::clear(node->get_navigation_mesh());
+
+ button_bake->set_pressed(false);
+ bake_info->set_text("");
+
+ if (node) {
+ node->update_gizmo();
+ }
+}
+
+void NavigationMeshEditor::edit(NavigationMeshInstance *p_nav_mesh_instance) {
+
+ if (p_nav_mesh_instance == NULL || node == p_nav_mesh_instance) {
+ return;
+ }
+
+ node = p_nav_mesh_instance;
+}
+
+void NavigationMeshEditor::_bind_methods() {
+
+ ClassDB::bind_method("_bake_pressed", &NavigationMeshEditor::_bake_pressed);
+ ClassDB::bind_method("_clear_pressed", &NavigationMeshEditor::_clear_pressed);
+}
+
+NavigationMeshEditor::NavigationMeshEditor() {
+
+ bake_hbox = memnew(HBoxContainer);
+ button_bake = memnew(ToolButton);
+ button_bake->set_text(TTR("Bake!"));
+ button_bake->set_toggle_mode(true);
+ button_reset = memnew(Button);
+ button_bake->set_tooltip(TTR("Bake the navigation mesh.\n"));
+
+ bake_info = memnew(Label);
+ bake_hbox->add_child(button_bake);
+ bake_hbox->add_child(button_reset);
+ bake_hbox->add_child(bake_info);
+
+ err_dialog = memnew(AcceptDialog);
+ add_child(err_dialog);
+ node = NULL;
+
+ button_bake->connect("pressed", this, "_bake_pressed");
+ button_reset->connect("pressed", this, "_clear_pressed");
+ button_reset->set_tooltip(TTR("Clear the navigation mesh."));
+}
+
+NavigationMeshEditor::~NavigationMeshEditor() {
+}
+
+void NavigationMeshEditorPlugin::edit(Object *p_object) {
+
+ navigation_mesh_editor->edit(Object::cast_to<NavigationMeshInstance>(p_object));
+}
+
+bool NavigationMeshEditorPlugin::handles(Object *p_object) const {
+
+ return p_object->is_class("NavigationMeshInstance");
+}
+
+void NavigationMeshEditorPlugin::make_visible(bool p_visible) {
+
+ if (p_visible) {
+ navigation_mesh_editor->show();
+ navigation_mesh_editor->bake_hbox->show();
+ } else {
+
+ navigation_mesh_editor->hide();
+ navigation_mesh_editor->bake_hbox->hide();
+ navigation_mesh_editor->edit(NULL);
+ }
+}
+
+NavigationMeshEditorPlugin::NavigationMeshEditorPlugin(EditorNode *p_node) {
+
+ editor = p_node;
+ navigation_mesh_editor = memnew(NavigationMeshEditor);
+ editor->get_viewport()->add_child(navigation_mesh_editor);
+ add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, navigation_mesh_editor->bake_hbox);
+ navigation_mesh_editor->hide();
+ navigation_mesh_editor->bake_hbox->hide();
+}
+
+NavigationMeshEditorPlugin::~NavigationMeshEditorPlugin() {
+}
+
+#endif // RECAST_ENABLED
diff --git a/editor/plugins/navigation_mesh_editor_plugin.h b/editor/plugins/navigation_mesh_editor_plugin.h
new file mode 100644
index 0000000000..bac7f608ab
--- /dev/null
+++ b/editor/plugins/navigation_mesh_editor_plugin.h
@@ -0,0 +1,86 @@
+/*************************************************************************/
+/* navigation_mesh_editor_plugin.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef NAVIGATION_MESH_GENERATOR_PLUGIN_H
+#define NAVIGATION_MESH_GENERATOR_PLUGIN_H
+
+#ifdef RECAST_ENABLED
+
+#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
+#include "navigation_mesh_generator.h"
+
+class NavigationMeshEditor : public Control {
+ friend class NavigationMeshEditorPlugin;
+
+ GDCLASS(NavigationMeshEditor, Control);
+
+ AcceptDialog *err_dialog;
+
+ HBoxContainer *bake_hbox;
+ Button *button_bake;
+ Button *button_reset;
+ Label *bake_info;
+
+ NavigationMeshInstance *node;
+
+ void _bake_pressed();
+ void _clear_pressed();
+
+protected:
+ void _node_removed(Node *p_node);
+ static void _bind_methods();
+ void _notification(int p_option);
+
+public:
+ void edit(NavigationMeshInstance *p_nav_mesh_instance);
+ NavigationMeshEditor();
+ ~NavigationMeshEditor();
+};
+
+class NavigationMeshEditorPlugin : public EditorPlugin {
+
+ GDCLASS(NavigationMeshEditorPlugin, EditorPlugin);
+
+ NavigationMeshEditor *navigation_mesh_editor;
+ EditorNode *editor;
+
+public:
+ virtual String get_name() const { return "NavigationMesh"; }
+ bool has_main_screen() const { return false; }
+ virtual void edit(Object *p_object);
+ virtual bool handles(Object *p_object) const;
+ virtual void make_visible(bool p_visible);
+
+ NavigationMeshEditorPlugin(EditorNode *p_node);
+ ~NavigationMeshEditorPlugin();
+};
+
+#endif // RECAST_ENABLED
+#endif // NAVIGATION_MESH_GENERATOR_PLUGIN_H
diff --git a/editor/plugins/navigation_mesh_generator.cpp b/editor/plugins/navigation_mesh_generator.cpp
new file mode 100644
index 0000000000..526db3a582
--- /dev/null
+++ b/editor/plugins/navigation_mesh_generator.cpp
@@ -0,0 +1,311 @@
+/*************************************************************************/
+/* navigation_mesh_generator.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "navigation_mesh_generator.h"
+
+#ifdef RECAST_ENABLED
+
+void NavigationMeshGenerator::_add_vertex(const Vector3 &p_vec3, Vector<float> &p_verticies) {
+ p_verticies.push_back(p_vec3.x);
+ p_verticies.push_back(p_vec3.y);
+ p_verticies.push_back(p_vec3.z);
+}
+
+void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices) {
+ int current_vertex_count = p_verticies.size() / 3;
+
+ for (int i = 0; i < p_mesh->get_surface_count(); i++) {
+ if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES)
+ continue;
+
+ int index_count = 0;
+ if (p_mesh->surface_get_format(i) & Mesh::ARRAY_FORMAT_INDEX) {
+ index_count = p_mesh->surface_get_array_index_len(i);
+ } else {
+ index_count = p_mesh->surface_get_array_len(i);
+ }
+
+ ERR_CONTINUE((index_count == 0 || (index_count % 3) != 0));
+
+ int face_count = index_count / 3;
+
+ Array a = p_mesh->surface_get_arrays(i);
+
+ PoolVector<Vector3> mesh_vertices = a[Mesh::ARRAY_VERTEX];
+ PoolVector<Vector3>::Read vr = mesh_vertices.read();
+
+ if (p_mesh->surface_get_format(i) & Mesh::ARRAY_FORMAT_INDEX) {
+
+ PoolVector<int> mesh_indices = a[Mesh::ARRAY_INDEX];
+ PoolVector<int>::Read ir = mesh_indices.read();
+
+ for (int i = 0; i < mesh_vertices.size(); i++) {
+ _add_vertex(p_xform.xform(vr[i]), p_verticies);
+ }
+
+ for (int i = 0; i < face_count; i++) {
+ // CCW
+ p_indices.push_back(current_vertex_count + (ir[i * 3 + 0]));
+ p_indices.push_back(current_vertex_count + (ir[i * 3 + 2]));
+ p_indices.push_back(current_vertex_count + (ir[i * 3 + 1]));
+ }
+ } else {
+ face_count = mesh_vertices.size() / 3;
+ for (int i = 0; i < face_count; i++) {
+ _add_vertex(p_xform.xform(vr[i * 3 + 0]), p_verticies);
+ _add_vertex(p_xform.xform(vr[i * 3 + 2]), p_verticies);
+ _add_vertex(p_xform.xform(vr[i * 3 + 1]), p_verticies);
+
+ p_indices.push_back(current_vertex_count + (i * 3 + 0));
+ p_indices.push_back(current_vertex_count + (i * 3 + 1));
+ p_indices.push_back(current_vertex_count + (i * 3 + 2));
+ }
+ }
+ }
+}
+
+void NavigationMeshGenerator::_parse_geometry(const Transform &p_base_inverse, Node *p_node, Vector<float> &p_verticies, Vector<int> &p_indices) {
+
+ if (Object::cast_to<MeshInstance>(p_node)) {
+
+ MeshInstance *mesh_instance = Object::cast_to<MeshInstance>(p_node);
+ Ref<Mesh> mesh = mesh_instance->get_mesh();
+ if (mesh.is_valid()) {
+ _add_mesh(mesh, p_base_inverse * mesh_instance->get_global_transform(), p_verticies, p_indices);
+ }
+ }
+
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ _parse_geometry(p_base_inverse, p_node->get_child(i), p_verticies, p_indices);
+ }
+}
+
+void NavigationMeshGenerator::_convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh) {
+
+ PoolVector<Vector3> nav_vertices;
+
+ for (int i = 0; i < p_detail_mesh->nverts; i++) {
+ const float *v = &p_detail_mesh->verts[i * 3];
+ nav_vertices.append(Vector3(v[0], v[1], v[2]));
+ }
+ p_nav_mesh->set_vertices(nav_vertices);
+
+ for (int i = 0; i < p_detail_mesh->nmeshes; i++) {
+ const unsigned int *m = &p_detail_mesh->meshes[i * 4];
+ const unsigned int bverts = m[0];
+ const unsigned int btris = m[2];
+ const unsigned int ntris = m[3];
+ const unsigned char *tris = &p_detail_mesh->tris[btris * 4];
+ for (unsigned int j = 0; j < ntris; j++) {
+ Vector<int> nav_indices;
+ nav_indices.resize(3);
+ nav_indices[0] = ((int)(bverts + tris[j * 4 + 0]));
+ nav_indices[1] = ((int)(bverts + tris[j * 4 + 1]));
+ nav_indices[2] = ((int)(bverts + tris[j * 4 + 2]));
+ p_nav_mesh->add_polygon(nav_indices);
+ }
+ }
+}
+
+void NavigationMeshGenerator::_build_recast_navigation_mesh(Ref<NavigationMesh> p_nav_mesh, EditorProgress *ep,
+ rcHeightfield *hf, rcCompactHeightfield *chf, rcContourSet *cset, rcPolyMesh *poly_mesh, rcPolyMeshDetail *detail_mesh,
+ Vector<float> &verticies, Vector<int> &indices) {
+ rcContext ctx;
+ ep->step(TTR("Setting up Configuration..."), 1);
+
+ const float *verts = verticies.ptr();
+ const int nverts = verticies.size() / 3;
+ const int *tris = indices.ptr();
+ const int ntris = indices.size() / 3;
+
+ float bmin[3], bmax[3];
+ rcCalcBounds(verts, nverts, bmin, bmax);
+
+ rcConfig cfg;
+ memset(&cfg, 0, sizeof(cfg));
+
+ cfg.cs = p_nav_mesh->get_cell_size();
+ cfg.ch = p_nav_mesh->get_cell_height();
+ cfg.walkableSlopeAngle = p_nav_mesh->get_agent_max_slope();
+ cfg.walkableHeight = (int)Math::ceil(p_nav_mesh->get_agent_height() / cfg.ch);
+ cfg.walkableClimb = (int)Math::floor(p_nav_mesh->get_agent_max_climb() / cfg.ch);
+ cfg.walkableRadius = (int)Math::ceil(p_nav_mesh->get_agent_radius() / cfg.cs);
+ cfg.maxEdgeLen = (int)(p_nav_mesh->get_edge_max_length() / p_nav_mesh->get_cell_size());
+ cfg.maxSimplificationError = p_nav_mesh->get_edge_max_error();
+ cfg.minRegionArea = (int)(p_nav_mesh->get_region_min_size() * p_nav_mesh->get_region_min_size());
+ cfg.mergeRegionArea = (int)(p_nav_mesh->get_region_merge_size() * p_nav_mesh->get_region_merge_size());
+ cfg.maxVertsPerPoly = (int)p_nav_mesh->get_verts_per_poly();
+ cfg.detailSampleDist = p_nav_mesh->get_detail_sample_distance() < 0.9f ? 0 : p_nav_mesh->get_cell_size() * p_nav_mesh->get_detail_sample_distance();
+ cfg.detailSampleMaxError = p_nav_mesh->get_cell_height() * p_nav_mesh->get_detail_sample_max_error();
+
+ cfg.bmin[0] = bmin[0];
+ cfg.bmin[1] = bmin[1];
+ cfg.bmin[2] = bmin[2];
+ cfg.bmax[0] = bmax[0];
+ cfg.bmax[1] = bmax[1];
+ cfg.bmax[2] = bmax[2];
+
+ ep->step(TTR("Calculating grid size..."), 2);
+ rcCalcGridSize(cfg.bmin, cfg.bmax, cfg.cs, &cfg.width, &cfg.height);
+
+ ep->step(TTR("Creating heightfield..."), 3);
+ hf = rcAllocHeightfield();
+
+ ERR_FAIL_COND(!hf);
+ ERR_FAIL_COND(!rcCreateHeightfield(&ctx, *hf, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs, cfg.ch));
+
+ ep->step(TTR("Marking walkable triangles..."), 4);
+ {
+ Vector<unsigned char> tri_areas;
+ tri_areas.resize(ntris);
+
+ ERR_FAIL_COND(tri_areas.size() == 0);
+
+ memset(tri_areas.ptr(), 0, ntris * sizeof(unsigned char));
+ rcMarkWalkableTriangles(&ctx, cfg.walkableSlopeAngle, verts, nverts, tris, ntris, tri_areas.ptr());
+
+ ERR_FAIL_COND(!rcRasterizeTriangles(&ctx, verts, nverts, tris, tri_areas.ptr(), ntris, *hf, cfg.walkableClimb));
+ }
+
+ if (p_nav_mesh->get_filter_low_hanging_obstacles())
+ rcFilterLowHangingWalkableObstacles(&ctx, cfg.walkableClimb, *hf);
+ if (p_nav_mesh->get_filter_ledge_spans())
+ rcFilterLedgeSpans(&ctx, cfg.walkableHeight, cfg.walkableClimb, *hf);
+ if (p_nav_mesh->get_filter_walkable_low_height_spans())
+ rcFilterWalkableLowHeightSpans(&ctx, cfg.walkableHeight, *hf);
+
+ ep->step(TTR("Constructing compact heightfield..."), 5);
+
+ chf = rcAllocCompactHeightfield();
+
+ ERR_FAIL_COND(!chf);
+ ERR_FAIL_COND(!rcBuildCompactHeightfield(&ctx, cfg.walkableHeight, cfg.walkableClimb, *hf, *chf));
+
+ rcFreeHeightField(hf);
+ hf = 0;
+
+ ep->step(TTR("Eroding walkable area..."), 6);
+ ERR_FAIL_COND(!rcErodeWalkableArea(&ctx, cfg.walkableRadius, *chf));
+
+ ep->step(TTR("Partioning..."), 7);
+ if (p_nav_mesh->get_sample_partition_type() == NavigationMesh::SAMPLE_PARTITION_WATERSHED) {
+ ERR_FAIL_COND(!rcBuildDistanceField(&ctx, *chf));
+ ERR_FAIL_COND(!rcBuildRegions(&ctx, *chf, 0, cfg.minRegionArea, cfg.mergeRegionArea));
+ } else if (p_nav_mesh->get_sample_partition_type() == NavigationMesh::SAMPLE_PARTITION_MONOTONE) {
+ ERR_FAIL_COND(!rcBuildRegionsMonotone(&ctx, *chf, 0, cfg.minRegionArea, cfg.mergeRegionArea));
+ } else {
+ ERR_FAIL_COND(!rcBuildLayerRegions(&ctx, *chf, 0, cfg.minRegionArea));
+ }
+
+ ep->step(TTR("Creating contours..."), 8);
+
+ cset = rcAllocContourSet();
+
+ ERR_FAIL_COND(!cset);
+ ERR_FAIL_COND(!rcBuildContours(&ctx, *chf, cfg.maxSimplificationError, cfg.maxEdgeLen, *cset));
+
+ ep->step(TTR("Creating polymesh..."), 9);
+
+ poly_mesh = rcAllocPolyMesh();
+ ERR_FAIL_COND(!poly_mesh);
+ ERR_FAIL_COND(!rcBuildPolyMesh(&ctx, *cset, cfg.maxVertsPerPoly, *poly_mesh));
+
+ detail_mesh = rcAllocPolyMeshDetail();
+ ERR_FAIL_COND(!detail_mesh);
+ ERR_FAIL_COND(!rcBuildPolyMeshDetail(&ctx, *poly_mesh, *chf, cfg.detailSampleDist, cfg.detailSampleMaxError, *detail_mesh));
+
+ rcFreeCompactHeightfield(chf);
+ chf = 0;
+ rcFreeContourSet(cset);
+ cset = 0;
+
+ ep->step(TTR("Converting to native navigation mesh..."), 10);
+
+ _convert_detail_mesh_to_native_navigation_mesh(detail_mesh, p_nav_mesh);
+
+ rcFreePolyMesh(poly_mesh);
+ poly_mesh = 0;
+ rcFreePolyMeshDetail(detail_mesh);
+ detail_mesh = 0;
+}
+
+void NavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node) {
+
+ ERR_FAIL_COND(!p_nav_mesh.is_valid());
+
+ EditorProgress ep("bake", TTR("Navigation Mesh Generator Setup:"), 11);
+ ep.step(TTR("Parsing Geometry..."), 0);
+
+ Vector<float> verticies;
+ Vector<int> indices;
+
+ _parse_geometry(Object::cast_to<Spatial>(p_node)->get_global_transform().affine_inverse(), p_node, verticies, indices);
+
+ if (verticies.size() > 0 && indices.size() > 0) {
+
+ rcHeightfield *hf = NULL;
+ rcCompactHeightfield *chf = NULL;
+ rcContourSet *cset = NULL;
+ rcPolyMesh *poly_mesh = NULL;
+ rcPolyMeshDetail *detail_mesh = NULL;
+
+ _build_recast_navigation_mesh(p_nav_mesh, &ep, hf, chf, cset, poly_mesh, detail_mesh, verticies, indices);
+
+ if (hf) {
+ rcFreeHeightField(hf);
+ hf = 0;
+ }
+ if (chf) {
+ rcFreeCompactHeightfield(chf);
+ chf = 0;
+ }
+ if (cset) {
+ rcFreeContourSet(cset);
+ cset = 0;
+ }
+ if (poly_mesh) {
+ rcFreePolyMesh(poly_mesh);
+ poly_mesh = 0;
+ }
+ if (detail_mesh) {
+ rcFreePolyMeshDetail(detail_mesh);
+ detail_mesh = 0;
+ }
+ }
+ ep.step(TTR("Done!"), 11);
+}
+
+void NavigationMeshGenerator::clear(Ref<NavigationMesh> p_nav_mesh) {
+ if (p_nav_mesh.is_valid()) {
+ p_nav_mesh->clear_polygons();
+ p_nav_mesh->set_vertices(PoolVector<Vector3>());
+ }
+}
+
+#endif //RECAST_ENABLED
diff --git a/editor/plugins/navigation_mesh_generator.h b/editor/plugins/navigation_mesh_generator.h
new file mode 100644
index 0000000000..0a1c497f8f
--- /dev/null
+++ b/editor/plugins/navigation_mesh_generator.h
@@ -0,0 +1,65 @@
+/*************************************************************************/
+/* navigation_mesh_generator.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef NAVIGATION_MESH_GENERATOR_H
+#define NAVIGATION_MESH_GENERATOR_H
+
+#ifdef RECAST_ENABLED
+
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
+
+#include "scene/3d/mesh_instance.h"
+
+#include "scene/3d/navigation_mesh.h"
+
+#include "os/thread.h"
+#include "scene/resources/shape.h"
+
+#include <Recast.h>
+
+class NavigationMeshGenerator {
+protected:
+ static void _add_vertex(const Vector3 &p_vec3, Vector<float> &p_verticies);
+ static void _add_mesh(const Ref<Mesh> &p_mesh, const Transform &p_xform, Vector<float> &p_verticies, Vector<int> &p_indices);
+ static void _parse_geometry(const Transform &p_base_inverse, Node *p_node, Vector<float> &p_verticies, Vector<int> &p_indices);
+
+ static void _convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref<NavigationMesh> p_nav_mesh);
+ static void _build_recast_navigation_mesh(Ref<NavigationMesh> p_nav_mesh, EditorProgress *ep,
+ rcHeightfield *hf, rcCompactHeightfield *chf, rcContourSet *cset, rcPolyMesh *poly_mesh,
+ rcPolyMeshDetail *detail_mesh, Vector<float> &verticies, Vector<int> &indices);
+
+public:
+ static void bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node);
+ static void clear(Ref<NavigationMesh> p_nav_mesh);
+};
+
+#endif // RECAST_ENABLED
+
+#endif // NAVIGATION_MESH_GENERATOR_H
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index f7008298f0..3917c700f0 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -395,7 +395,7 @@ bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (mm.is_valid()) {
- if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
+ if (edited_point != -1 && (wip_active || (mm->get_button_mask() & BUTTON_MASK_LEFT))) {
Vector2 gpoint = mm->get_position();
Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
@@ -554,7 +554,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
if (mm.is_valid()) {
- if (mm->get_button_mask() & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
+ if ((mm->get_button_mask() & BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
Vector2 drag(mm->get_relative().x, mm->get_relative().y);
uv_hscroll->set_value(uv_hscroll->get_value() - drag.x);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 04be1ba4ab..9af5885a17 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -421,8 +421,10 @@ void ScriptEditor::_go_to_tab(int p_idx) {
_update_history_arrows();
_update_script_colors();
_update_members_overview();
+ _update_help_overview();
_update_selected_editor_menu();
_update_members_overview_visibility();
+ _update_help_overview_visibility();
}
void ScriptEditor::_add_recent_script(String p_path) {
@@ -555,6 +557,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
_update_script_names();
_update_members_overview_visibility();
+ _update_help_overview_visibility();
_save_layout();
}
@@ -1110,6 +1113,7 @@ void ScriptEditor::_notification(int p_what) {
editor->connect("resource_saved", this, "_res_saved_callback");
script_list->connect("item_selected", this, "_script_selected");
members_overview->connect("item_selected", this, "_members_overview_selected");
+ help_overview->connect("item_selected", this, "_help_overview_selected");
script_split->connect("dragged", this, "_script_split_dragged");
autosave_timer->connect("timeout", this, "_autosave_scripts");
{
@@ -1278,6 +1282,15 @@ void ScriptEditor::_members_overview_selected(int p_idx) {
se->ensure_focus();
}
+void ScriptEditor::_help_overview_selected(int p_idx) {
+ Node *current = tab_container->get_child(tab_container->get_current_tab());
+ EditorHelp *se = Object::cast_to<EditorHelp>(current);
+ if (!se) {
+ return;
+ }
+ se->scroll_to_section(help_overview->get_item_metadata(p_idx));
+}
+
void ScriptEditor::_script_selected(int p_idx) {
grab_focus_block = !Input::get_singleton()->is_mouse_button_pressed(1); //amazing hack, simply amazing
@@ -1387,14 +1400,58 @@ void ScriptEditor::_update_members_overview() {
}
}
+void ScriptEditor::_update_help_overview_visibility() {
+
+ int selected = tab_container->get_current_tab();
+ if (selected < 0 || selected >= tab_container->get_child_count())
+ return;
+
+ Node *current = tab_container->get_child(tab_container->get_current_tab());
+ EditorHelp *se = Object::cast_to<EditorHelp>(current);
+ if (!se) {
+ help_overview->set_visible(false);
+ return;
+ }
+
+ if (help_overview_enabled) {
+ help_overview->set_visible(true);
+ } else {
+ help_overview->set_visible(false);
+ }
+}
+
+void ScriptEditor::_update_help_overview() {
+
+ int selected = tab_container->get_current_tab();
+ if (selected < 0 || selected >= tab_container->get_child_count())
+ return;
+
+ Node *current = tab_container->get_child(tab_container->get_current_tab());
+ EditorHelp *se = Object::cast_to<EditorHelp>(current);
+ if (!se) {
+ return;
+ }
+
+ help_overview->clear();
+
+ Vector<Pair<String, int> > sections = se->get_sections();
+ for (int i = 0; i < sections.size(); i++) {
+ help_overview->add_item(sections[i].first);
+ help_overview->set_item_metadata(i, sections[i].second);
+ }
+}
+
+void _help_overview_selected(int p_idx) {
+}
+
void ScriptEditor::_update_script_colors() {
bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_enabled");
bool highlight_current = EditorSettings::get_singleton()->get("text_editor/open_scripts/highlight_current_script");
int hist_size = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_history_size");
- Color hot_color = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_hot_color");
- Color cold_color = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_cold_color");
+ Color hot_color = get_color("accent_color", "Editor");
+ Color cold_color = get_color("font_color", "Editor");
for (int i = 0; i < script_list->get_item_count(); i++) {
@@ -1531,6 +1588,7 @@ void ScriptEditor::_update_script_names() {
}
_update_members_overview();
+ _update_help_overview();
_update_script_colors();
}
@@ -1624,9 +1682,10 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool
break;
}
ERR_FAIL_COND_V(!se, false);
- tab_container->add_child(se);
+ // load script before adding as child else editor will crash at theme loading
se->set_edited_script(p_script);
+ tab_container->add_child(se);
se->set_tooltip_request_func("_get_debug_tooltip", this);
if (se->get_edit_menu()) {
se->get_edit_menu()->hide();
@@ -1785,7 +1844,9 @@ void ScriptEditor::_editor_settings_changed() {
use_space_indentation = EditorSettings::get_singleton()->get("text_editor/indent/type");
members_overview_enabled = EditorSettings::get_singleton()->get("text_editor/open_scripts/show_members_overview");
+ help_overview_enabled = EditorSettings::get_singleton()->get("text_editor/help/show_help_index");
_update_members_overview_visibility();
+ _update_help_overview_visibility();
float autosave_time = EditorSettings::get_singleton()->get("text_editor/files/autosave_interval_secs");
if (autosave_time > 0) {
@@ -2164,6 +2225,7 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_update_script_names", &ScriptEditor::_update_script_names);
ClassDB::bind_method("_tree_changed", &ScriptEditor::_tree_changed);
ClassDB::bind_method("_members_overview_selected", &ScriptEditor::_members_overview_selected);
+ ClassDB::bind_method("_help_overview_selected", &ScriptEditor::_help_overview_selected);
ClassDB::bind_method("_script_selected", &ScriptEditor::_script_selected);
ClassDB::bind_method("_script_created", &ScriptEditor::_script_created);
ClassDB::bind_method("_script_split_dragged", &ScriptEditor::_script_split_dragged);
@@ -2193,6 +2255,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
pending_auto_reload = false;
auto_reload_running_scripts = false;
members_overview_enabled = true;
+ help_overview_enabled = true;
editor = p_editor;
VBoxContainer *main_container = memnew(VBoxContainer);
@@ -2221,6 +2284,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview->set_custom_minimum_size(Size2(0, 100)); //need to give a bit of limit to avoid it from disappearing
members_overview->set_v_size_flags(SIZE_EXPAND_FILL);
+ help_overview = memnew(ItemList);
+ list_split->add_child(help_overview);
+ help_overview->set_custom_minimum_size(Size2(0, 100)); //need to give a bit of limit to avoid it from disappearing
+ help_overview->set_v_size_flags(SIZE_EXPAND_FILL);
+
tab_container = memnew(TabContainer);
tab_container->set_tabs_visible(false);
script_split->add_child(tab_container);
@@ -2416,6 +2484,9 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
use_space_indentation = false;
ScriptServer::edit_request_func = _open_script_request;
+
+ add_style_override("panel", editor->get_gui_base()->get_stylebox("ScriptEditorPanel", "EditorStyles"));
+ tab_container->add_style_override("panel", editor->get_gui_base()->get_stylebox("ScriptEditor", "EditorStyles"));
}
ScriptEditor::~ScriptEditor() {
@@ -2517,8 +2588,6 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled", true);
EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true);
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
- EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color::html("ed5e5e"));
- EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color(1, 1, 1, 0.3));
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.5));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index d2677c6a4a..03fc4da7ce 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -187,6 +187,8 @@ class ScriptEditor : public PanelContainer {
HSplitContainer *script_split;
ItemList *members_overview;
bool members_overview_enabled;
+ ItemList *help_overview;
+ bool help_overview_enabled;
VSplitContainer *list_split;
TabContainer *tab_container;
EditorFileDialog *file_dialog;
@@ -294,6 +296,10 @@ class ScriptEditor : public PanelContainer {
void _members_overview_selected(int p_idx);
void _script_selected(int p_idx);
+ void _update_help_overview_visibility();
+ void _update_help_overview();
+ void _help_overview_selected(int p_idx);
+
void _find_scripts(Node *p_base, Node *p_current, Set<Ref<Script> > &used);
void _tree_changed();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index fae57eb5d2..c875ee7011 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -75,35 +75,98 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->clear_colors();
- /* keyword color */
-
- text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0)));
- text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0)));
- text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244")));
- text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")));
- text_edit->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")));
- text_edit->add_color_override("completion_font_color", EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")));
- text_edit->add_color_override("font_color", EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0)));
- text_edit->add_color_override("line_number_color", EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0)));
- text_edit->add_color_override("caret_color", EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0)));
- text_edit->add_color_override("caret_background_color", EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0)));
- text_edit->add_color_override("font_selected_color", EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1)));
- text_edit->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
- text_edit->add_color_override("brace_mismatch_color", EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2)));
- text_edit->add_color_override("current_line_color", EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15)));
- text_edit->add_color_override("line_length_guideline_color", EDITOR_DEF("text_editor/highlighting/line_length_guideline_color", Color(0, 0, 0)));
- text_edit->add_color_override("word_highlighted_color", EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)));
- text_edit->add_color_override("number_color", EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2)));
- text_edit->add_color_override("function_color", EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8)));
- text_edit->add_color_override("member_variable_color", EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3)));
- text_edit->add_color_override("mark_color", EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4)));
- text_edit->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2)));
- text_edit->add_color_override("search_result_color", EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)));
- text_edit->add_color_override("search_result_border_color", EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)));
- text_edit->add_color_override("symbol_color", EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff)));
- text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 4));
+ Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0));
+ Color completion_background_color = EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0));
+ Color completion_selected_color = EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"));
+ Color completion_existing_color = EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
+ Color completion_scroll_color = EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
+ Color completion_font_color = EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
+ Color text_color = EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0));
+ Color line_number_color = EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0));
+ Color caret_color = EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0));
+ Color caret_background_color = EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0));
+ Color text_selected_color = EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1));
+ Color selection_color = EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1));
+ Color brace_mismatch_color = EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
+ Color current_line_color = EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
+ Color line_length_guideline_color = EDITOR_DEF("text_editor/highlighting/line_length_guideline_color", Color(0, 0, 0));
+ Color word_highlighted_color = EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
+ Color number_color = EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2));
+ Color function_color = EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8));
+ Color member_variable_color = EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3));
+ Color mark_color = EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
+ Color breakpoint_color = EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
+ Color search_result_color = EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
+ Color search_result_border_color = EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
+ Color symbol_color = EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff));
Color keyword_color = EDITOR_DEF("text_editor/highlighting/keyword_color", Color(0.5, 0.0, 0.2));
+ Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
+ Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
+ Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
+ Color string_color = EDITOR_DEF("text_editor/highlighting/string_color", Color::hex(0x6b6f00ff));
+
+ // Adapt
+ if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
+ Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
+
+ symbol_color = tm->get_color("text_editor/theme/symbol_color", "Editor");
+ keyword_color = tm->get_color("text_editor/theme/keyword_color", "Editor");
+ basetype_color = tm->get_color("text_editor/theme/basetype_color", "Editor");
+ type_color = tm->get_color("text_editor/theme/type_color", "Editor");
+ comment_color = tm->get_color("text_editor/theme/comment_color", "Editor");
+ string_color = tm->get_color("text_editor/theme/string_color", "Editor");
+ background_color = tm->get_color("text_editor/theme/background_color", "Editor");
+ completion_background_color = tm->get_color("text_editor/theme/completion_background_color", "Editor");
+ completion_selected_color = tm->get_color("text_editor/theme/completion_selected_color", "Editor");
+ completion_existing_color = tm->get_color("text_editor/theme/completion_existing_color", "Editor");
+ completion_scroll_color = tm->get_color("text_editor/theme/completion_scroll_color", "Editor");
+ completion_font_color = tm->get_color("text_editor/theme/completion_font_color", "Editor");
+ text_color = tm->get_color("text_editor/theme/text_color", "Editor");
+ line_number_color = tm->get_color("text_editor/theme/line_number_color", "Editor");
+ caret_color = tm->get_color("text_editor/theme/caret_color", "Editor");
+ caret_background_color = tm->get_color("text_editor/theme/caret_background_color", "Editor");
+ text_selected_color = tm->get_color("text_editor/theme/text_selected_color", "Editor");
+ selection_color = tm->get_color("text_editor/theme/selection_color", "Editor");
+ brace_mismatch_color = tm->get_color("text_editor/theme/brace_mismatch_color", "Editor");
+ current_line_color = tm->get_color("text_editor/theme/current_line_color", "Editor");
+ line_length_guideline_color = tm->get_color("text_editor/theme/line_length_guideline_color", "Editor");
+ word_highlighted_color = tm->get_color("text_editor/theme/word_highlighted_color", "Editor");
+ number_color = tm->get_color("text_editor/theme/number_color", "Editor");
+ function_color = tm->get_color("text_editor/theme/function_color", "Editor");
+ member_variable_color = tm->get_color("text_editor/theme/member_variable_color", "Editor");
+ mark_color = tm->get_color("text_editor/theme/mark_color", "Editor");
+ breakpoint_color = tm->get_color("text_editor/theme/breakpoint_color", "Editor");
+ search_result_color = tm->get_color("text_editor/theme/search_result_color", "Editor");
+ search_result_border_color = tm->get_color("text_editor/theme/search_result_border_color", "Editor");
+ }
+
+ text_edit->add_color_override("background_color", background_color);
+ text_edit->add_color_override("completion_background_color", completion_background_color);
+ text_edit->add_color_override("completion_selected_color", completion_selected_color);
+ text_edit->add_color_override("completion_existing_color", completion_existing_color);
+ text_edit->add_color_override("completion_scroll_color", completion_scroll_color);
+ text_edit->add_color_override("completion_font_color", completion_font_color);
+ text_edit->add_color_override("font_color", text_color);
+ text_edit->add_color_override("line_number_color", line_number_color);
+ text_edit->add_color_override("caret_color", caret_color);
+ text_edit->add_color_override("caret_background_color", caret_background_color);
+ text_edit->add_color_override("font_selected_color", text_selected_color);
+ text_edit->add_color_override("selection_color", selection_color);
+ text_edit->add_color_override("brace_mismatch_color", brace_mismatch_color);
+ text_edit->add_color_override("current_line_color", current_line_color);
+ text_edit->add_color_override("line_length_guideline_color", line_length_guideline_color);
+ text_edit->add_color_override("word_highlighted_color", word_highlighted_color);
+ text_edit->add_color_override("number_color", number_color);
+ text_edit->add_color_override("function_color", function_color);
+ text_edit->add_color_override("member_variable_color", member_variable_color);
+ text_edit->add_color_override("mark_color", mark_color);
+ text_edit->add_color_override("breakpoint_color", breakpoint_color);
+ text_edit->add_color_override("search_result_color", search_result_color);
+ text_edit->add_color_override("search_result_border_color", search_result_border_color);
+ text_edit->add_color_override("symbol_color", symbol_color);
+
+ text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing", 4));
List<String> keywords;
script->get_language()->get_reserved_words(&keywords);
@@ -113,8 +176,6 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize core types
- Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
-
text_edit->add_keyword_color("String", basetype_color);
text_edit->add_keyword_color("Vector2", basetype_color);
text_edit->add_keyword_color("Rect2", basetype_color);
@@ -140,8 +201,6 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_keyword_color("PoolColorArray", basetype_color);
//colorize engine types
- Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
-
List<StringName> types;
ClassDB::get_class_list(&types);
@@ -155,7 +214,6 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize comments
- Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
List<String> comments;
script->get_language()->get_comment_delimiters(&comments);
@@ -169,7 +227,6 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize strings
- Color string_color = EDITOR_DEF("text_editor/highlighting/string_color", Color::hex(0x6b6f00ff));
List<String> strings;
script->get_language()->get_string_delimiters(&strings);
@@ -209,6 +266,7 @@ void ScriptTextEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
//emit_signal("name_changed");
+ _load_theme_settings();
}
}
@@ -492,8 +550,6 @@ void ScriptTextEditor::set_edited_script(const Ref<Script> &p_script) {
script = p_script;
- _load_theme_settings();
-
code_editor->get_text_edit()->set_text(script->get_source_code());
code_editor->get_text_edit()->clear_undo_history();
code_editor->get_text_edit()->tag_saved_version();
@@ -624,7 +680,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<String>
}
String hint;
Error err = script->get_language()->complete_code(p_code, script->get_path().get_base_dir(), base, r_options, r_force, hint);
- if (hint != "") {
+ if (err == OK && hint != "") {
code_editor->get_text_edit()->set_code_hint(hint);
}
}
@@ -948,13 +1004,26 @@ void ScriptTextEditor::_edit_option(int p_op) {
if (tx->get_selection_to_column() == 0)
end -= 1;
+ // Check if all lines in the selected block are commented
+ bool is_commented = true;
+ for (int i = begin; i <= end; i++) {
+ if (!tx->get_line(i).begins_with("#")) {
+ is_commented = false;
+ break;
+ }
+ }
for (int i = begin; i <= end; i++) {
String line_text = tx->get_line(i);
- if (line_text.begins_with("#"))
- line_text = line_text.substr(1, line_text.length());
- else
- line_text = "#" + line_text;
+ if (line_text.strip_edges().empty()) {
+ line_text = "#";
+ } else {
+ if (is_commented) {
+ line_text = line_text.substr(1, line_text.length());
+ } else {
+ line_text = "#" + line_text;
+ }
+ }
tx->set_line(i, line_text);
}
} else {
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index b02016c273..b0ee1a32ca 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -60,33 +60,96 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->clear_colors();
- /* keyword color */
-
- get_text_edit()->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0)));
- get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0)));
- get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244")));
- get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")));
- get_text_edit()->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")));
- get_text_edit()->add_color_override("completion_font_color", EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")));
- get_text_edit()->add_color_override("font_color", EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0)));
- get_text_edit()->add_color_override("line_number_color", EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0)));
- get_text_edit()->add_color_override("caret_color", EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0)));
- get_text_edit()->add_color_override("caret_background_color", EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0)));
- get_text_edit()->add_color_override("font_selected_color", EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1)));
- get_text_edit()->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
- get_text_edit()->add_color_override("brace_mismatch_color", EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2)));
- get_text_edit()->add_color_override("current_line_color", EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15)));
- get_text_edit()->add_color_override("word_highlighted_color", EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)));
- get_text_edit()->add_color_override("number_color", EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2)));
- get_text_edit()->add_color_override("function_color", EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8)));
- get_text_edit()->add_color_override("member_variable_color", EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3)));
- get_text_edit()->add_color_override("mark_color", EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4)));
- get_text_edit()->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2)));
- get_text_edit()->add_color_override("search_result_color", EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)));
- get_text_edit()->add_color_override("search_result_border_color", EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)));
- get_text_edit()->add_color_override("symbol_color", EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff)));
+ Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0));
+ Color completion_background_color = EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0));
+ Color completion_selected_color = EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"));
+ Color completion_existing_color = EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
+ Color completion_scroll_color = EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
+ Color completion_font_color = EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
+ Color text_color = EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0));
+ Color line_number_color = EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0));
+ Color caret_color = EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0));
+ Color caret_background_color = EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0));
+ Color text_selected_color = EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1));
+ Color selection_color = EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1));
+ Color brace_mismatch_color = EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
+ Color current_line_color = EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
+ Color line_length_guideline_color = EDITOR_DEF("text_editor/highlighting/line_length_guideline_color", Color(0, 0, 0));
+ Color word_highlighted_color = EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
+ Color number_color = EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2));
+ Color function_color = EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8));
+ Color member_variable_color = EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3));
+ Color mark_color = EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
+ Color breakpoint_color = EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
+ Color search_result_color = EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
+ Color search_result_border_color = EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
+ Color symbol_color = EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff));
Color keyword_color = EDITOR_DEF("text_editor/highlighting/keyword_color", Color(0.5, 0.0, 0.2));
+ Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
+ Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
+ Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
+ Color string_color = EDITOR_DEF("text_editor/highlighting/string_color", Color::hex(0x6b6f00ff));
+
+ // Adapt
+ if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
+ Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
+
+ symbol_color = tm->get_color("text_editor/theme/symbol_color", "Editor");
+ keyword_color = tm->get_color("text_editor/theme/keyword_color", "Editor");
+ basetype_color = tm->get_color("text_editor/theme/basetype_color", "Editor");
+ type_color = tm->get_color("text_editor/theme/type_color", "Editor");
+ comment_color = tm->get_color("text_editor/theme/comment_color", "Editor");
+ string_color = tm->get_color("text_editor/theme/string_color", "Editor");
+ background_color = tm->get_color("text_editor/theme/background_color", "Editor");
+ completion_background_color = tm->get_color("text_editor/theme/completion_background_color", "Editor");
+ completion_selected_color = tm->get_color("text_editor/theme/completion_selected_color", "Editor");
+ completion_existing_color = tm->get_color("text_editor/theme/completion_existing_color", "Editor");
+ completion_scroll_color = tm->get_color("text_editor/theme/completion_scroll_color", "Editor");
+ completion_font_color = tm->get_color("text_editor/theme/completion_font_color", "Editor");
+ text_color = tm->get_color("text_editor/theme/text_color", "Editor");
+ line_number_color = tm->get_color("text_editor/theme/line_number_color", "Editor");
+ caret_color = tm->get_color("text_editor/theme/caret_color", "Editor");
+ caret_background_color = tm->get_color("text_editor/theme/caret_background_color", "Editor");
+ text_selected_color = tm->get_color("text_editor/theme/text_selected_color", "Editor");
+ selection_color = tm->get_color("text_editor/theme/selection_color", "Editor");
+ brace_mismatch_color = tm->get_color("text_editor/theme/brace_mismatch_color", "Editor");
+ current_line_color = tm->get_color("text_editor/theme/current_line_color", "Editor");
+ line_length_guideline_color = tm->get_color("text_editor/theme/line_length_guideline_color", "Editor");
+ word_highlighted_color = tm->get_color("text_editor/theme/word_highlighted_color", "Editor");
+ number_color = tm->get_color("text_editor/theme/number_color", "Editor");
+ function_color = tm->get_color("text_editor/theme/function_color", "Editor");
+ member_variable_color = tm->get_color("text_editor/theme/member_variable_color", "Editor");
+ mark_color = tm->get_color("text_editor/theme/mark_color", "Editor");
+ breakpoint_color = tm->get_color("text_editor/theme/breakpoint_color", "Editor");
+ search_result_color = tm->get_color("text_editor/theme/search_result_color", "Editor");
+ search_result_border_color = tm->get_color("text_editor/theme/search_result_border_color", "Editor");
+ }
+
+ get_text_edit()->add_color_override("background_color", background_color);
+ get_text_edit()->add_color_override("completion_background_color", completion_background_color);
+ get_text_edit()->add_color_override("completion_selected_color", completion_selected_color);
+ get_text_edit()->add_color_override("completion_existing_color", completion_existing_color);
+ get_text_edit()->add_color_override("completion_scroll_color", completion_scroll_color);
+ get_text_edit()->add_color_override("completion_font_color", completion_font_color);
+ get_text_edit()->add_color_override("font_color", text_color);
+ get_text_edit()->add_color_override("line_number_color", line_number_color);
+ get_text_edit()->add_color_override("caret_color", caret_color);
+ get_text_edit()->add_color_override("caret_background_color", caret_background_color);
+ get_text_edit()->add_color_override("font_selected_color", text_selected_color);
+ get_text_edit()->add_color_override("selection_color", selection_color);
+ get_text_edit()->add_color_override("brace_mismatch_color", brace_mismatch_color);
+ get_text_edit()->add_color_override("current_line_color", current_line_color);
+ get_text_edit()->add_color_override("line_length_guideline_color", line_length_guideline_color);
+ get_text_edit()->add_color_override("word_highlighted_color", word_highlighted_color);
+ get_text_edit()->add_color_override("number_color", number_color);
+ get_text_edit()->add_color_override("function_color", function_color);
+ get_text_edit()->add_color_override("member_variable_color", member_variable_color);
+ get_text_edit()->add_color_override("mark_color", mark_color);
+ get_text_edit()->add_color_override("breakpoint_color", breakpoint_color);
+ get_text_edit()->add_color_override("search_result_color", search_result_color);
+ get_text_edit()->add_color_override("search_result_border_color", search_result_border_color);
+ get_text_edit()->add_color_override("symbol_color", symbol_color);
List<String> keywords;
ShaderLanguage::get_keyword_list(&keywords);
@@ -115,8 +178,6 @@ void ShaderTextEditor::_load_theme_settings() {
//Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0));
//colorize comments
- Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
-
get_text_edit()->add_color_region("/*", "*/", comment_color, false);
get_text_edit()->add_color_region("//", "", comment_color, false);
@@ -164,6 +225,8 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<String>
String calltip;
Error err = sl.complete(p_code, ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_types(), r_options, calltip);
+ if (err != OK)
+ ERR_PRINT("Shaderlang complete failed");
if (calltip != "") {
get_text_edit()->set_code_hint(calltip);
@@ -403,13 +466,7 @@ void ShaderEditorPlugin::edit(Object *p_object) {
bool ShaderEditorPlugin::handles(Object *p_object) const {
- bool handles = true;
Shader *shader = Object::cast_to<Shader>(p_object);
- /*
- if (Object::cast_to<ShaderGraph>(shader)) // Don't handle ShaderGraph's
- handles = false;
- */
-
return shader != NULL;
}
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index a5f55835f0..a6ab36ed27 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -76,40 +76,46 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) {
} else
camera->set_perspective(get_fov(), get_znear(), get_zfar());
- Transform new_transform = to_camera_transform(cursor);
- Transform old_transform = camera->get_global_transform();
- Transform transform;
+ //when not being manipulated, move softly
+ float free_orbit_inertia = EDITOR_DEF("editors/3d/free_orbit_inertia", 0.15);
+ float free_translation_inertia = EDITOR_DEF("editors/3d/free_translation_inertia", 0.15);
+ //when being manipulated, move more quickly
+ float manip_orbit_inertia = EDITOR_DEF("editors/3d/manipulation_orbit_inertia", 0.075);
+ float manip_translation_inertia = EDITOR_DEF("editors/3d/manipulation_translation_inertia", 0.075);
- bool disable_interp = (Input::get_singleton()->get_mouse_button_mask() & (2 | 4)) || Input::get_singleton()->is_key_pressed(KEY_SHIFT) || Input::get_singleton()->is_key_pressed(KEY_ALT) || Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+ //determine if being manipulated
+ bool manipulated = (Input::get_singleton()->get_mouse_button_mask() & (2 | 4)) || Input::get_singleton()->is_key_pressed(KEY_SHIFT) || Input::get_singleton()->is_key_pressed(KEY_ALT) || Input::get_singleton()->is_key_pressed(KEY_CONTROL);
- if (p_interp_delta && !disable_interp) {
- //interpolate
- float interp_speed = 14; //maybe should be made configuration
- transform = old_transform.interpolate_with(new_transform, MIN(1.0, p_interp_delta * interp_speed));
- } else {
- transform = new_transform;
+ float orbit_inertia = MAX(0.00001, manipulated ? manip_orbit_inertia : free_orbit_inertia);
+ float translation_inertia = MAX(0.0001, manipulated ? manip_translation_inertia : free_translation_inertia);
+
+ Cursor old_camera_cursor = camera_cursor;
+ camera_cursor = cursor;
+
+ camera_cursor.x_rot = Math::lerp(old_camera_cursor.x_rot, cursor.x_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
+ camera_cursor.y_rot = Math::lerp(old_camera_cursor.y_rot, cursor.y_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
+
+ camera_cursor.pos = old_camera_cursor.pos.linear_interpolate(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia)));
+ camera_cursor.distance = Math::lerp(old_camera_cursor.distance, cursor.distance, MIN(1.f, p_interp_delta * (1 / translation_inertia)));
+
+ if (p_interp_delta == 0 || is_freelook_active()) {
+ camera_cursor = cursor;
}
float tolerance = 0.0001;
bool equal = true;
- for (int i = 0; i < 3; i++) {
- if (transform.basis[i].distance_to(old_transform.basis[i]) > tolerance) {
- equal = false;
- break;
- }
- }
+ if (Math::abs(old_camera_cursor.x_rot - camera_cursor.x_rot) > tolerance || Math::abs(old_camera_cursor.y_rot - camera_cursor.y_rot) > tolerance)
+ equal = false;
- if (equal && transform.origin.distance_to(old_transform.origin) > tolerance) {
+ if (equal && old_camera_cursor.pos.distance_squared_to(camera_cursor.pos) > tolerance * tolerance)
equal = false;
- }
- if (equal) {
- transform = new_transform;
- }
+ if (equal && Math::abs(old_camera_cursor.distance - camera_cursor.distance) > tolerance)
+ equal = false;
- if (!equal || p_interp_delta == 0) {
- //print_line(transform);
- camera->set_global_transform(transform);
+ if (!equal || p_interp_delta == 0 || is_freelook_active()) {
+
+ camera->set_global_transform(to_camera_transform(camera_cursor));
update_transform_gizmo_view();
}
}
@@ -1540,6 +1546,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 pos = camera_transform.xform(Vector3(0, 0, 0));
Vector3 diff = camera->get_translation() - pos;
cursor.pos += diff;
+ freelook_target_position += diff;
name = "";
_update_name();
@@ -1661,7 +1668,7 @@ void SpatialEditorViewport::scale_cursor_distance(real_t scale) {
Point2i SpatialEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const {
Point2i relative;
- if (bool(EditorSettings::get_singleton()->get("editors/3d/warped_mouse_panning"))) {
+ if (bool(EDITOR_DEF("editors/3d/warped_mouse_panning", false))) {
relative = Input::get_singleton()->warp_mouse_motion(p_ev_mouse_motion, surface->get_global_rect());
} else {
relative = p_ev_mouse_motion->get_relative();
@@ -1672,7 +1679,7 @@ Point2i SpatialEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMous
void SpatialEditorViewport::_update_freelook(real_t delta) {
if (!is_freelook_active()) {
- freelook_velocity = Vector3();
+ freelook_target_position = cursor.pos;
return;
}
@@ -1689,60 +1696,47 @@ void SpatialEditorViewport::_update_freelook(real_t delta) {
int key_speed_modifier = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_speed_modifier")->get_shortcut().ptr())->get_scancode();
Vector3 direction;
- bool pressed = false;
bool speed_modifier = false;
const Input &input = *Input::get_singleton();
if (input.is_key_pressed(key_left)) {
direction -= right;
- pressed = true;
}
if (input.is_key_pressed(key_right)) {
direction += right;
- pressed = true;
}
if (input.is_key_pressed(key_forward)) {
direction += forward;
- pressed = true;
}
if (input.is_key_pressed(key_backwards)) {
direction -= forward;
- pressed = true;
}
if (input.is_key_pressed(key_up)) {
direction += up;
- pressed = true;
}
if (input.is_key_pressed(key_down)) {
direction -= up;
- pressed = true;
}
if (input.is_key_pressed(key_speed_modifier)) {
speed_modifier = true;
}
- const EditorSettings &s = *EditorSettings::get_singleton();
- real_t inertia = s.get("editors/3d/freelook_inertia");
- if (inertia < 0)
- inertia = 0;
-
- const real_t base_speed = s.get("editors/3d/freelook_base_speed");
- const real_t modifier_speed_factor = s.get("editors/3d/freelook_modifier_speed_factor");
+ real_t inertia = EDITOR_DEF("editors/3d/freelook_inertia", 0.2);
+ inertia = MAX(0, inertia);
+ const real_t base_speed = EDITOR_DEF("editors/3d/freelook_base_speed", 0.5);
+ const real_t modifier_speed_factor = EDITOR_DEF("editors/3d/freelook_modifier_speed_factor", 5);
real_t speed = base_speed * cursor.distance;
if (speed_modifier)
speed *= modifier_speed_factor;
- Vector3 instant_velocity = direction * speed;
-
// Higher inertia should increase "lag" (lerp with factor between 0 and 1)
- // Inertia of zero should produce instant movement (lerp with factor of 1)
- // Takes reference of 60fps for units, so that inertia of 1 gives approximate lerp factor of 0.5
- real_t factor = 1.0 / (1.0 + inertia * delta * 60.f);
- freelook_velocity = freelook_velocity.linear_interpolate(instant_velocity, CLAMP(factor, 0, 1));
+ // Inertia of zero should produce instant movement (lerp with factor of 1) in this case it returns a really high value and gets clamped to 1.
- cursor.pos += freelook_velocity * delta;
+ freelook_target_position += direction * speed;
+ real_t factor = (1.0 / (inertia + 0.001)) * delta;
+ cursor.pos = cursor.pos.linear_interpolate(freelook_target_position, CLAMP(factor, 0, 1));
}
void SpatialEditorViewport::set_message(String p_message, float p_time) {
@@ -2528,7 +2522,6 @@ Vector3 SpatialEditorViewport::_get_instance_position(const Point2 &p_pos) const
found_gizmos.insert(seg);
- int handle = -1;
Vector3 hit_point;
Vector3 hit_normal;
bool inters = seg->intersect_ray(camera, p_pos, hit_point, hit_normal, NULL, false);
@@ -2861,8 +2854,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), KEY_D);
ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), KEY_W);
ED_SHORTCUT("spatial_editor/freelook_backwards", TTR("Freelook Backwards"), KEY_S);
- ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_Q);
- ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_E);
+ ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_E);
+ ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_Q);
ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), KEY_SHIFT);
preview_camera = memnew(Button);
@@ -3423,13 +3416,6 @@ void SpatialEditor::set_state(const Dictionary &p_state) {
settings_znear->set_value(float(d["znear"]));
if (d.has("fov"))
settings_fov->set_value(float(d["fov"]));
-
- if (d.has("default_srgb")) {
- bool use = d["default_srgb"];
-
- //viewport_environment->set_enable_fx(Environment::FX_SRGB,use);
- //view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_SRGB), use );
- }
if (d.has("show_grid")) {
bool use = d["show_grid"];
@@ -3721,18 +3707,50 @@ void SpatialEditor::_init_indicators() {
origin_colors.push_back(Color(axis.x, axis.y, axis.z));
origin_points.push_back(axis * 4096);
origin_points.push_back(axis * -4096);
-#define ORIGIN_GRID_SIZE 25
+#define ORIGIN_GRID_SIZE 100
for (int j = -ORIGIN_GRID_SIZE; j <= ORIGIN_GRID_SIZE; j++) {
- grid_colors[i].push_back(grid_color);
- grid_colors[i].push_back(grid_color);
- grid_colors[i].push_back(grid_color);
- grid_colors[i].push_back(grid_color);
- grid_points[i].push_back(axis_n1 * ORIGIN_GRID_SIZE + axis_n2 * j);
- grid_points[i].push_back(-axis_n1 * ORIGIN_GRID_SIZE + axis_n2 * j);
- grid_points[i].push_back(axis_n2 * ORIGIN_GRID_SIZE + axis_n1 * j);
- grid_points[i].push_back(-axis_n2 * ORIGIN_GRID_SIZE + axis_n1 * j);
+ for (int k = -ORIGIN_GRID_SIZE; k <= ORIGIN_GRID_SIZE; k++) {
+
+ Vector3 p = axis_n1 * j + axis_n2 * k;
+ float trans = Math::pow(MAX(0, 1.0 - (Vector2(j, k).length() / ORIGIN_GRID_SIZE)), 2);
+
+ Vector3 pj = axis_n1 * (j + 1) + axis_n2 * k;
+ float transj = Math::pow(MAX(0, 1.0 - (Vector2(j + 1, k).length() / ORIGIN_GRID_SIZE)), 2);
+
+ Vector3 pk = axis_n1 * j + axis_n2 * (k + 1);
+ float transk = Math::pow(MAX(0, 1.0 - (Vector2(j, k + 1).length() / ORIGIN_GRID_SIZE)), 2);
+
+ Color trans_color = grid_color;
+ trans_color.a *= trans;
+
+ Color transk_color = grid_color;
+ transk_color.a *= transk;
+
+ Color transj_color = grid_color;
+ transj_color.a *= transj;
+
+ if (j % 10 == 0 || k % 10 == 0) {
+ trans_color.a *= 2;
+ }
+ if ((k + 1) % 10 == 0) {
+ transk_color.a *= 2;
+ }
+ if ((j + 1) % 10 == 0) {
+ transj_color.a *= 2;
+ }
+
+ grid_points[i].push_back(p);
+ grid_points[i].push_back(pk);
+ grid_colors[i].push_back(trans_color);
+ grid_colors[i].push_back(transk_color);
+
+ grid_points[i].push_back(p);
+ grid_points[i].push_back(pj);
+ grid_colors[i].push_back(trans_color);
+ grid_colors[i].push_back(transj_color);
+ }
}
grid[i] = VisualServer::get_singleton()->mesh_create();
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index db5abe2b53..5f3ef2dbee 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -131,7 +131,7 @@ private:
float gizmo_scale;
bool freelook_active;
- Vector3 freelook_velocity;
+ Vector3 freelook_target_position;
PanelContainer *info;
Label *info_label;
@@ -239,7 +239,7 @@ private:
distance = 4;
region_select = false;
}
- } cursor;
+ } cursor, camera_cursor;
void scale_cursor_distance(real_t scale);
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index f943ee5f6d..b85ffd6c67 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -72,6 +72,14 @@ void TileMapEditor::_menu_option(int p_option) {
switch (p_option) {
+ case OPTION_PAINTING: {
+ // NOTE: We do not set tool = TOOL_PAINTING as this begins painting
+ // immediately without pressing the left mouse button first
+ tool = TOOL_NONE;
+
+ canvas_item_editor->update();
+
+ } break;
case OPTION_BUCKET: {
tool = TOOL_BUCKET;
@@ -550,7 +558,6 @@ void TileMapEditor::_draw_fill_preview(int p_cell, const Point2i &p_point, bool
PoolVector<Vector2> points = _bucket_fill(p_point, false, true);
PoolVector<Vector2>::Read pr = points.read();
int len = points.size();
- int time_after = OS::get_singleton()->get_ticks_msec();
for (int i = 0; i < len; ++i) {
_draw_cell(p_cell, pr[i], p_flip_h, p_flip_v, p_transpose, p_xform);
@@ -704,7 +711,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
} else {
-
+ // Mousebutton was released
if (tool != TOOL_NONE) {
if (tool == TOOL_PAINTING) {
@@ -802,6 +809,9 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
undo_redo->add_undo_method(this, "_fill_points", points, pop);
undo_redo->commit_action();
+
+ // We want to keep the bucket-tool active
+ return true;
}
tool = TOOL_NONE;
@@ -1047,9 +1057,25 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
- if (tool != TOOL_NONE || !mouse_over)
+ if (!mouse_over) {
+ // Editor shortcuts should not fire if mouse not in viewport
return false;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/paint_tile", p_event)) {
+ // NOTE: We do not set tool = TOOL_PAINTING as this begins painting
+ // immediately without pressing the left mouse button first
+ tool = TOOL_NONE;
+ canvas_item_editor->update();
+
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/bucket_fill", p_event)) {
+ tool = TOOL_BUCKET;
+ canvas_item_editor->update();
+
+ return true;
+ }
if (ED_IS_SHORTCUT("tile_map_editor/erase_selection", p_event)) {
_menu_option(OPTION_ERASE_SELECTION);
@@ -1459,7 +1485,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
ED_SHORTCUT("tile_map_editor/erase_selection", TTR("Erase selection"), KEY_DELETE);
ED_SHORTCUT("tile_map_editor/find_tile", TTR("Find tile"), KEY_MASK_CMD + KEY_F);
- ED_SHORTCUT("tile_map_editor/transpose", TTR("Transpose"));
+ ED_SHORTCUT("tile_map_editor/transpose", TTR("Transpose"), KEY_T);
ED_SHORTCUT("tile_map_editor/mirror_x", TTR("Mirror X"), KEY_A);
ED_SHORTCUT("tile_map_editor/mirror_y", TTR("Mirror Y"), KEY_S);
@@ -1513,7 +1539,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
PopupMenu *p = options->get_popup();
- p->add_item(TTR("Bucket"), OPTION_BUCKET);
+ p->add_shortcut(ED_SHORTCUT("tile_map_editor/paint_tile", TTR("Paint Tile"), KEY_P), OPTION_PAINTING);
+ p->add_shortcut(ED_SHORTCUT("tile_map_editor/bucket_fill", TTR("Bucket Fill"), KEY_G), OPTION_BUCKET);
p->add_separator();
p->add_item(TTR("Pick Tile"), OPTION_PICK_TILE, KEY_CONTROL);
p->add_separator();
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index e863c4bf3d..de9b9e8e0d 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -68,7 +68,8 @@ class TileMapEditor : public VBoxContainer {
OPTION_PICK_TILE,
OPTION_SELECT,
OPTION_DUPLICATE,
- OPTION_ERASE_SELECTION
+ OPTION_ERASE_SELECTION,
+ OPTION_PAINTING,
};
TileMap *node;
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index d649afc594..f4318a670c 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -48,7 +48,7 @@ void ProjectExportDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- delete_preset->set_icon(get_icon("Del", "EditorIcons"));
+ delete_preset->set_icon(get_icon("Remove", "EditorIcons"));
connect("confirmed", this, "_export_pck_zip");
custom_feature_display->get_parent_control()->add_style_override("panel", get_stylebox("bg", "Tree"));
} break;
@@ -193,7 +193,7 @@ void ProjectExportDialog::_edit_preset(int p_index) {
patch->set_checked(0, true);
patch->set_tooltip(0, patchlist[i]);
patch->set_metadata(0, i);
- patch->add_button(0, get_icon("Del", "EditorIcons"), 0);
+ patch->add_button(0, get_icon("Remove", "EditorIcons"), 0);
patch->add_button(0, get_icon("folder", "FileDialog"), 1);
}
@@ -425,9 +425,10 @@ void ProjectExportDialog::_delete_preset_confirm() {
int idx = presets->get_current();
parameters->edit(NULL); //to avoid crash
+ _edit_preset(-1);
EditorExport::get_singleton()->remove_export_preset(idx);
_update_presets();
- _edit_preset(-1);
+ _edit_preset(presets->get_current());
}
Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
@@ -732,6 +733,8 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
ERR_FAIL_COND(platform.is_null());
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
+ if (err != OK)
+ ERR_PRINT("Failed to export project");
}
void ProjectExportDialog::_bind_methods() {
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 323a36154e..78d544fdcf 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -59,11 +59,13 @@ public:
enum Mode {
MODE_NEW,
MODE_IMPORT,
- MODE_INSTALL
+ MODE_INSTALL,
+ MODE_RENAME
};
private:
Mode mode;
+ Button *browse;
Label *pp, *pn;
Label *error;
LineEdit *project_path;
@@ -91,20 +93,20 @@ private:
return "";
}
- if (mode != MODE_IMPORT) {
+ if (mode == MODE_IMPORT || mode == MODE_RENAME) {
- if (d->file_exists("project.godot")) {
+ if (valid_path != "" && !d->file_exists("project.godot")) {
- error->set_text(TTR("Invalid project path, project.godot must not exist."));
+ error->set_text(TTR("Invalid project path, project.godot must exist."));
memdelete(d);
return "";
}
} else {
- if (valid_path != "" && !d->file_exists("project.godot")) {
+ if (d->file_exists("project.godot")) {
- error->set_text(TTR("Invalid project path, project.godot must exist."));
+ error->set_text(TTR("Invalid project path, project.godot must not exist."));
memdelete(d);
return "";
}
@@ -172,6 +174,17 @@ private:
void _text_changed(const String &p_text) {
_test_path();
+ error->set_text("");
+ if (p_text == "") {
+
+ error->set_text(TTR("Name cannot be empty"));
+ get_ok()->set_disabled(true);
+ return;
+ }
+ get_ok()->set_disabled(false);
+ }
+
+ void _name_changed(const String &p_text) {
}
void ok_pressed() {
@@ -182,138 +195,165 @@ private:
return;
}
- if (mode == MODE_IMPORT) {
- // nothing to do
+ if (mode == MODE_RENAME) {
+
+ String dir = _test_path();
+ if (dir == "") {
+ error->set_text(TTR("Invalid project path (changed anything?)."));
+ return;
+ }
+
+ ProjectSettings *current = memnew(ProjectSettings);
+ current->add_singleton(ProjectSettings::Singleton("Current"));
+
+ if (current->setup(dir, "")) {
+ error->set_text(TTR("Couldn't get project.godot in project path."));
+ } else {
+ ProjectSettings::CustomMap edited_settings;
+ edited_settings["application/config/name"] = project_name->get_text();
+
+ if (current->save_custom(dir.plus_file("/project.godot"), edited_settings, Vector<String>(), true)) {
+ error->set_text(TTR("Couldn't edit project.godot in project path."));
+ }
+ }
+
+ hide();
+ emit_signal("project_renamed");
} else {
- if (mode == MODE_NEW) {
- ProjectSettings::CustomMap initial_settings;
- initial_settings["application/config/name"] = project_name->get_text();
- initial_settings["application/config/icon"] = "res://icon.png";
- initial_settings["rendering/environment/default_environment"] = "res://default_env.tres";
+ if (mode == MODE_IMPORT) {
+ // nothing to do
+ } else {
+ if (mode == MODE_NEW) {
- if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("/project.godot"), initial_settings, Vector<String>(), false)) {
- error->set_text(TTR("Couldn't create project.godot in project path."));
- } else {
- ResourceSaver::save(dir.plus_file("/icon.png"), get_icon("DefaultProjectIcon", "EditorIcons"));
+ ProjectSettings::CustomMap initial_settings;
+ initial_settings["application/config/name"] = project_name->get_text();
+ initial_settings["application/config/icon"] = "res://icon.png";
+ initial_settings["rendering/environment/default_environment"] = "res://default_env.tres";
- FileAccess *f = FileAccess::open(dir.plus_file("/default_env.tres"), FileAccess::WRITE);
- if (!f) {
+ if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("/project.godot"), initial_settings, Vector<String>(), false)) {
error->set_text(TTR("Couldn't create project.godot in project path."));
} else {
- f->store_line("[gd_resource type=\"Environment\" load_steps=2 format=2]");
- f->store_line("[sub_resource type=\"ProceduralSky\" id=1]");
- f->store_line("[resource]");
- f->store_line("background_mode = 2");
- f->store_line("background_sky = SubResource( 1 )");
- memdelete(f);
+ ResourceSaver::save(dir.plus_file("/icon.png"), get_icon("DefaultProjectIcon", "EditorIcons"));
+
+ FileAccess *f = FileAccess::open(dir.plus_file("/default_env.tres"), FileAccess::WRITE);
+ if (!f) {
+ error->set_text(TTR("Couldn't create project.godot in project path."));
+ } else {
+ f->store_line("[gd_resource type=\"Environment\" load_steps=2 format=2]");
+ f->store_line("[sub_resource type=\"ProceduralSky\" id=1]");
+ f->store_line("[resource]");
+ f->store_line("background_mode = 2");
+ f->store_line("background_sky = SubResource( 1 )");
+ memdelete(f);
+ }
}
- }
- } else if (mode == MODE_INSTALL) {
+ } else if (mode == MODE_INSTALL) {
- FileAccess *src_f = NULL;
- zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
+ FileAccess *src_f = NULL;
+ zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
- unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
- if (!pkg) {
+ unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
+ if (!pkg) {
- dialog_error->set_text(TTR("Error opening package file, not in zip format."));
- return;
- }
+ dialog_error->set_text(TTR("Error opening package file, not in zip format."));
+ return;
+ }
- int ret = unzGoToFirstFile(pkg);
+ int ret = unzGoToFirstFile(pkg);
- Vector<String> failed_files;
+ Vector<String> failed_files;
- int idx = 0;
- while (ret == UNZ_OK) {
+ int idx = 0;
+ while (ret == UNZ_OK) {
- //get filename
- unz_file_info info;
- char fname[16384];
- ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
+ //get filename
+ unz_file_info info;
+ char fname[16384];
+ ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
- String path = fname;
+ String path = fname;
- int depth = 1; //stuff from github comes with tag
- bool skip = false;
- while (depth > 0) {
- int pp = path.find("/");
- if (pp == -1) {
- skip = true;
- break;
+ int depth = 1; //stuff from github comes with tag
+ bool skip = false;
+ while (depth > 0) {
+ int pp = path.find("/");
+ if (pp == -1) {
+ skip = true;
+ break;
+ }
+ path = path.substr(pp + 1, path.length());
+ depth--;
}
- path = path.substr(pp + 1, path.length());
- depth--;
- }
- if (skip || path == String()) {
- //
- } else if (path.ends_with("/")) { // a dir
+ if (skip || path == String()) {
+ //
+ } else if (path.ends_with("/")) { // a dir
- path = path.substr(0, path.length() - 1);
+ path = path.substr(0, path.length() - 1);
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- da->make_dir(dir.plus_file(path));
- memdelete(da);
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ da->make_dir(dir.plus_file(path));
+ memdelete(da);
- } else {
+ } else {
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> data;
+ data.resize(info.uncompressed_size);
- //read
- unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg, data.ptr(), data.size());
- unzCloseCurrentFile(pkg);
+ //read
+ unzOpenCurrentFile(pkg);
+ unzReadCurrentFile(pkg, data.ptr(), data.size());
+ unzCloseCurrentFile(pkg);
- FileAccess *f = FileAccess::open(dir.plus_file(path), FileAccess::WRITE);
+ FileAccess *f = FileAccess::open(dir.plus_file(path), FileAccess::WRITE);
- if (f) {
- f->store_buffer(data.ptr(), data.size());
- memdelete(f);
- } else {
- failed_files.push_back(path);
+ if (f) {
+ f->store_buffer(data.ptr(), data.size());
+ memdelete(f);
+ } else {
+ failed_files.push_back(path);
+ }
}
- }
- idx++;
- ret = unzGoToNextFile(pkg);
- }
+ idx++;
+ ret = unzGoToNextFile(pkg);
+ }
- unzClose(pkg);
+ unzClose(pkg);
- if (failed_files.size()) {
- String msg = TTR("The following files failed extraction from package:") + "\n\n";
- for (int i = 0; i < failed_files.size(); i++) {
+ if (failed_files.size()) {
+ String msg = TTR("The following files failed extraction from package:") + "\n\n";
+ for (int i = 0; i < failed_files.size(); i++) {
- if (i > 15) {
- msg += "\nAnd " + itos(failed_files.size() - i) + " more files.";
- break;
+ if (i > 15) {
+ msg += "\nAnd " + itos(failed_files.size() - i) + " more files.";
+ break;
+ }
+ msg += failed_files[i] + "\n";
}
- msg += failed_files[i] + "\n";
- }
- dialog_error->set_text(msg);
- dialog_error->popup_centered_minsize();
+ dialog_error->set_text(msg);
+ dialog_error->popup_centered_minsize();
- } else {
- dialog_error->set_text(TTR("Package Installed Successfully!"));
- dialog_error->popup_centered_minsize();
+ } else {
+ dialog_error->set_text(TTR("Package Installed Successfully!"));
+ dialog_error->popup_centered_minsize();
+ }
}
}
- }
- dir = dir.replace("\\", "/");
- if (dir.ends_with("/"))
- dir = dir.substr(0, dir.length() - 1);
- String proj = dir.replace("/", "::");
- EditorSettings::get_singleton()->set("projects/" + proj, dir);
- EditorSettings::get_singleton()->save();
+ dir = dir.replace("\\", "/");
+ if (dir.ends_with("/"))
+ dir = dir.substr(0, dir.length() - 1);
+ String proj = dir.replace("/", "::");
+ EditorSettings::get_singleton()->set("projects/" + proj, dir);
+ EditorSettings::get_singleton()->save();
- hide();
- emit_signal("project_created", dir);
+ hide();
+ emit_signal("project_created", dir);
+ }
}
protected:
@@ -325,6 +365,7 @@ protected:
ClassDB::bind_method("_path_selected", &NewProjectDialog::_path_selected);
ClassDB::bind_method("_file_selected", &NewProjectDialog::_file_selected);
ADD_SIGNAL(MethodInfo("project_created"));
+ ADD_SIGNAL(MethodInfo("project_renamed"));
}
public:
@@ -340,44 +381,85 @@ public:
mode = p_mode;
}
- void show_dialog() {
-
- project_path->clear();
- project_name->clear();
+ void set_project_path(const String &p_path) {
+ project_path->set_text(p_path);
+ }
- if (mode == MODE_IMPORT) {
- set_title(TTR("Import Existing Project"));
- get_ok()->set_text(TTR("Import"));
- pp->set_text(TTR("Project Path (Must Exist):"));
- pn->set_text(TTR("Project Name:"));
- pn->hide();
- project_name->hide();
+ void show_dialog() {
- popup_centered(Size2(500, 125) * EDSCALE);
+ if (mode == MODE_RENAME) {
- } else if (mode == MODE_NEW) {
+ project_path->set_editable(false);
+ browse->set_disabled(true);
- set_title(TTR("Create New Project"));
- get_ok()->set_text(TTR("Create"));
+ set_title(TTR("Rename Project"));
+ get_ok()->set_text(TTR("Rename"));
pp->set_text(TTR("Project Path:"));
pn->set_text(TTR("Project Name:"));
pn->show();
project_name->show();
- popup_centered(Size2(500, 145) * EDSCALE);
- } else if (mode == MODE_INSTALL) {
+ String dir = _test_path();
+ if (dir == "") {
+ error->set_text(TTR("Invalid project path (changed anything?)."));
+ return;
+ }
+ ProjectSettings *current = memnew(ProjectSettings);
+ current->add_singleton(ProjectSettings::Singleton("Current"));
- set_title(TTR("Install Project:") + " " + zip_title);
- get_ok()->set_text(TTR("Install"));
- pp->set_text(TTR("Project Path:"));
- pn->hide();
- project_name->hide();
+ if (current->setup(dir, "")) {
+ error->set_text(TTR("Couldn't get project.godot in project path."));
+ } else {
+ if (current->has("application/config/name")) {
+ String appname = current->get("application/config/name");
+ project_name->set_text(appname);
+ }
+ }
popup_centered(Size2(500, 125) * EDSCALE);
- }
- project_path->grab_focus();
+ project_name->grab_focus();
- _test_path();
+ } else {
+
+ project_path->clear();
+ project_name->clear();
+ project_path->set_editable(true);
+ browse->set_disabled(false);
+
+ if (mode == MODE_IMPORT) {
+ set_title(TTR("Import Existing Project"));
+ get_ok()->set_text(TTR("Import"));
+ pp->set_text(TTR("Project Path (Must Exist):"));
+ pn->set_text(TTR("Project Name:"));
+ pn->hide();
+ project_name->hide();
+
+ popup_centered(Size2(500, 125) * EDSCALE);
+
+ } else if (mode == MODE_NEW) {
+
+ set_title(TTR("Create New Project"));
+ get_ok()->set_text(TTR("Create"));
+ pp->set_text(TTR("Project Path:"));
+ pn->set_text(TTR("Project Name:"));
+ pn->show();
+ project_name->show();
+
+ popup_centered(Size2(500, 145) * EDSCALE);
+ } else if (mode == MODE_INSTALL) {
+
+ set_title(TTR("Install Project:") + " " + zip_title);
+ get_ok()->set_text(TTR("Install"));
+ pp->set_text(TTR("Project Path:"));
+ pn->hide();
+ project_name->hide();
+
+ popup_centered(Size2(500, 125) * EDSCALE);
+ }
+ project_path->grab_focus();
+
+ _test_path();
+ }
}
NewProjectDialog() {
@@ -399,7 +481,7 @@ public:
pphb->add_child(project_path);
project_path->set_h_size_flags(SIZE_EXPAND_FILL);
- Button *browse = memnew(Button);
+ browse = memnew(Button);
pphb->add_child(browse);
browse->set_text(TTR("Browse"));
browse->connect("pressed", this, "_browse_path");
@@ -449,13 +531,15 @@ struct ProjectItem {
String conf;
uint64_t last_modified;
bool favorite;
+ bool grayed;
ProjectItem() {}
- ProjectItem(const String &p_project, const String &p_path, const String &p_conf, uint64_t p_last_modified, bool p_favorite = false) {
+ ProjectItem(const String &p_project, const String &p_path, const String &p_conf, uint64_t p_last_modified, bool p_favorite = false, bool p_grayed = false) {
project = p_project;
path = p_path;
conf = p_conf;
last_modified = p_last_modified;
favorite = p_favorite;
+ grayed = p_grayed;
}
_FORCE_INLINE_ bool operator<(const ProjectItem &l) const { return last_modified > l.last_modified; }
_FORCE_INLINE_ bool operator==(const ProjectItem &l) const { return project == l.project; }
@@ -465,7 +549,7 @@ void ProjectManager::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- Engine::get_singleton()->set_editor_hint(true);
+ Engine::get_singleton()->set_editor_hint(false);
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
@@ -493,6 +577,7 @@ void ProjectManager::_update_project_buttons() {
erase_btn->set_disabled(selected_list.size() < 1);
open_btn->set_disabled(selected_list.size() < 1);
+ rename_btn->set_disabled(selected_list.size() < 1);
}
void ProjectManager::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
@@ -737,6 +822,7 @@ void ProjectManager::_load_recent_projects() {
String project = _name.get_slice("/", 1);
String conf = path.plus_file("project.godot");
bool favorite = (_name.begins_with("favorite_projects/")) ? true : false;
+ bool grayed = false;
uint64_t last_modified = 0;
if (FileAccess::exists(conf)) {
@@ -748,16 +834,15 @@ void ProjectManager::_load_recent_projects() {
if (cache_modified > last_modified)
last_modified = cache_modified;
}
-
- ProjectItem item(project, path, conf, last_modified, favorite);
- if (favorite)
- favorite_projects.push_back(item);
- else
- projects.push_back(item);
} else {
- //project doesn't exist on disk but it's in the XML settings file
- EditorSettings::get_singleton()->erase(_name); //remove it
+ grayed = true;
}
+
+ ProjectItem item(project, path, conf, last_modified, favorite, grayed);
+ if (favorite)
+ favorite_projects.push_back(item);
+ else
+ projects.push_back(item);
}
projects.sort();
@@ -782,14 +867,14 @@ void ProjectManager::_load_recent_projects() {
String path = item.path;
String conf = item.conf;
bool is_favorite = item.favorite;
+ bool is_grayed = item.grayed;
Ref<ConfigFile> cf = memnew(ConfigFile);
- Error err = cf->load(conf);
- ERR_CONTINUE(err != OK);
+ Error cf_err = cf->load(conf);
String project_name = TTR("Unnamed Project");
- if (cf->has_section_key("application", "config/name")) {
+ if (cf_err == OK && cf->has_section_key("application", "config/name")) {
project_name = static_cast<String>(cf->get_value("application", "config/name")).xml_unescape();
}
@@ -797,7 +882,7 @@ void ProjectManager::_load_recent_projects() {
continue;
Ref<Texture> icon;
- if (cf->has_section_key("application", "config/icon")) {
+ if (cf_err == OK && cf->has_section_key("application", "config/icon")) {
String appicon = cf->get_value("application", "config/icon");
if (appicon != "") {
Ref<Image> img;
@@ -819,8 +904,10 @@ void ProjectManager::_load_recent_projects() {
}
String main_scene;
- if (cf->has_section_key("application", "run/main_scene")) {
+ if (cf_err == OK && cf->has_section_key("application", "run/main_scene")) {
main_scene = cf->get_value("application", "run/main_scene");
+ } else {
+ main_scene = "";
}
selected_list_copy.erase(project);
@@ -848,6 +935,8 @@ void ProjectManager::_load_recent_projects() {
hb->add_child(tf);
VBoxContainer *vb = memnew(VBoxContainer);
+ if (is_grayed)
+ vb->set_modulate(Color(0.5, 0.5, 0.5));
vb->set_name("project");
vb->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(vb);
@@ -883,6 +972,10 @@ void ProjectManager::_load_recent_projects() {
tabs->set_current_tab(0);
}
+void ProjectManager::_on_project_renamed() {
+ _load_recent_projects();
+}
+
void ProjectManager::_on_project_created(const String &dir) {
bool has_already = false;
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
@@ -926,6 +1019,13 @@ void ProjectManager::_open_project_confirm() {
for (Map<String, String>::Element *E = selected_list.front(); E; E = E->next()) {
const String &selected = E->key();
String path = EditorSettings::get_singleton()->get("projects/" + selected);
+ String conf = path + "/project.godot";
+ if (!FileAccess::exists(conf)) {
+ dialog_error->set_text(TTR("Can't open project"));
+ dialog_error->popup_centered_minsize();
+ return;
+ }
+
print_line("OPENING: " + path + " (" + selected + ")");
List<String> args;
@@ -935,6 +1035,10 @@ void ProjectManager::_open_project_confirm() {
args.push_back("--editor");
+ if (OS::get_singleton()->is_disable_crash_handler()) {
+ args.push_back("--disable-crash-handler");
+ }
+
String exec = OS::get_singleton()->get_executable_path();
OS::ProcessID pid = 0;
@@ -986,6 +1090,10 @@ void ProjectManager::_run_project_confirm() {
args.push_back("--path");
args.push_back(path);
+ if (OS::get_singleton()->is_disable_crash_handler()) {
+ args.push_back("--disable-crash-handler");
+ }
+
String exec = OS::get_singleton()->get_executable_path();
OS::ProcessID pid = 0;
@@ -1070,6 +1178,21 @@ void ProjectManager::_import_project() {
npdialog->show_dialog();
}
+void ProjectManager::_rename_project() {
+
+ if (selected_list.size() == 0) {
+ return;
+ }
+
+ for (Map<String, String>::Element *E = selected_list.front(); E; E = E->next()) {
+ const String &selected = E->key();
+ String path = EditorSettings::get_singleton()->get("projects/" + selected);
+ npdialog->set_project_path(path);
+ npdialog->set_mode(NewProjectDialog::MODE_RENAME);
+ npdialog->show_dialog();
+ }
+}
+
void ProjectManager::_erase_project_confirm() {
if (selected_list.size() == 0) {
@@ -1164,10 +1287,12 @@ void ProjectManager::_bind_methods() {
ClassDB::bind_method("_scan_begin", &ProjectManager::_scan_begin);
ClassDB::bind_method("_import_project", &ProjectManager::_import_project);
ClassDB::bind_method("_new_project", &ProjectManager::_new_project);
+ ClassDB::bind_method("_rename_project", &ProjectManager::_rename_project);
ClassDB::bind_method("_erase_project", &ProjectManager::_erase_project);
ClassDB::bind_method("_erase_project_confirm", &ProjectManager::_erase_project_confirm);
ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog);
ClassDB::bind_method("_load_recent_projects", &ProjectManager::_load_recent_projects);
+ ClassDB::bind_method("_on_project_renamed", &ProjectManager::_on_project_renamed);
ClassDB::bind_method("_on_project_created", &ProjectManager::_on_project_created);
ClassDB::bind_method("_update_scroll_pos", &ProjectManager::_update_scroll_pos);
ClassDB::bind_method("_panel_draw", &ProjectManager::_panel_draw);
@@ -1328,6 +1453,12 @@ ProjectManager::ProjectManager() {
tree_vb->add_child(import);
import->connect("pressed", this, "_import_project");
+ Button *rename = memnew(Button);
+ rename->set_text(TTR("Rename"));
+ tree_vb->add_child(rename);
+ rename->connect("pressed", this, "_rename_project");
+ rename_btn = rename;
+
Button *erase = memnew(Button);
erase->set_text(TTR("Remove"));
tree_vb->add_child(erase);
@@ -1383,6 +1514,7 @@ ProjectManager::ProjectManager() {
npdialog = memnew(NewProjectDialog);
gui_base->add_child(npdialog);
+ npdialog->connect("project_renamed", this, "_on_project_renamed");
npdialog->connect("project_created", this, "_on_project_created");
_load_recent_projects();
@@ -1397,6 +1529,9 @@ ProjectManager::ProjectManager() {
run_error_diag = memnew(AcceptDialog);
gui_base->add_child(run_error_diag);
run_error_diag->set_title(TTR("Can't run project"));
+
+ dialog_error = memnew(AcceptDialog);
+ gui_base->add_child(dialog_error);
}
ProjectManager::~ProjectManager() {
diff --git a/editor/project_manager.h b/editor/project_manager.h
index ecc01955ba..67fe0b503f 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -45,6 +45,7 @@ class ProjectManager : public Control {
Button *erase_btn;
Button *open_btn;
+ Button *rename_btn;
Button *run_btn;
FileDialog *scan_dir;
@@ -58,6 +59,7 @@ class ProjectManager : public Control {
ConfirmationDialog *multi_run_ask;
ConfirmationDialog *multi_scan_ask;
AcceptDialog *run_error_diag;
+ AcceptDialog *dialog_error;
NewProjectDialog *npdialog;
ScrollContainer *scroll;
VBoxContainer *scroll_childs;
@@ -78,6 +80,7 @@ class ProjectManager : public Control {
void _open_project_confirm();
void _import_project();
void _new_project();
+ void _rename_project();
void _erase_project();
void _erase_project_confirm();
void _update_project_buttons();
@@ -86,6 +89,7 @@ class ProjectManager : public Control {
void _load_recent_projects();
void _on_project_created(const String &dir);
+ void _on_project_renamed();
void _update_scroll_pos(const String &dir);
void _scan_dir(DirAccess *da, float pos, float total, List<String> *r_projects);
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 49687a504f..1f65589643 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -182,8 +182,8 @@ void ProjectSettingsEditor::_device_input_add() {
Ref<InputEvent> ie;
String name = add_at;
int idx = edit_idx;
- Variant old_val = ProjectSettings::get_singleton()->get(name);
- Array arr = old_val;
+ Array old_val = ProjectSettings::get_singleton()->get(name);
+ Array arr = old_val.duplicate();
switch (add_type) {
@@ -285,8 +285,8 @@ void ProjectSettingsEditor::_press_a_key_confirm() {
String name = add_at;
int idx = edit_idx;
- Variant old_val = ProjectSettings::get_singleton()->get(name);
- Array arr = old_val;
+ Array old_val = ProjectSettings::get_singleton()->get(name);
+ Array arr = old_val.duplicate();
for (int i = 0; i < arr.size(); i++) {
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index a42fb41ee2..b7300b9610 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -861,13 +861,13 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
menu->add_separator();
}
- menu->add_icon_item(get_icon("Load", "EditorIcons"), "Load", OBJ_MENU_LOAD);
+ menu->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Load"), OBJ_MENU_LOAD);
if (!RES(v).is_null()) {
- menu->add_icon_item(get_icon("Edit", "EditorIcons"), "Edit", OBJ_MENU_EDIT);
- menu->add_icon_item(get_icon("Clear", "EditorIcons"), "Clear", OBJ_MENU_CLEAR);
- menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE);
+ menu->add_icon_item(get_icon("Edit", "EditorIcons"), TTR("Edit"), OBJ_MENU_EDIT);
+ menu->add_icon_item(get_icon("Clear", "EditorIcons"), TTR("Clear"), OBJ_MENU_CLEAR);
+ menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), TTR("Make Unique"), OBJ_MENU_MAKE_UNIQUE);
RES r = v;
if (r.is_valid() && r->get_path().is_resource_file()) {
menu->add_separator();
@@ -2275,19 +2275,6 @@ void PropertyEditor::_check_reload_status(const String &p_name, TreeItem *item)
}
}
- if (_might_be_in_instance()) {
-
- Variant vorig;
- Dictionary d = item->get_metadata(0);
- int usage = d.has("usage") ? int(int(d["usage"]) & (PROPERTY_USAGE_STORE_IF_NONONE | PROPERTY_USAGE_STORE_IF_NONZERO)) : 0;
-
- if (_get_instanced_node_original_property(p_name, vorig) || usage) {
- Variant v = obj->get(p_name);
-
- bool has_reload = _is_property_different(v, vorig, usage);
- }
- }
-
if (obj->call("property_can_revert", p_name).operator bool()) {
has_reload = true;
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 6bbb35ceab..86de7c56e1 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -75,6 +75,8 @@ void PropertySelector::_update_search() {
if (properties)
set_title(TTR("Select Property"));
+ else if (virtuals_only)
+ set_title(TTR("Select Virtual Method"));
else
set_title(TTR("Select Method"));
@@ -209,7 +211,7 @@ void PropertySelector::_update_search() {
StringName base = base_type;
while (base) {
methods.push_back(MethodInfo("*" + String(base)));
- ClassDB::get_method_list(base, &methods, true);
+ ClassDB::get_method_list(base, &methods, true, true);
base = ClassDB::get_parent_class(base);
}
}
@@ -230,11 +232,13 @@ void PropertySelector::_update_search() {
Ref<Texture> icon;
script_methods = false;
+ print_line("name: " + E->get().name);
+ String rep = E->get().name.replace("*", "");
if (E->get().name == "*Script Methods") {
icon = get_icon("Script", "EditorIcons");
script_methods = true;
- } else if (has_icon(E->get().name, "EditorIcons")) {
- icon = get_icon(E->get().name, "EditorIcons");
+ } else if (has_icon(rep, "EditorIcons")) {
+ icon = get_icon(rep, "EditorIcons");
} else {
icon = get_icon("Object", "EditorIcons");
}
@@ -247,6 +251,12 @@ void PropertySelector::_update_search() {
if (!script_methods && name.begins_with("_") && !(E->get().flags & METHOD_FLAG_VIRTUAL))
continue;
+ if (virtuals_only && !(E->get().flags & METHOD_FLAG_VIRTUAL))
+ continue;
+
+ if (!virtuals_only && (E->get().flags & METHOD_FLAG_VIRTUAL))
+ continue;
+
if (search_box->get_text() != String() && name.find(search_box->get_text()) == -1)
continue;
@@ -283,6 +293,12 @@ void PropertySelector::_update_search() {
desc += " )";
+ if (E->get().flags & METHOD_FLAG_CONST)
+ desc += " const";
+
+ if (E->get().flags & METHOD_FLAG_VIRTUAL)
+ desc += " virtual";
+
item->set_text(0, desc);
item->set_metadata(0, name);
item->set_selectable(0, true);
@@ -397,7 +413,7 @@ void PropertySelector::_notification(int p_what) {
}
}
-void PropertySelector::select_method_from_base_type(const String &p_base, const String &p_current) {
+void PropertySelector::select_method_from_base_type(const String &p_base, const String &p_current, bool p_virtuals_only) {
base_type = p_base;
selected = p_current;
@@ -405,6 +421,7 @@ void PropertySelector::select_method_from_base_type(const String &p_base, const
script = 0;
properties = false;
instance = NULL;
+ virtuals_only = p_virtuals_only;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -421,6 +438,7 @@ void PropertySelector::select_method_from_script(const Ref<Script> &p_script, co
script = p_script->get_instance_id();
properties = false;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -436,6 +454,7 @@ void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const
script = 0;
properties = false;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -456,6 +475,7 @@ void PropertySelector::select_method_from_instance(Object *p_instance, const Str
}
properties = false;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -471,6 +491,7 @@ void PropertySelector::select_property_from_base_type(const String &p_base, cons
script = 0;
properties = true;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -488,6 +509,7 @@ void PropertySelector::select_property_from_script(const Ref<Script> &p_script,
script = p_script->get_instance_id();
properties = true;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -503,6 +525,7 @@ void PropertySelector::select_property_from_basic_type(Variant::Type p_type, con
script = 0;
properties = true;
instance = NULL;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -518,6 +541,7 @@ void PropertySelector::select_property_from_instance(Object *p_instance, const S
script = 0;
properties = true;
instance = p_instance;
+ virtuals_only = false;
popup_centered_ratio(0.6);
search_box->set_text("");
@@ -554,6 +578,7 @@ PropertySelector::PropertySelector() {
search_options->connect("cell_selected", this, "_item_selected");
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
+ virtuals_only = false;
help_bit = memnew(EditorHelpBit);
vbc->add_margin_child(TTR("Description:"), help_bit);
diff --git a/editor/property_selector.h b/editor/property_selector.h
index 3fa60771d7..eb745d776f 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -55,6 +55,7 @@ class PropertySelector : public ConfirmationDialog {
String base_type;
ObjectID script;
Object *instance;
+ bool virtuals_only;
void _item_selected();
@@ -63,7 +64,7 @@ protected:
static void _bind_methods();
public:
- void select_method_from_base_type(const String &p_base, const String &p_current = "");
+ void select_method_from_base_type(const String &p_base, const String &p_current = "", bool p_virtuals_only = false);
void select_method_from_script(const Ref<Script> &p_script, const String &p_current = "");
void select_method_from_basic_type(Variant::Type p_type, const String &p_current = "");
void select_method_from_instance(Object *p_instance, const String &p_current = "");
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index b92ebed167..4bcbe073ee 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -189,7 +189,7 @@ Vector<Pair<String, Ref<Texture> > > EditorQuickOpen::_sort_fs(Vector<Pair<Strin
Vector<Pair<String, Ref<Texture> > > sorted_list;
if (search_text == String() || list.size() == 0)
- return sorted_list;
+ return list;
Vector<float> scores;
scores.resize(list.size());
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index afdf48b314..5b783493cb 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -433,7 +433,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
dup->set_name(parent->validate_child_name(dup));
- editor_data->get_undo_redo().add_do_method(parent, "_add_child_below_node", node, dup);
+ editor_data->get_undo_redo().add_do_method(parent, "add_child_below_node", node, dup);
for (List<Node *>::Element *F = owned.front(); F; F = F->next()) {
if (!duplimap.has(F->get())) {
@@ -582,13 +582,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
new_scene_from_dialog->popup_centered_ratio();
new_scene_from_dialog->set_title(TTR("Save New Scene As.."));
-
} break;
case TOOL_COPY_NODE_PATH: {
List<Node *> selection = editor_selection->get_selected_node_list();
-
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
Node *root = EditorNode::get_singleton()->get_edited_scene();
NodePath path = root->get_path().rel_path_to(node->get_path());
OS::get_singleton()->set_clipboard(path);
@@ -597,8 +597,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_EDITABLE_CHILDREN: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
bool editable = EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(node);
int editable_item_idx = menu->get_item_idx_from_text(TTR("Editable Children"));
int placeholder_item_idx = menu->get_item_idx_from_text(TTR("Load As Placeholder"));
@@ -617,8 +619,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_USE_PLACEHOLDER: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
bool placeholder = node->get_scene_instance_load_placeholder();
placeholder = !placeholder;
int editable_item_idx = menu->get_item_idx_from_text(TTR("Editable Children"));
@@ -635,15 +639,16 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_CLEAR_INSTANCING: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
Node *root = EditorNode::get_singleton()->get_edited_scene();
UndoRedo *undo_redo = &editor_data->get_undo_redo();
if (!root)
break;
ERR_FAIL_COND(node->get_filename() == String());
-
undo_redo->create_action(TTR("Discard Instancing"));
undo_redo->add_do_method(node, "set_filename", "");
undo_redo->add_undo_method(node, "set_filename", node->get_filename());
@@ -656,8 +661,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_OPEN: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
scene_tree->emit_signal("open", node->get_filename());
}
}
@@ -667,8 +674,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
node->set_scene_inherited_state(Ref<SceneState>());
scene_tree->update_tree();
EditorNode::get_singleton()->get_property_editor()->update_tree();
@@ -677,8 +686,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_SCENE_OPEN_INHERITED: {
List<Node *> selection = editor_selection->get_selected_node_list();
- if (List<Node *>::Element *e = selection.front()) {
- if (Node *node = e->get()) {
+ List<Node *>::Element *e = selection.front();
+ if (e) {
+ Node *node = e->get();
+ if (node) {
if (node && node->get_scene_inherited_state().is_valid()) {
scene_tree->emit_signal("open", node->get_scene_inherited_state()->get_path());
}
@@ -823,7 +834,14 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node *, Node *> &duplimap) {
if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
continue;
String name = E->get().name;
- node->set(name, p_node->get(name));
+ Variant value = p_node->get(name);
+ // Duplicate dictionaries and arrays, mainly needed for __meta__
+ if (value.get_type() == Variant::DICTIONARY) {
+ value = Dictionary(value).copy();
+ } else if (value.get_type() == Variant::ARRAY) {
+ value = Array(value).duplicate();
+ }
+ node->set(name, value);
}
List<Node::GroupInfo> group_info;
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 284b25801c..76e75cff0a 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1622,7 +1622,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
- tabs->set_v_size_flags(SIZE_EXPAND_FILL);
tabs->set_area_as_parent_rect();
add_child(tabs);
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index 6cb5f0a70c..64ac2535a9 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -150,7 +150,7 @@ class ScriptEditorDebugger : public Control {
void _scene_tree_selected();
void _scene_tree_request();
void _parse_message(const String &p_msg, const Array &p_data);
- void _set_reason_text(const String &p_msg, MessageType p_type);
+ void _set_reason_text(const String &p_reason, MessageType p_type);
void _scene_tree_property_select_object(ObjectID p_object);
void _scene_tree_property_value_edited(const String &p_prop, const Variant &p_value);
diff --git a/main/input_default.cpp b/main/input_default.cpp
index b4c9a6207f..902d3168d8 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -80,7 +80,7 @@ bool InputDefault::is_key_pressed(int p_scancode) const {
bool InputDefault::is_mouse_button_pressed(int p_button) const {
_THREAD_SAFE_METHOD_
- return (mouse_button_mask & (1 << p_button)) != 0;
+ return (mouse_button_mask & (1 << (p_button - 1))) != 0;
}
static int _combine_device(int p_value, int p_device) {
@@ -265,10 +265,11 @@ void InputDefault::parse_input_event(const Ref<InputEvent> &p_event) {
if (mb.is_valid() && !mb->is_doubleclick()) {
- if (mb->is_pressed())
- mouse_button_mask |= (1 << mb->get_button_index());
- else
- mouse_button_mask &= ~(1 << mb->get_button_index());
+ if (mb->is_pressed()) {
+ mouse_button_mask |= (1 << (mb->get_button_index() - 1));
+ } else {
+ mouse_button_mask &= ~(1 << (mb->get_button_index() - 1));
+ }
if (main_loop && emulate_touch && mb->get_button_index() == 1) {
Ref<InputEventScreenTouch> touch_event;
diff --git a/main/main.cpp b/main/main.cpp
index 7b2a890a8e..bb601198db 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -58,6 +58,7 @@
#ifdef TOOLS_ENABLED
#include "editor/doc/doc_data.h"
+#include "editor/doc/doc_data_class_path.gen.h"
#include "editor/editor_node.h"
#include "editor/project_manager.h"
#endif
@@ -177,7 +178,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n");
OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
- OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS only).\n");
+ OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n");
OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n");
OS::get_singleton()->print("\n");
@@ -193,6 +194,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
+ OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
OS::get_singleton()->print(" --fixed-fps <fps> Forces a fixed ratio between process and fixed_process timing, for use when precision is required, or when rendering to video files. Setting this will disable real-time syncronization, so that run speed is only capped by performance\n");
OS::get_singleton()->print("\n");
@@ -246,6 +248,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
performance = memnew(Performance);
globals->add_singleton(ProjectSettings::Singleton("Performance", performance));
+ GLOBAL_DEF("debug/settings/backtrace/message", String("Please include this when reporting the bug on https://github.com/godotengine/godot/issues"));
+
MAIN_PRINT("Main: Parse CMDLine");
/* argument parsing and main creation */
@@ -581,6 +585,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->print("Missing fixed-fps argument, aborting.\n");
goto error;
}
+ } else if (I->get() == "--disable-crash-handler") {
+ OS::get_singleton()->disable_crash_handler();
} else {
//test for game path
@@ -1143,26 +1149,46 @@ bool Main::start() {
#ifdef TOOLS_ENABLED
if (doc_tool != "") {
+ {
+ DirAccessRef da = DirAccess::open(doc_tool);
+ if (!da) {
+ ERR_EXPLAIN("Argument supplied to --doctool must be a base godot build directory");
+ ERR_FAIL_V(false);
+ }
+ }
DocData doc;
doc.generate(doc_base);
DocData docsrc;
- if (docsrc.load(doc_tool) == OK) {
- print_line("Doc exists. Merging..");
- doc.merge_from(docsrc);
- } else {
- print_line("No Doc exists. Generating empty.");
+ Map<String, String> doc_data_classes;
+ Set<String> checked_paths;
+ print_line("Loading docs..");
+
+ for (int i = 0; i < _doc_data_class_path_count; i++) {
+ String path = doc_tool.plus_file(_doc_data_class_paths[i].path);
+ String name = _doc_data_class_paths[i].name;
+ doc_data_classes[name] = path;
+ if (!checked_paths.has(path)) {
+ checked_paths.insert(path);
+ docsrc.load_classes(path);
+ print_line("Loading docs from: " + path);
+ }
}
- for (List<String>::Element *E = removal_docs.front(); E; E = E->next()) {
- DocData rmdoc;
- if (rmdoc.load(E->get()) == OK) {
- print_line(String("Removing classes in ") + E->get());
- doc.remove_from(rmdoc);
- }
+ String index_path = doc_tool.plus_file("doc/classes");
+ docsrc.load_classes(index_path);
+ checked_paths.insert(index_path);
+ print_line("Loading docs from: " + index_path);
+
+ print_line("Merging docs..");
+ doc.merge_from(docsrc);
+ for (Set<String>::Element *E = checked_paths.front(); E; E = E->next()) {
+ print_line("Erasing old docs at: " + E->get());
+ DocData::erase_classes(E->get());
}
- doc.save(doc_tool);
+ print_line("Generating new docs..");
+ doc.save_classes(index_path, doc_data_classes);
return false;
}
@@ -1333,6 +1359,9 @@ bool Main::start() {
Viewport::Usage usage = Viewport::Usage(int(GLOBAL_GET("rendering/quality/intended_usage/framebuffer_allocation")));
sml->get_root()->set_usage(usage);
+ bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
+ sml->get_root()->set_snap_controls_to_pixels(snap_controls);
+
} else {
GLOBAL_DEF("display/window/stretch/mode", "disabled");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,2d,viewport"));
@@ -1342,6 +1371,7 @@ bool Main::start() {
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::STRING, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1,8,1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
+ GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
}
String local_game_path;
@@ -1383,6 +1413,8 @@ bool Main::start() {
if (editor) {
Error serr = editor_node->load_scene(local_game_path);
+ if (serr != OK)
+ ERR_PRINT("Failed to load scene");
OS::get_singleton()->set_context(OS::CONTEXT_EDITOR);
}
#endif
diff --git a/methods.py b/methods.py
index ec7e658a3b..2ab76a5416 100644
--- a/methods.py
+++ b/methods.py
@@ -1026,9 +1026,6 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs):
fd.write("\t\t\t{" + x["set_mask"] + "," + x["clear_mask"] + "},\n")
fd.write("\t\t};\n\n")
- else:
- fd.write("\t\tstatic const Enum *_enums=NULL;\n")
- fd.write("\t\tstatic const EnumValue *_enum_values=NULL;\n")
conditionals_found = []
if (len(header_data.conditionals)):
diff --git a/misc/dist/html/default.html b/misc/dist/html/default.html
new file mode 100644
index 0000000000..9fae34f97e
--- /dev/null
+++ b/misc/dist/html/default.html
@@ -0,0 +1,386 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
+<head>
+ <meta charset="utf-8" />
+ <title></title>
+ <style type="text/css">
+
+ body {
+ margin: 0;
+ border: 0 none;
+ padding: 0;
+ text-align: center;
+ background-color: #222226;
+ font-family: 'Noto Sans', Arial, sans-serif;
+ }
+
+
+ /* Godot Engine default theme style
+ * ================================ */
+
+ .godot {
+ color: #e0e0e0;
+ background-color: #3b3943;
+ background-image: linear-gradient(to bottom, #403e48, #35333c);
+ border: 1px solid #45434e;
+ box-shadow: 0 0 1px 1px #2f2d35;
+ }
+
+ button.godot {
+ font-family: 'Droid Sans', Arial, sans-serif; /* override user agent style */
+ padding: 1px 5px;
+ background-color: #37353f;
+ background-image: linear-gradient(to bottom, #413e49, #3a3842);
+ border: 1px solid #514f5d;
+ border-radius: 1px;
+ box-shadow: 0 0 1px 1px #2a2930;
+ }
+
+ button.godot:hover {
+ color: #f0f0f0;
+ background-color: #44414e;
+ background-image: linear-gradient(to bottom, #494652, #423f4c);
+ border: 1px solid #5a5667;
+ box-shadow: 0 0 1px 1px #26252b;
+ }
+
+ button.godot:active {
+ color: #fff;
+ background-color: #3e3b46;
+ background-image: linear-gradient(to bottom, #36343d, #413e49);
+ border: 1px solid #4f4c59;
+ box-shadow: 0 0 1px 1px #26252b;
+ }
+
+ button.godot:disabled {
+ color: rgba(230, 230, 230, 0.2);
+ background-color: #3d3d3d;
+ background-image: linear-gradient(to bottom, #434343, #393939);
+ border: 1px solid #474747;
+ box-shadow: 0 0 1px 1px #2d2b33;
+ }
+
+
+ /* Canvas / wrapper
+ * ================ */
+
+ #container {
+ display: inline-block; /* scale with canvas */
+ vertical-align: top; /* prevent extra height */
+ position: relative; /* root for absolutely positioned overlay */
+ margin: 0;
+ border: 0 none;
+ padding: 0;
+ background-color: #0c0c0c;
+ }
+
+ #canvas {
+ display: block;
+ margin: 0 auto;
+ color: white;
+ }
+
+ #canvas:focus {
+ outline: none;
+ }
+
+
+ /* Status display
+ * ============== */
+
+ #status {
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ /* don't consume click events - make children visible explicitly */
+ visibility: hidden;
+ }
+
+ #status-progress {
+ width: 244px;
+ height: 7px;
+ background-color: #38363A;
+ border: 1px solid #444246;
+ padding: 1px;
+ box-shadow: 0 0 2px 1px #1B1C22;
+ border-radius: 2px;
+ visibility: visible;
+ }
+
+ #status-progress-inner {
+ height: 100%;
+ width: 0;
+ box-sizing: border-box;
+ transition: width 0.5s linear;
+ background-color: #202020;
+ border: 1px solid #222223;
+ box-shadow: 0 0 1px 1px #27282E;
+ border-radius: 3px;
+ }
+
+ #status-indeterminate {
+ visibility: visible;
+ position: relative;
+ }
+
+ #status-indeterminate > div {
+ width: 3px;
+ height: 0;
+ border-style: solid;
+ border-width: 6px 2px 0 2px;
+ border-color: #2b2b2b transparent transparent transparent;
+ transform-origin: center 14px;
+ position: absolute;
+ }
+
+ #status-indeterminate > div:nth-child(1) { transform: rotate( 22.5deg); }
+ #status-indeterminate > div:nth-child(2) { transform: rotate( 67.5deg); }
+ #status-indeterminate > div:nth-child(3) { transform: rotate(112.5deg); }
+ #status-indeterminate > div:nth-child(4) { transform: rotate(157.5deg); }
+ #status-indeterminate > div:nth-child(5) { transform: rotate(202.5deg); }
+ #status-indeterminate > div:nth-child(6) { transform: rotate(247.5deg); }
+ #status-indeterminate > div:nth-child(7) { transform: rotate(292.5deg); }
+ #status-indeterminate > div:nth-child(8) { transform: rotate(337.5deg); }
+
+ #status-notice {
+ margin: 0 100px;
+ line-height: 1.3;
+ visibility: visible;
+ padding: 4px 6px;
+ visibility: visible;
+ }
+
+
+ /* Debug output
+ * ============ */
+
+ #output-panel {
+ display: none;
+ max-width: 700px;
+ font-size: small;
+ margin: 6px auto 0;
+ padding: 0 4px 4px;
+ text-align: left;
+ line-height: 2.2;
+ }
+
+ #output-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ #output-container {
+ padding: 6px;
+ background-color: #2c2a32;
+ box-shadow: inset 0 0 1px 1px #232127;
+ color: #bbb;
+ }
+
+ #output-scroll {
+ line-height: 1;
+ height: 12em;
+ overflow-y: scroll;
+ white-space: pre-wrap;
+ font-size: small;
+ font-family: "Lucida Console", Monaco, monospace;
+ }
+ </style>
+$GODOT_HEAD_INCLUDE
+</head>
+<body>
+ <div id="container">
+ <canvas id="canvas" oncontextmenu="event.preventDefault();" width="640" height="480">
+ HTML5 canvas appears to be unsupported in the current browser.<br />
+ Please try updating or use a different browser.
+ </canvas>
+ <div id="status">
+ <div id='status-progress' style='display: none;' oncontextmenu="event.preventDefault();"><div id ='status-progress-inner'></div></div>
+ <div id='status-indeterminate' style='display: none;' oncontextmenu="event.preventDefault();">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+ <div id="status-notice" class="godot" style='display: none;'></div>
+ </div>
+ </div>
+ <div id="output-panel" class="godot">
+ <div id="output-header">
+ Output:
+ <button id='output-clear' class='godot' type='button' autocomplete='off'>Clear</button>
+ </div>
+ <div id="output-container"><div id="output-scroll"></div></div>
+ </div>
+
+ <script type="text/javascript" src="$GODOT_BASENAME.js"></script>
+ <script type="text/javascript">//<![CDATA[
+
+ var game = new Engine;
+
+ (function() {
+
+ const BASENAME = '$GODOT_BASENAME';
+ const MEMORY_SIZE = $GODOT_TOTAL_MEMORY;
+ const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
+ const INDETERMINATE_STATUS_STEP_MS = 100;
+
+ var container = document.getElementById('container');
+ var canvas = document.getElementById('canvas');
+ var statusProgress = document.getElementById('status-progress');
+ var statusProgressInner = document.getElementById('status-progress-inner');
+ var statusIndeterminate = document.getElementById('status-indeterminate');
+ var statusNotice = document.getElementById('status-notice');
+
+ var initializing = true;
+ var statusMode = 'hidden';
+ var indeterminiateStatusAnimationId = 0;
+
+ setStatusMode('indeterminate');
+ game.setCanvas(canvas);
+ game.setAsmjsMemorySize(MEMORY_SIZE);
+
+ function setStatusMode(mode) {
+
+ if (statusMode === mode || !initializing)
+ return;
+ [statusProgress, statusIndeterminate, statusNotice].forEach(elem => {
+ elem.style.display = 'none';
+ });
+ if (indeterminiateStatusAnimationId !== 0) {
+ cancelAnimationFrame(indeterminiateStatusAnimationId);
+ indeterminiateStatusAnimationId = 0;
+ }
+ switch (mode) {
+ case 'progress':
+ statusProgress.style.display = 'block';
+ break;
+ case 'indeterminate':
+ statusIndeterminate.style.display = 'block';
+ indeterminiateStatusAnimationId = requestAnimationFrame(animateStatusIndeterminate);
+ break;
+ case 'notice':
+ statusNotice.style.display = 'block';
+ break;
+ case 'hidden':
+ break;
+ default:
+ throw new Error("Invalid status mode");
+ }
+ statusMode = mode;
+ }
+
+ function animateStatusIndeterminate(ms) {
+ var i = Math.floor(ms / INDETERMINATE_STATUS_STEP_MS % 8);
+ if (statusIndeterminate.children[i].style.borderTopColor == '') {
+ Array.prototype.slice.call(statusIndeterminate.children).forEach(child => {
+ child.style.borderTopColor = '';
+ });
+ statusIndeterminate.children[i].style.borderTopColor = '#dfdfdf';
+ }
+ requestAnimationFrame(animateStatusIndeterminate);
+ }
+
+ function setStatusNotice(text) {
+
+ while (statusNotice.lastChild) {
+ statusNotice.removeChild(statusNotice.lastChild);
+ }
+ var lines = text.split('\n');
+ lines.forEach((line, index) => {
+ statusNotice.appendChild(document.createTextNode(line));
+ statusNotice.appendChild(document.createElement('br'));
+ });
+ };
+
+ game.setProgressFunc((current, total) => {
+
+ if (total > 0) {
+ statusProgressInner.style.width = current/total * 100 + '%';
+ setStatusMode('progress');
+ if (current === total) {
+ // wait for progress bar animation
+ setTimeout(() => {
+ setStatusMode('indeterminate');
+ }, 500);
+ }
+ } else {
+ setStatusMode('indeterminate');
+ }
+ });
+
+ if (DEBUG_ENABLED) {
+ var outputRoot = document.getElementById("output-panel");
+ var outputScroll = document.getElementById("output-scroll");
+ var OUTPUT_MSG_COUNT_MAX = 400;
+
+ document.getElementById('output-clear').addEventListener('click', () => {
+ while (outputScroll.firstChild) {
+ outputScroll.firstChild.remove();
+ }
+ });
+
+ outputRoot.style.display = 'block';
+
+ function print(text) {
+ if (arguments.length > 1) {
+ text = Array.prototype.slice.call(arguments).join(" ");
+ }
+ if (text.length <= 0) return;
+ while (outputScroll.childElementCount >= OUTPUT_MSG_COUNT_MAX) {
+ outputScroll.firstChild.remove();
+ }
+ var msg = document.createElement("div");
+ if (String.prototype.trim.call(text).startsWith("**ERROR**")) {
+ msg.style.color = "#d44";
+ } else if (String.prototype.trim.call(text).startsWith("**WARNING**")) {
+ msg.style.color = "#ccc000";
+ } else if (String.prototype.trim.call(text).startsWith("**SCRIPT ERROR**")) {
+ msg.style.color = "#c6d";
+ }
+ msg.textContent = text;
+ var scrollToBottom = outputScroll.scrollHeight - (outputScroll.clientHeight + outputScroll.scrollTop) < 10;
+ outputScroll.appendChild(msg);
+ if (scrollToBottom) {
+ outputScroll.scrollTop = outputScroll.scrollHeight;
+ }
+ };
+
+ function printError(text) {
+ print('**ERROR**' + ":", text);
+ }
+
+ game.setStdoutFunc(text => {
+ print(text);
+ console.log(text);
+ });
+
+ game.setStderrFunc(text => {
+ printError(text);
+ console.warn(text);
+ });
+ }
+
+ game.start(BASENAME + '.pck').then(() => {
+ setStatusMode('hidden');
+ initializing = false;
+ }, err => {
+ if (DEBUG_ENABLED)
+ printError(err.message);
+ setStatusNotice(err.message);
+ setStatusMode('notice');
+ initializing = false;
+ });
+ })();
+ //]]></script>
+</body>
+</html>
diff --git a/misc/dist/html_fs/godotfs.js b/misc/dist/html_fs/godotfs.js
deleted file mode 100644
index 676ee689fb..0000000000
--- a/misc/dist/html_fs/godotfs.js
+++ /dev/null
@@ -1,151 +0,0 @@
-
-var Module;
-if (typeof Module === 'undefined') Module = eval('(function() { try { return Module || {} } catch(e) { return {} } })()');
-if (!Module.expectedDataFileDownloads) {
- Module.expectedDataFileDownloads = 0;
- Module.finishedDataFileDownloads = 0;
-}
-Module.expectedDataFileDownloads++;
-(function() {
-
- const PACK_FILE_NAME = '$GODOT_PACK_NAME';
- const PACK_FILE_SIZE = $GODOT_PACK_SIZE;
- function fetchRemotePackage(packageName, callback, errback) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', packageName, true);
- xhr.responseType = 'arraybuffer';
- xhr.onprogress = function(event) {
- var url = packageName;
- if (event.loaded && event.total) {
- if (!xhr.addedTotal) {
- xhr.addedTotal = true;
- if (!Module.dataFileDownloads) Module.dataFileDownloads = {};
- Module.dataFileDownloads[url] = {
- loaded: event.loaded,
- total: event.total
- };
- } else {
- Module.dataFileDownloads[url].loaded = event.loaded;
- }
- var total = 0;
- var loaded = 0;
- var num = 0;
- for (var download in Module.dataFileDownloads) {
- var data = Module.dataFileDownloads[download];
- total += data.total;
- loaded += data.loaded;
- num++;
- }
- total = Math.ceil(total * Module.expectedDataFileDownloads/num);
- if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')');
- } else if (!Module.dataFileDownloads) {
- if (Module['setStatus']) Module['setStatus']('Downloading data...');
- }
- };
- xhr.onload = function(event) {
- var packageData = xhr.response;
- callback(packageData);
- };
- xhr.send(null);
- };
-
- function handleError(error) {
- console.error('package error:', error);
- };
-
- var fetched = null, fetchedCallback = null;
- fetchRemotePackage(PACK_FILE_NAME, function(data) {
- if (fetchedCallback) {
- fetchedCallback(data);
- fetchedCallback = null;
- } else {
- fetched = data;
- }
- }, handleError);
-
- function runWithFS() {
-
-function assert(check, msg) {
- if (!check) throw msg + new Error().stack;
-}
-
- function DataRequest(start, end, crunched, audio) {
- this.start = start;
- this.end = end;
- this.crunched = crunched;
- this.audio = audio;
- }
- DataRequest.prototype = {
- requests: {},
- open: function(mode, name) {
- this.name = name;
- this.requests[name] = this;
- Module['addRunDependency']('fp ' + this.name);
- },
- send: function() {},
- onload: function() {
- var byteArray = this.byteArray.subarray(this.start, this.end);
-
- this.finish(byteArray);
-
- },
- finish: function(byteArray) {
- var that = this;
- Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {
- Module['removeRunDependency']('fp ' + that.name);
- }, function() {
- if (that.audio) {
- Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)
- } else {
- Module.printErr('Preloading file ' + that.name + ' failed');
- }
- }, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change
- this.requests[this.name] = null;
- },
- };
- new DataRequest(0, PACK_FILE_SIZE, 0, 0).open('GET', '/' + PACK_FILE_NAME);
-
- var PACKAGE_PATH;
- if (typeof window === 'object') {
- PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/');
- } else {
- // worker
- PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');
- }
- var PACKAGE_NAME = PACK_FILE_NAME;
- var REMOTE_PACKAGE_NAME = PACK_FILE_NAME;
- var PACKAGE_UUID = 'b39761ce-0348-4959-9b16-302ed8e1592e';
-
- function processPackageData(arrayBuffer) {
- Module.finishedDataFileDownloads++;
- assert(arrayBuffer, 'Loading data file failed.');
- var byteArray = new Uint8Array(arrayBuffer);
- var curr;
-
- // Reuse the bytearray from the XHR as the source for file reads.
- DataRequest.prototype.byteArray = byteArray;
- DataRequest.prototype.requests['/' + PACK_FILE_NAME].onload();
- Module['removeRunDependency']('datafile_datapack');
-
- };
- Module['addRunDependency']('datafile_datapack');
-
- if (!Module.preloadResults) Module.preloadResults = {};
-
- Module.preloadResults[PACKAGE_NAME] = {fromCache: false};
- if (fetched) {
- processPackageData(fetched);
- fetched = null;
- } else {
- fetchedCallback = processPackageData;
- }
-
- }
- if (Module['calledRun']) {
- runWithFS();
- } else {
- if (!Module['preRun']) Module['preRun'] = [];
- Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it
- }
-
-})();
diff --git a/modules/gdnative/gd_native_library_editor.cpp b/modules/gdnative/gd_native_library_editor.cpp
new file mode 100644
index 0000000000..cc2c2b69a6
--- /dev/null
+++ b/modules/gdnative/gd_native_library_editor.cpp
@@ -0,0 +1,148 @@
+/*************************************************************************/
+/* gd_native_library_editor.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifdef TOOLS_ENABLED
+#include "gd_native_library_editor.h"
+
+#include "gdnative.h"
+
+void GDNativeLibraryEditor::_find_gdnative_singletons(EditorFileSystemDirectory *p_dir, const Set<String> &enabled_list) {
+
+ // check children
+
+ for (int i = 0; i < p_dir->get_file_count(); i++) {
+ String file_type = p_dir->get_file_type(i);
+
+ if (file_type != "GDNativeLibrary") {
+ continue;
+ }
+
+ Ref<GDNativeLibrary> lib = ResourceLoader::load(p_dir->get_file_path(i));
+ if (lib.is_valid() && lib->is_singleton_gdnative()) {
+ String path = p_dir->get_file_path(i);
+ TreeItem *ti = libraries->create_item(libraries->get_root());
+ ti->set_text(0, path.get_file());
+ ti->set_tooltip(0, path);
+ ti->set_metadata(0, path);
+ ti->set_cell_mode(1, TreeItem::CELL_MODE_RANGE);
+ ti->set_text(1, "Disabled,Enabled");
+ bool enabled = enabled_list.has(path) ? true : false;
+
+ ti->set_range(1, enabled ? 1 : 0);
+ ti->set_custom_color(1, enabled ? Color(0, 1, 0) : Color(1, 0, 0));
+ }
+ }
+
+ // check subdirectories
+ for (int i = 0; i < p_dir->get_subdir_count(); i++) {
+ _find_gdnative_singletons(p_dir->get_subdir(i), enabled_list);
+ }
+}
+
+void GDNativeLibraryEditor::_update_libraries() {
+
+ updating = true;
+ libraries->clear();
+ libraries->create_item(); //rppt
+
+ Vector<String> enabled_paths;
+ if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
+ enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ }
+ Set<String> enabled_list;
+ for (int i = 0; i < enabled_paths.size(); i++) {
+ enabled_list.insert(enabled_paths[i]);
+ }
+
+ EditorFileSystemDirectory *fs = EditorFileSystem::get_singleton()->get_filesystem();
+ if (fs) {
+ _find_gdnative_singletons(fs, enabled_list);
+ }
+
+ updating = false;
+}
+
+void GDNativeLibraryEditor::_item_edited() {
+ if (updating)
+ return;
+
+ TreeItem *item = libraries->get_edited();
+ if (!item)
+ return;
+
+ bool enabled = item->get_range(1);
+ String path = item->get_metadata(0);
+
+ Vector<String> enabled_paths;
+ if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
+ enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ }
+
+ if (enabled) {
+ if (enabled_paths.find(path) == -1) {
+ enabled_paths.push_back(path);
+ }
+ } else {
+ enabled_paths.erase(path);
+ }
+
+ if (enabled_paths.size()) {
+ ProjectSettings::get_singleton()->set("gdnative/singletons", enabled_paths);
+ } else {
+ ProjectSettings::get_singleton()->set("gdnative/singletons", Variant());
+ }
+}
+
+void GDNativeLibraryEditor::_notification(int p_what) {
+
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ if (is_visible_in_tree()) {
+ _update_libraries();
+ }
+ }
+}
+
+void GDNativeLibraryEditor::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("_item_edited"), &GDNativeLibraryEditor::_item_edited);
+}
+
+GDNativeLibraryEditor::GDNativeLibraryEditor() {
+ libraries = memnew(Tree);
+ libraries->set_columns(2);
+ libraries->set_column_titles_visible(true);
+ libraries->set_column_title(0, TTR("Library"));
+ libraries->set_column_title(1, TTR("Status"));
+ libraries->set_hide_root(true);
+ add_margin_child(TTR("Libraries: "), libraries, true);
+ updating = false;
+ libraries->connect("item_edited", this, "_item_edited");
+}
+
+#endif // TOOLS_ENABLED
diff --git a/modules/gdnative/gd_native_library_editor.h b/modules/gdnative/gd_native_library_editor.h
new file mode 100644
index 0000000000..a11c4620dd
--- /dev/null
+++ b/modules/gdnative/gd_native_library_editor.h
@@ -0,0 +1,55 @@
+/*************************************************************************/
+/* gd_native_library_editor.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef GD_NATIVE_LIBRARY_EDITOR_H
+#define GD_NATIVE_LIBRARY_EDITOR_H
+
+#ifdef TOOLS_ENABLED
+#include "editor/editor_file_system.h"
+#include "editor/project_settings_editor.h"
+
+class GDNativeLibraryEditor : public VBoxContainer {
+ Tree *libraries;
+
+ bool updating;
+ void _update_libraries();
+
+ void _find_gdnative_singletons(EditorFileSystemDirectory *p_dir, const Set<String> &enabled_list);
+ void _item_edited();
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ GDNativeLibraryEditor();
+};
+
+#endif
+#endif // GD_NATIVE_LIBRARY_EDITOR_H
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 6da538844a..8cc8b0bec8 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -40,6 +40,16 @@
const String init_symbol = "godot_gdnative_init";
const String terminate_symbol = "godot_gdnative_terminate";
+#define GDAPI_FUNC(name, ret_type, ...) .name = name,
+#define GDAPI_FUNC_VOID(name, ...) .name = name,
+
+const godot_gdnative_api_struct api_struct = {
+ GODOT_GDNATIVE_API_FUNCTIONS
+};
+
+#undef GDAPI_FUNC
+#undef GDAPI_FUNC_VOID
+
String GDNativeLibrary::platform_names[NUM_PLATFORMS + 1] = {
"X11_32bit",
"X11_64bit",
@@ -91,7 +101,7 @@ GDNativeLibrary::Platform GDNativeLibrary::current_platform =
#endif
GDNativeLibrary::GDNativeLibrary()
- : library_paths() {
+ : library_paths(), singleton_gdnative(false) {
}
GDNativeLibrary::~GDNativeLibrary() {
@@ -249,6 +259,7 @@ bool GDNative::initialize() {
godot_gdnative_init_options options;
+ options.api_struct = &api_struct;
options.in_editor = Engine::get_singleton()->is_editor_hint();
options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 4753c7efe5..29c6201641 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -36,6 +36,7 @@
#include "resource.h"
#include "gdnative/gdnative.h"
+#include "gdnative_api_struct.h"
class GDNativeLibrary : public Resource {
GDCLASS(GDNativeLibrary, Resource)
@@ -77,7 +78,7 @@ class GDNativeLibrary : public Resource {
String library_paths[NUM_PLATFORMS];
- bool singleton_gdnative = false;
+ bool singleton_gdnative;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/modules/gdnative/gdnative/color.cpp b/modules/gdnative/gdnative/color.cpp
index 3f8912d896..2a5c0887a1 100644
--- a/modules/gdnative/gdnative/color.cpp
+++ b/modules/gdnative/gdnative/color.cpp
@@ -112,14 +112,14 @@ godot_string GDAPI godot_color_as_string(const godot_color *p_self) {
return ret;
}
-godot_int GDAPI godot_color_to_32(const godot_color *p_self) {
+godot_int GDAPI godot_color_to_rgba32(const godot_color *p_self) {
const Color *self = (const Color *)p_self;
- return self->to_32();
+ return self->to_rgba32();
}
-godot_int GDAPI godot_color_to_ARGB32(const godot_color *p_self) {
+godot_int GDAPI godot_color_to_argb32(const godot_color *p_self) {
const Color *self = (const Color *)p_self;
- return self->to_ARGB32();
+ return self->to_argb32();
}
godot_real GDAPI godot_color_gray(const godot_color *p_self) {
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index b61f80b1f9..1b2aae607f 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gdnative/variant.h"
+#include "core/reference.h"
#include "core/variant.h"
#ifdef __cplusplus
@@ -158,7 +159,21 @@ void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid)
void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj) {
Variant *dest = (Variant *)r_dest;
Object *obj = (Object *)p_obj;
- memnew_placement_custom(dest, Variant, Variant(obj));
+ Reference *reference = Object::cast_to<Reference>(obj);
+ REF ref;
+ if (reference) {
+ ref = REF(reference);
+ }
+ if (!ref.is_null()) {
+ memnew_placement_custom(dest, Variant, Variant(ref.get_ref_ptr()));
+ } else {
+#if defined(DEBUG_METHODS_ENABLED)
+ if (reference) {
+ ERR_PRINT("Reference object has 0 refcount in godot_variant_new_object - you lost it somewhere.");
+ }
+#endif
+ memnew_placement_custom(dest, Variant, Variant(obj));
+ }
}
void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict) {
diff --git a/modules/gdnative/include/gdnative/color.h b/modules/gdnative/include/gdnative/color.h
index 90dccf75aa..14265466b9 100644
--- a/modules/gdnative/include/gdnative/color.h
+++ b/modules/gdnative/include/gdnative/color.h
@@ -69,9 +69,9 @@ godot_real godot_color_get_v(const godot_color *p_self);
godot_string GDAPI godot_color_as_string(const godot_color *p_self);
-godot_int GDAPI godot_color_to_32(const godot_color *p_self);
+godot_int GDAPI godot_color_to_rgba32(const godot_color *p_self);
-godot_int GDAPI godot_color_to_ARGB32(const godot_color *p_self);
+godot_int GDAPI godot_color_to_argb32(const godot_color *p_self);
godot_real GDAPI godot_color_gray(const godot_color *p_self);
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index c574c56d5a..04dca6f56d 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -234,7 +234,10 @@ void GDAPI godot_method_bind_ptrcall(godot_method_bind *p_method_bind, godot_obj
godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error);
////// Script API
+struct godot_gdnative_api_struct; // Forward declaration
+
typedef struct {
+ const struct godot_gdnative_api_struct *api_struct;
godot_bool in_editor;
uint64_t core_api_hash;
uint64_t editor_api_hash;
diff --git a/modules/gdnative/include/gdnative_api_struct.h b/modules/gdnative/include/gdnative_api_struct.h
new file mode 100644
index 0000000000..cfebeb08cc
--- /dev/null
+++ b/modules/gdnative/include/gdnative_api_struct.h
@@ -0,0 +1,723 @@
+/*************************************************************************/
+/* gdnative_api_struct.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef GODOT_GDNATIVE_API_STRUCT_H
+#define GODOT_GDNATIVE_API_STRUCT_H
+
+#include <gdnative/gdnative.h>
+#include <nativescript/godot_nativescript.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Using X_MACRO to keep api function signatures in a single list
+#define GODOT_GDNATIVE_API_FUNCTIONS \
+ GDAPI_FUNC_VOID(godot_color_new_rgba, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) \
+ GDAPI_FUNC_VOID(godot_color_new_rgb, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b) \
+ GDAPI_FUNC(godot_color_get_r, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_r, godot_color *p_self, const godot_real r) \
+ GDAPI_FUNC(godot_color_get_g, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_g, godot_color *p_self, const godot_real g) \
+ GDAPI_FUNC(godot_color_get_b, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_b, godot_color *p_self, const godot_real b) \
+ GDAPI_FUNC(godot_color_get_a, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_a, godot_color *p_self, const godot_real a) \
+ GDAPI_FUNC(godot_color_get_h, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_get_s, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_get_v, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_as_string, godot_string, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_to_rgba32, godot_int, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_to_argb32, godot_int, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_gray, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_inverted, godot_color, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_contrasted, godot_color, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_linear_interpolate, godot_color, const godot_color *p_self, const godot_color *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_color_blend, godot_color, const godot_color *p_self, const godot_color *p_over) \
+ GDAPI_FUNC(godot_color_to_html, godot_string, const godot_color *p_self, const godot_bool p_with_alpha) \
+ GDAPI_FUNC(godot_color_operator_equal, godot_bool, const godot_color *p_self, const godot_color *p_b) \
+ GDAPI_FUNC(godot_color_operator_less, godot_bool, const godot_color *p_self, const godot_color *p_b) \
+ GDAPI_FUNC_VOID(godot_vector2_new, godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) \
+ GDAPI_FUNC(godot_vector2_as_string, godot_string, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_normalized, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_length, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_angle, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_length_squared, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_is_normalized, godot_bool, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_distance_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_distance_squared_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_angle_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_angle_to_point, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_linear_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector2_cubic_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector2_rotated, godot_vector2, const godot_vector2 *p_self, const godot_real p_phi) \
+ GDAPI_FUNC(godot_vector2_tangent, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_floor, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_snapped, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_by) \
+ GDAPI_FUNC(godot_vector2_aspect, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_dot, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_with) \
+ GDAPI_FUNC(godot_vector2_slide, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_bounce, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_reflect, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_abs, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_clamped, godot_vector2, const godot_vector2 *p_self, const godot_real p_length) \
+ GDAPI_FUNC(godot_vector2_operator_add, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_substract, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_multiply_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_multiply_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector2_operator_divide_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_divide_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector2_operator_equal, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_less, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_neg, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC_VOID(godot_vector2_set_x, godot_vector2 *p_self, const godot_real p_x) \
+ GDAPI_FUNC_VOID(godot_vector2_set_y, godot_vector2 *p_self, const godot_real p_y) \
+ GDAPI_FUNC(godot_vector2_get_x, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_get_y, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_new, godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) \
+ GDAPI_FUNC_VOID(godot_quat_new_with_axis_angle, godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle) \
+ GDAPI_FUNC(godot_quat_get_x, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_x, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_y, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_y, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_z, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_z, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_w, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_w, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_as_string, godot_string, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_length, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_length_squared, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_normalized, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_is_normalized, godot_bool, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_inverse, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_dot, godot_real, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_xform, godot_vector3, const godot_quat *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_quat_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_slerpni, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_cubic_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_operator_multiply, godot_quat, const godot_quat *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_quat_operator_add, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_substract, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_divide, godot_quat, const godot_quat *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_quat_operator_equal, godot_bool, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_neg, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_rows, godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_axis_and_angle, godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_euler, godot_basis *r_dest, const godot_vector3 *p_euler) \
+ GDAPI_FUNC(godot_basis_as_string, godot_string, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_inverse, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_transposed, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_orthonormalized, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_determinant, godot_real, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_rotated, godot_basis, const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_basis_scaled, godot_basis, const godot_basis *p_self, const godot_vector3 *p_scale) \
+ GDAPI_FUNC(godot_basis_get_scale, godot_vector3, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_get_euler, godot_vector3, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_tdotx, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_tdoty, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_tdotz, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_xform, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_basis_xform_inv, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_basis_get_orthogonal_index, godot_int, const godot_basis *p_self) \
+ GDAPI_FUNC_VOID(godot_basis_new, godot_basis *r_dest) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_euler_quat, godot_basis *r_dest, const godot_quat *p_euler) \
+ GDAPI_FUNC_VOID(godot_basis_get_elements, godot_basis *p_self, godot_vector3 *p_elements) \
+ GDAPI_FUNC(godot_basis_get_axis, godot_vector3, const godot_basis *p_self, const godot_int p_axis) \
+ GDAPI_FUNC_VOID(godot_basis_set_axis, godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value) \
+ GDAPI_FUNC(godot_basis_get_row, godot_vector3, const godot_basis *p_self, const godot_int p_row) \
+ GDAPI_FUNC_VOID(godot_basis_set_row, godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value) \
+ GDAPI_FUNC(godot_basis_operator_equal, godot_bool, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_add, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_substract, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_multiply_vector, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_multiply_scalar, godot_basis, const godot_basis *p_self, const godot_real p_b) \
+ GDAPI_FUNC_VOID(godot_vector3_new, godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) \
+ GDAPI_FUNC(godot_vector3_as_string, godot_string, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_min_axis, godot_int, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_max_axis, godot_int, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_length, godot_real, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_length_squared, godot_real, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_is_normalized, godot_bool, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_normalized, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_inverse, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_snapped, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_by) \
+ GDAPI_FUNC(godot_vector3_rotated, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_vector3_linear_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector3_cubic_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector3_dot, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_cross, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_outer, godot_basis, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_to_diagonal_matrix, godot_basis, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_abs, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_floor, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_ceil, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_distance_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_distance_squared_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_angle_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_to) \
+ GDAPI_FUNC(godot_vector3_slide, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_bounce, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_reflect, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_operator_add, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_substract, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_multiply_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_multiply_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector3_operator_divide_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_divide_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector3_operator_equal, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_less, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_neg, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC_VOID(godot_vector3_set_axis, godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val) \
+ GDAPI_FUNC(godot_vector3_get_axis, godot_real, const godot_vector3 *p_self, const godot_vector3_axis p_axis) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new, godot_pool_byte_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new_copy, godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new_with_array, godot_pool_byte_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_append, godot_pool_byte_array *p_self, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_append_array, godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array) \
+ GDAPI_FUNC(godot_pool_byte_array_insert, godot_error, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_invert, godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_push_back, godot_pool_byte_array *p_self, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_remove, godot_pool_byte_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_resize, godot_pool_byte_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_set, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
+ GDAPI_FUNC(godot_pool_byte_array_get, uint8_t, const godot_pool_byte_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_byte_array_size, godot_int, const godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_destroy, godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new, godot_pool_int_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new_copy, godot_pool_int_array *r_dest, const godot_pool_int_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new_with_array, godot_pool_int_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_append, godot_pool_int_array *p_self, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_append_array, godot_pool_int_array *p_self, const godot_pool_int_array *p_array) \
+ GDAPI_FUNC(godot_pool_int_array_insert, godot_error, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_invert, godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_push_back, godot_pool_int_array *p_self, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_remove, godot_pool_int_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_resize, godot_pool_int_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_set, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
+ GDAPI_FUNC(godot_pool_int_array_get, godot_int, const godot_pool_int_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_int_array_size, godot_int, const godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_destroy, godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new, godot_pool_real_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new_copy, godot_pool_real_array *r_dest, const godot_pool_real_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new_with_array, godot_pool_real_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_append, godot_pool_real_array *p_self, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_append_array, godot_pool_real_array *p_self, const godot_pool_real_array *p_array) \
+ GDAPI_FUNC(godot_pool_real_array_insert, godot_error, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_invert, godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_push_back, godot_pool_real_array *p_self, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_remove, godot_pool_real_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_resize, godot_pool_real_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_set, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
+ GDAPI_FUNC(godot_pool_real_array_get, godot_real, const godot_pool_real_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_real_array_size, godot_int, const godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_destroy, godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new, godot_pool_string_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new_copy, godot_pool_string_array *r_dest, const godot_pool_string_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new_with_array, godot_pool_string_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_append, godot_pool_string_array *p_self, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_append_array, godot_pool_string_array *p_self, const godot_pool_string_array *p_array) \
+ GDAPI_FUNC(godot_pool_string_array_insert, godot_error, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_invert, godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_push_back, godot_pool_string_array *p_self, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_remove, godot_pool_string_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_resize, godot_pool_string_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_set, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
+ GDAPI_FUNC(godot_pool_string_array_get, godot_string, const godot_pool_string_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_string_array_size, godot_int, const godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_destroy, godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new, godot_pool_vector2_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new_copy, godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new_with_array, godot_pool_vector2_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_append, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_append_array, godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array) \
+ GDAPI_FUNC(godot_pool_vector2_array_insert, godot_error, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_invert, godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_push_back, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_remove, godot_pool_vector2_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_resize, godot_pool_vector2_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_set, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
+ GDAPI_FUNC(godot_pool_vector2_array_get, godot_vector2, const godot_pool_vector2_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_vector2_array_size, godot_int, const godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_destroy, godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new, godot_pool_vector3_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new_copy, godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new_with_array, godot_pool_vector3_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_append, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_append_array, godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array) \
+ GDAPI_FUNC(godot_pool_vector3_array_insert, godot_error, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_invert, godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_push_back, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_remove, godot_pool_vector3_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_resize, godot_pool_vector3_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_set, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
+ GDAPI_FUNC(godot_pool_vector3_array_get, godot_vector3, const godot_pool_vector3_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_vector3_array_size, godot_int, const godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_destroy, godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new, godot_pool_color_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new_copy, godot_pool_color_array *r_dest, const godot_pool_color_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new_with_array, godot_pool_color_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_append, godot_pool_color_array *p_self, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_append_array, godot_pool_color_array *p_self, const godot_pool_color_array *p_array) \
+ GDAPI_FUNC(godot_pool_color_array_insert, godot_error, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_invert, godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_push_back, godot_pool_color_array *p_self, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_remove, godot_pool_color_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_resize, godot_pool_color_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_set, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
+ GDAPI_FUNC(godot_pool_color_array_get, godot_color, const godot_pool_color_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_color_array_size, godot_int, const godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_destroy, godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_new, godot_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_array_new_copy, godot_array *r_dest, const godot_array *p_src) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_color_array, godot_array *r_dest, const godot_pool_color_array *p_pca) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_vector3_array, godot_array *r_dest, const godot_pool_vector3_array *p_pv3a) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_vector2_array, godot_array *r_dest, const godot_pool_vector2_array *p_pv2a) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_string_array, godot_array *r_dest, const godot_pool_string_array *p_psa) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_real_array, godot_array *r_dest, const godot_pool_real_array *p_pra) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_int_array, godot_array *r_dest, const godot_pool_int_array *p_pia) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_byte_array, godot_array *r_dest, const godot_pool_byte_array *p_pba) \
+ GDAPI_FUNC_VOID(godot_array_set, godot_array *p_self, const godot_int p_idx, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_get, godot_variant, const godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_array_operator_index, godot_variant *, godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_array_append, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_clear, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_count, godot_int, const godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_empty, godot_bool, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_erase, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_front, godot_variant, const godot_array *p_self) \
+ GDAPI_FUNC(godot_array_back, godot_variant, const godot_array *p_self) \
+ GDAPI_FUNC(godot_array_find, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
+ GDAPI_FUNC(godot_array_find_last, godot_int, const godot_array *p_self, const godot_variant *p_what) \
+ GDAPI_FUNC(godot_array_has, godot_bool, const godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_hash, godot_int, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_insert, godot_array *p_self, const godot_int p_pos, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_invert, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_pop_back, godot_variant, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_pop_front, godot_variant, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_push_back, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_push_front, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_remove, godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_array_resize, godot_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC(godot_array_rfind, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
+ GDAPI_FUNC(godot_array_size, godot_int, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_sort, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_sort_custom, godot_array *p_self, godot_object *p_obj, const godot_string *p_func) \
+ GDAPI_FUNC_VOID(godot_array_destroy, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_dictionary_new, godot_dictionary *r_dest) \
+ GDAPI_FUNC_VOID(godot_dictionary_new_copy, godot_dictionary *r_dest, const godot_dictionary *p_src) \
+ GDAPI_FUNC_VOID(godot_dictionary_destroy, godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_size, godot_int, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_empty, godot_bool, const godot_dictionary *p_self) \
+ GDAPI_FUNC_VOID(godot_dictionary_clear, godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_has, godot_bool, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_has_all, godot_bool, const godot_dictionary *p_self, const godot_array *p_keys) \
+ GDAPI_FUNC_VOID(godot_dictionary_erase, godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_hash, godot_int, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_keys, godot_array, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_values, godot_array, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_get, godot_variant, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC_VOID(godot_dictionary_set, godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_dictionary_operator_index, godot_variant *, godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_next, godot_variant *, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_operator_equal, godot_bool, const godot_dictionary *p_self, const godot_dictionary *p_b) \
+ GDAPI_FUNC(godot_dictionary_to_json, godot_string, const godot_dictionary *p_self) \
+ GDAPI_FUNC_VOID(godot_node_path_new, godot_node_path *r_dest, const godot_string *p_from) \
+ GDAPI_FUNC_VOID(godot_node_path_new_copy, godot_node_path *r_dest, const godot_node_path *p_src) \
+ GDAPI_FUNC_VOID(godot_node_path_destroy, godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_as_string, godot_string, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_is_absolute, godot_bool, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_name_count, godot_int, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_name, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_node_path_get_subname_count, godot_int, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_subname, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_node_path_get_property, godot_string, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_is_empty, godot_bool, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_operator_equal, godot_bool, const godot_node_path *p_self, const godot_node_path *p_b) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_reals, godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_vectors, godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_normal, godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d) \
+ GDAPI_FUNC(godot_plane_as_string, godot_string, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_normalized, godot_plane, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_center, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_get_any_point, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_is_point_over, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_distance_to, godot_real, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_has_point, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon) \
+ GDAPI_FUNC(godot_plane_project, godot_vector3, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_intersect_3, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c) \
+ GDAPI_FUNC(godot_plane_intersects_ray, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir) \
+ GDAPI_FUNC(godot_plane_intersects_segment, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end) \
+ GDAPI_FUNC(godot_plane_operator_neg, godot_plane, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_operator_equal, godot_bool, const godot_plane *p_self, const godot_plane *p_b) \
+ GDAPI_FUNC_VOID(godot_plane_set_normal, godot_plane *p_self, const godot_vector3 *p_normal) \
+ GDAPI_FUNC(godot_plane_get_normal, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_get_d, godot_real, const godot_plane *p_self) \
+ GDAPI_FUNC_VOID(godot_plane_set_d, godot_plane *p_self, const godot_real p_d) \
+ GDAPI_FUNC_VOID(godot_rect2_new_with_position_and_size, godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) \
+ GDAPI_FUNC_VOID(godot_rect2_new, godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) \
+ GDAPI_FUNC(godot_rect2_as_string, godot_string, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_get_area, godot_real, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_intersects, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_encloses, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_has_no_area, godot_bool, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_clip, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_merge, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_has_point, godot_bool, const godot_rect2 *p_self, const godot_vector2 *p_point) \
+ GDAPI_FUNC(godot_rect2_grow, godot_rect2, const godot_rect2 *p_self, const godot_real p_by) \
+ GDAPI_FUNC(godot_rect2_expand, godot_rect2, const godot_rect2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_rect2_operator_equal, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_get_position, godot_vector2, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_get_size, godot_vector2, const godot_rect2 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect2_set_position, godot_rect2 *p_self, const godot_vector2 *p_pos) \
+ GDAPI_FUNC_VOID(godot_rect2_set_size, godot_rect2 *p_self, const godot_vector2 *p_size) \
+ GDAPI_FUNC_VOID(godot_rect3_new, godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) \
+ GDAPI_FUNC(godot_rect3_get_position, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect3_set_position, const godot_rect3 *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_rect3_get_size, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect3_set_size, const godot_rect3 *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_rect3_as_string, godot_string, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_area, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_has_no_area, godot_bool, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_has_no_surface, godot_bool, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_intersects, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_encloses, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_merge, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_intersection, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_intersects_plane, godot_bool, const godot_rect3 *p_self, const godot_plane *p_plane) \
+ GDAPI_FUNC(godot_rect3_intersects_segment, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to) \
+ GDAPI_FUNC(godot_rect3_has_point, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_rect3_get_support, godot_vector3, const godot_rect3 *p_self, const godot_vector3 *p_dir) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis_index, godot_int, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis_size, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis_index, godot_int, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis_size, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_expand, godot_rect3, const godot_rect3 *p_self, const godot_vector3 *p_to_point) \
+ GDAPI_FUNC(godot_rect3_grow, godot_rect3, const godot_rect3 *p_self, const godot_real p_by) \
+ GDAPI_FUNC(godot_rect3_get_endpoint, godot_vector3, const godot_rect3 *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_rect3_operator_equal, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_b) \
+ GDAPI_FUNC_VOID(godot_rid_new, godot_rid *r_dest) \
+ GDAPI_FUNC(godot_rid_get_id, godot_int, const godot_rid *p_self) \
+ GDAPI_FUNC_VOID(godot_rid_new_with_resource, godot_rid *r_dest, const godot_object *p_from) \
+ GDAPI_FUNC(godot_rid_operator_equal, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
+ GDAPI_FUNC(godot_rid_operator_less, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
+ GDAPI_FUNC_VOID(godot_transform_new_with_axis_origin, godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) \
+ GDAPI_FUNC_VOID(godot_transform_new, godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin) \
+ GDAPI_FUNC(godot_transform_get_basis, godot_basis, const godot_transform *p_self) \
+ GDAPI_FUNC_VOID(godot_transform_set_basis, godot_transform *p_self, godot_basis *p_v) \
+ GDAPI_FUNC(godot_transform_get_origin, godot_vector3, const godot_transform *p_self) \
+ GDAPI_FUNC_VOID(godot_transform_set_origin, godot_transform *p_self, godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_as_string, godot_string, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_inverse, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_affine_inverse, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_orthonormalized, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_rotated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_transform_scaled, godot_transform, const godot_transform *p_self, const godot_vector3 *p_scale) \
+ GDAPI_FUNC(godot_transform_translated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_ofs) \
+ GDAPI_FUNC(godot_transform_looking_at, godot_transform, const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up) \
+ GDAPI_FUNC(godot_transform_xform_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
+ GDAPI_FUNC_VOID(godot_transform_new_identity, godot_transform *r_dest) \
+ GDAPI_FUNC(godot_transform_operator_equal, godot_bool, const godot_transform *p_self, const godot_transform *p_b) \
+ GDAPI_FUNC(godot_transform_operator_multiply, godot_transform, const godot_transform *p_self, const godot_transform *p_b) \
+ GDAPI_FUNC(godot_transform_xform_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
+ GDAPI_FUNC_VOID(godot_transform2d_new, godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) \
+ GDAPI_FUNC_VOID(godot_transform2d_new_axis_origin, godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin) \
+ GDAPI_FUNC(godot_transform2d_as_string, godot_string, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_inverse, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_affine_inverse, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_rotation, godot_real, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_origin, godot_vector2, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_scale, godot_vector2, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_orthonormalized, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_rotated, godot_transform2d, const godot_transform2d *p_self, const godot_real p_phi) \
+ GDAPI_FUNC(godot_transform2d_scaled, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_scale) \
+ GDAPI_FUNC(godot_transform2d_translated, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_offset) \
+ GDAPI_FUNC(godot_transform2d_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_basis_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_basis_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_interpolate_with, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c) \
+ GDAPI_FUNC(godot_transform2d_operator_equal, godot_bool, const godot_transform2d *p_self, const godot_transform2d *p_b) \
+ GDAPI_FUNC(godot_transform2d_operator_multiply, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_b) \
+ GDAPI_FUNC_VOID(godot_transform2d_new_identity, godot_transform2d *r_dest) \
+ GDAPI_FUNC(godot_transform2d_xform_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_xform_inv_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
+ GDAPI_FUNC(godot_variant_get_type, godot_variant_type, const godot_variant *p_v) \
+ GDAPI_FUNC_VOID(godot_variant_new_copy, godot_variant *r_dest, const godot_variant *p_src) \
+ GDAPI_FUNC_VOID(godot_variant_new_nil, godot_variant *r_dest) \
+ GDAPI_FUNC_VOID(godot_variant_new_bool, godot_variant *p_v, const godot_bool p_b) \
+ GDAPI_FUNC_VOID(godot_variant_new_uint, godot_variant *r_dest, const uint64_t p_i) \
+ GDAPI_FUNC_VOID(godot_variant_new_int, godot_variant *r_dest, const int64_t p_i) \
+ GDAPI_FUNC_VOID(godot_variant_new_real, godot_variant *r_dest, const double p_r) \
+ GDAPI_FUNC_VOID(godot_variant_new_string, godot_variant *r_dest, const godot_string *p_s) \
+ GDAPI_FUNC_VOID(godot_variant_new_vector2, godot_variant *r_dest, const godot_vector2 *p_v2) \
+ GDAPI_FUNC_VOID(godot_variant_new_rect2, godot_variant *r_dest, const godot_rect2 *p_rect2) \
+ GDAPI_FUNC_VOID(godot_variant_new_vector3, godot_variant *r_dest, const godot_vector3 *p_v3) \
+ GDAPI_FUNC_VOID(godot_variant_new_transform2d, godot_variant *r_dest, const godot_transform2d *p_t2d) \
+ GDAPI_FUNC_VOID(godot_variant_new_plane, godot_variant *r_dest, const godot_plane *p_plane) \
+ GDAPI_FUNC_VOID(godot_variant_new_quat, godot_variant *r_dest, const godot_quat *p_quat) \
+ GDAPI_FUNC_VOID(godot_variant_new_rect3, godot_variant *r_dest, const godot_rect3 *p_rect3) \
+ GDAPI_FUNC_VOID(godot_variant_new_basis, godot_variant *r_dest, const godot_basis *p_basis) \
+ GDAPI_FUNC_VOID(godot_variant_new_transform, godot_variant *r_dest, const godot_transform *p_trans) \
+ GDAPI_FUNC_VOID(godot_variant_new_color, godot_variant *r_dest, const godot_color *p_color) \
+ GDAPI_FUNC_VOID(godot_variant_new_node_path, godot_variant *r_dest, const godot_node_path *p_np) \
+ GDAPI_FUNC_VOID(godot_variant_new_rid, godot_variant *r_dest, const godot_rid *p_rid) \
+ GDAPI_FUNC_VOID(godot_variant_new_object, godot_variant *r_dest, const godot_object *p_obj) \
+ GDAPI_FUNC_VOID(godot_variant_new_dictionary, godot_variant *r_dest, const godot_dictionary *p_dict) \
+ GDAPI_FUNC_VOID(godot_variant_new_array, godot_variant *r_dest, const godot_array *p_arr) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_byte_array, godot_variant *r_dest, const godot_pool_byte_array *p_pba) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_int_array, godot_variant *r_dest, const godot_pool_int_array *p_pia) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_real_array, godot_variant *r_dest, const godot_pool_real_array *p_pra) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_string_array, godot_variant *r_dest, const godot_pool_string_array *p_psa) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_vector2_array, godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_vector3_array, godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_color_array, godot_variant *r_dest, const godot_pool_color_array *p_pca) \
+ GDAPI_FUNC(godot_variant_as_bool, godot_bool, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_uint, uint64_t, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_int, int64_t, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_real, double, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_string, godot_string, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_vector2, godot_vector2, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rect2, godot_rect2, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_vector3, godot_vector3, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_transform2d, godot_transform2d, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_plane, godot_plane, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_quat, godot_quat, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rect3, godot_rect3, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_basis, godot_basis, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_transform, godot_transform, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_color, godot_color, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_node_path, godot_node_path, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rid, godot_rid, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_object, godot_object *, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_dictionary, godot_dictionary, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_array, godot_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_byte_array, godot_pool_byte_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_int_array, godot_pool_int_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_real_array, godot_pool_real_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_string_array, godot_pool_string_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_vector2_array, godot_pool_vector2_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_vector3_array, godot_pool_vector3_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_color_array, godot_pool_color_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_call, godot_variant, godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error) \
+ GDAPI_FUNC(godot_variant_has_method, godot_bool, const godot_variant *p_self, const godot_string *p_method) \
+ GDAPI_FUNC(godot_variant_operator_equal, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_operator_less, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_hash_compare, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_booleanize, godot_bool, const godot_variant *p_self, godot_bool *r_valid) \
+ GDAPI_FUNC_VOID(godot_variant_destroy, godot_variant *p_self) \
+ GDAPI_FUNC_VOID(godot_string_new, godot_string *r_dest) \
+ GDAPI_FUNC_VOID(godot_string_new_copy, godot_string *r_dest, const godot_string *p_src) \
+ GDAPI_FUNC_VOID(godot_string_new_data, godot_string *r_dest, const char *p_contents, const int p_size) \
+ GDAPI_FUNC_VOID(godot_string_new_unicode_data, godot_string *r_dest, const wchar_t *p_contents, const int p_size) \
+ GDAPI_FUNC_VOID(godot_string_get_data, const godot_string *p_self, char *p_dest, int *p_size) \
+ GDAPI_FUNC(godot_string_operator_index, wchar_t *, godot_string *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_string_c_str, const char *, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_unicode_str, const wchar_t *, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_operator_equal, godot_bool, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_operator_less, godot_bool, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_operator_plus, godot_string, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_length, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_begins_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_begins_with_char_array, godot_bool, const godot_string *p_self, const char *p_char_array) \
+ GDAPI_FUNC(godot_string_bigrams, godot_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_chr, godot_string, wchar_t p_character) \
+ GDAPI_FUNC(godot_string_ends_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_find, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_find_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_findmk, godot_int, const godot_string *p_self, const godot_array *p_keys) \
+ GDAPI_FUNC(godot_string_findmk_from, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from) \
+ GDAPI_FUNC(godot_string_findmk_from_in_place, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from, godot_int *r_key) \
+ GDAPI_FUNC(godot_string_findn, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_findn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_find_last, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_format, godot_string, const godot_string *p_self, const godot_variant *p_values) \
+ GDAPI_FUNC(godot_string_format_with_custom_placeholder, godot_string, const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder) \
+ GDAPI_FUNC(godot_string_hex_encode_buffer, godot_string, const uint8_t *p_buffer, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hex_to_int, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hex_to_int_without_prefix, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_insert, godot_string, const godot_string *p_self, godot_int p_at_pos, godot_string p_string) \
+ GDAPI_FUNC(godot_string_is_numeric, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_subsequence_of, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_is_subsequence_ofi, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_lpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
+ GDAPI_FUNC(godot_string_lpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
+ GDAPI_FUNC(godot_string_match, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
+ GDAPI_FUNC(godot_string_matchn, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
+ GDAPI_FUNC(godot_string_md5, godot_string, const uint8_t *p_md5) \
+ GDAPI_FUNC(godot_string_num, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_int64, godot_string, int64_t p_num, godot_int p_base) \
+ GDAPI_FUNC(godot_string_num_int64_capitalized, godot_string, int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex) \
+ GDAPI_FUNC(godot_string_num_real, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_scientific, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_with_decimals, godot_string, double p_num, godot_int p_decimals) \
+ GDAPI_FUNC(godot_string_pad_decimals, godot_string, const godot_string *p_self, godot_int p_digits) \
+ GDAPI_FUNC(godot_string_pad_zeros, godot_string, const godot_string *p_self, godot_int p_digits) \
+ GDAPI_FUNC(godot_string_replace_first, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_replace, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_replacen, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_rfind, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_rfindn, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_rfind_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_rfindn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_rpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
+ GDAPI_FUNC(godot_string_rpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
+ GDAPI_FUNC(godot_string_similarity, godot_real, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_sprintf, godot_string, const godot_string *p_self, const godot_array *p_values, godot_bool *p_error) \
+ GDAPI_FUNC(godot_string_substr, godot_string, const godot_string *p_self, godot_int p_from, godot_int p_chars) \
+ GDAPI_FUNC(godot_string_to_double, double, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_float, godot_real, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_int, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_camelcase_to_underscore, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_camelcase_to_underscore_lowercased, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_capitalize, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_char_to_double, double, const char *p_what) \
+ GDAPI_FUNC(godot_string_char_to_int, godot_int, const char *p_what) \
+ GDAPI_FUNC(godot_string_wchar_to_int, int64_t, const wchar_t *p_str) \
+ GDAPI_FUNC(godot_string_char_to_int_with_len, godot_int, const char *p_what, godot_int p_len) \
+ GDAPI_FUNC(godot_string_char_to_int64_with_len, int64_t, const wchar_t *p_str, int p_len) \
+ GDAPI_FUNC(godot_string_hex_to_int64, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hex_to_int64_with_prefix, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_int64, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_unicode_char_to_double, double, const wchar_t *p_str, const wchar_t **r_end) \
+ GDAPI_FUNC(godot_string_get_slice_count, godot_int, const godot_string *p_self, godot_string p_splitter) \
+ GDAPI_FUNC(godot_string_get_slice, godot_string, const godot_string *p_self, godot_string p_splitter, godot_int p_slice) \
+ GDAPI_FUNC(godot_string_get_slicec, godot_string, const godot_string *p_self, wchar_t p_splitter, godot_int p_slice) \
+ GDAPI_FUNC(godot_string_split, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_allow_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_floats_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_ints, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_ints_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_ints_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_ints_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_spaces, godot_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_char_lowercase, wchar_t, wchar_t p_char) \
+ GDAPI_FUNC(godot_string_char_uppercase, wchar_t, wchar_t p_char) \
+ GDAPI_FUNC(godot_string_to_lower, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_upper, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_basename, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_extension, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_left, godot_string, const godot_string *p_self, godot_int p_pos) \
+ GDAPI_FUNC(godot_string_ord_at, wchar_t, const godot_string *p_self, godot_int p_idx) \
+ GDAPI_FUNC(godot_string_plus_file, godot_string, const godot_string *p_self, const godot_string *p_file) \
+ GDAPI_FUNC(godot_string_right, godot_string, const godot_string *p_self, godot_int p_pos) \
+ GDAPI_FUNC(godot_string_strip_edges, godot_string, const godot_string *p_self, godot_bool p_left, godot_bool p_right) \
+ GDAPI_FUNC(godot_string_strip_escapes, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_string_erase, godot_string *p_self, godot_int p_pos, godot_int p_chars) \
+ GDAPI_FUNC_VOID(godot_string_ascii, godot_string *p_self, char *result) \
+ GDAPI_FUNC_VOID(godot_string_ascii_extended, godot_string *p_self, char *result) \
+ GDAPI_FUNC_VOID(godot_string_utf8, godot_string *p_self, char *result) \
+ GDAPI_FUNC(godot_string_parse_utf8, godot_bool, godot_string *p_self, const char *p_utf8) \
+ GDAPI_FUNC(godot_string_parse_utf8_with_len, godot_bool, godot_string *p_self, const char *p_utf8, godot_int p_len) \
+ GDAPI_FUNC(godot_string_chars_to_utf8, godot_string, const char *p_utf8) \
+ GDAPI_FUNC(godot_string_chars_to_utf8_with_len, godot_string, const char *p_utf8, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hash, uint32_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hash64, uint64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hash_chars, uint32_t, const char *p_cstr) \
+ GDAPI_FUNC(godot_string_hash_chars_with_len, uint32_t, const char *p_cstr, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hash_utf8_chars, uint32_t, const wchar_t *p_str) \
+ GDAPI_FUNC(godot_string_hash_utf8_chars_with_len, uint32_t, const wchar_t *p_str, godot_int p_len) \
+ GDAPI_FUNC(godot_string_md5_buffer, godot_pool_byte_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_md5_text, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_sha256_buffer, godot_pool_byte_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_sha256_text, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_empty, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_base_dir, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_file, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_humanize_size, godot_string, size_t p_size) \
+ GDAPI_FUNC(godot_string_is_abs_path, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_rel_path, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_resource_file, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_path_to, godot_string, const godot_string *p_self, const godot_string *p_path) \
+ GDAPI_FUNC(godot_string_path_to_file, godot_string, const godot_string *p_self, const godot_string *p_path) \
+ GDAPI_FUNC(godot_string_simplify_path, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_escape_multiline, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_http_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_http_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_json_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_word_wrap, godot_string, const godot_string *p_self, godot_int p_chars_per_line) \
+ GDAPI_FUNC(godot_string_xml_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_xml_escape_with_quotes, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_xml_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_percent_decode, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_percent_encode, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_float, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_hex_number, godot_bool, const godot_string *p_self, godot_bool p_with_prefix) \
+ GDAPI_FUNC(godot_string_is_valid_html_color, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_identifier, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_integer, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_ip_address, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_string_destroy, godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_object_destroy, godot_object *p_o) \
+ GDAPI_FUNC(godot_global_get_singleton, godot_object *, char *p_name) \
+ GDAPI_FUNC(godot_get_stack_bottom, void *) \
+ GDAPI_FUNC(godot_method_bind_get_method, godot_method_bind *, const char *p_classname, const char *p_methodname) \
+ GDAPI_FUNC_VOID(godot_method_bind_ptrcall, godot_method_bind *p_method_bind, godot_object *p_instance, const void **p_args, void *p_ret) \
+ GDAPI_FUNC(godot_method_bind_call, godot_variant, godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error) \
+ GDAPI_FUNC(godot_get_class_constructor, godot_class_constructor, const char *p_classname) \
+ GDAPI_FUNC(godot_get_global_constants, godot_dictionary) \
+ GDAPI_FUNC(godot_alloc, void *, int p_bytes) \
+ GDAPI_FUNC(godot_realloc, void *, void *p_ptr, int p_bytes) \
+ GDAPI_FUNC_VOID(godot_free, void *p_ptr) \
+ GDAPI_FUNC_VOID(godot_print_error, const char *p_description, const char *p_function, const char *p_file, int p_line) \
+ GDAPI_FUNC_VOID(godot_print_warning, const char *p_description, const char *p_function, const char *p_file, int p_line) \
+ GDAPI_FUNC_VOID(godot_print, const godot_string *p_message) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_tool_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_method, void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_property, void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_signal, void *p_gdnative_handle, const char *p_name, const godot_signal *p_signal) \
+ GDAPI_FUNC(godot_nativescript_get_userdata, void *, godot_object *p_instance)
+
+#define GDAPI_FUNC(name, ret_type, ...) \
+ ret_type (*name)(__VA_ARGS__);
+#define GDAPI_FUNC_VOID(name, ...) \
+ void (*name)(__VA_ARGS__);
+
+typedef struct godot_gdnative_api_struct {
+ GODOT_GDNATIVE_API_FUNCTIONS
+} godot_gdnative_api_struct;
+
+#undef GDAPI_FUNC
+#undef GDAPI_FUNC_VOID
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GODOT_GDNATIVE_API_STRUCT_H
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index d809109987..997c342045 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -43,7 +43,7 @@
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
-
+#include "gd_native_library_editor.h"
// Class used to discover singleton gdnative files
void actual_discoverer_handler();
@@ -115,7 +115,12 @@ void actual_discoverer_handler() {
GDNativeSingletonDiscover *discoverer = NULL;
-void discoverer_callback() {
+static void editor_init_callback() {
+
+ GDNativeLibraryEditor *library_editor = memnew(GDNativeLibraryEditor);
+ library_editor->set_name(TTR("GDNative"));
+ ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(library_editor);
+
discoverer = memnew(GDNativeSingletonDiscover);
EditorFileSystem::get_singleton()->connect("filesystem_changed", discoverer, "get_class");
}
@@ -184,7 +189,7 @@ void register_gdnative_types() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- EditorNode::add_init_callback(discoverer_callback);
+ EditorNode::add_init_callback(editor_init_callback);
}
#endif
@@ -248,7 +253,7 @@ void unregister_gdnative_types() {
memdelete(GDNativeCallRegistry::singleton);
#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint() && discoverer != NULL) {
memdelete(discoverer);
}
#endif
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 70e7da5748..bc51b84047 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -866,7 +866,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
MethodBind *mb = ClassDB::get_method(base_type, getter);
if (mb) {
PropertyInfo rt = mb->get_return_info();
- if (rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM && t == Variant::INT) {
+ if ((rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM) && t == Variant::INT) {
r_type.enumeration = rt.class_name;
} else if (t == Variant::OBJECT) {
@@ -1903,11 +1903,11 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
arghint += ", ";
else
arghint += " ";
- if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) {
+ if (i == p_argidx || ((mi.flags & METHOD_FLAG_VARARG) && i > p_argidx)) {
arghint += String::chr(0xFFFF);
}
arghint += _get_visual_datatype(mi.arguments[i]) + " " + mi.arguments[i].name;
- if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) {
+ if (i == p_argidx || ((mi.flags & METHOD_FLAG_VARARG) && i > p_argidx)) {
arghint += String::chr(0xFFFF);
}
}
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index f0cfdd6258..34d01c6beb 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -1177,20 +1177,28 @@ void GDFunctions::call(Function p_func, const Variant **p_args, int p_arg_count,
VALIDATE_ARG_COUNT(1);
switch (p_args[0]->get_type()) {
+ case Variant::STRING: {
+
+ String d = *p_args[0];
+ r_ret = d.length();
+ } break;
case Variant::DICTIONARY: {
+
Dictionary d = *p_args[0];
r_ret = d.size();
} break;
case Variant::ARRAY: {
+
Array d = *p_args[0];
r_ret = d.size();
} break;
case Variant::POOL_BYTE_ARRAY: {
+
PoolVector<uint8_t> d = *p_args[0];
r_ret = d.size();
-
} break;
case Variant::POOL_INT_ARRAY: {
+
PoolVector<int> d = *p_args[0];
r_ret = d.size();
} break;
@@ -1200,14 +1208,14 @@ void GDFunctions::call(Function p_func, const Variant **p_args, int p_arg_count,
r_ret = d.size();
} break;
case Variant::POOL_STRING_ARRAY: {
+
PoolVector<String> d = *p_args[0];
r_ret = d.size();
-
} break;
case Variant::POOL_VECTOR2_ARRAY: {
+
PoolVector<Vector2> d = *p_args[0];
r_ret = d.size();
-
} break;
case Variant::POOL_VECTOR3_ARRAY: {
@@ -1412,12 +1420,12 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case MATH_ISNAN: {
MethodInfo mi("is_nan", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISINF: {
MethodInfo mi("is_inf", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_EASE: {
diff --git a/modules/gridmap/config.py b/modules/gridmap/config.py
index 5698a37295..b3dbb9f46a 100644
--- a/modules/gridmap/config.py
+++ b/modules/gridmap/config.py
@@ -6,3 +6,9 @@ def can_build(platform):
def configure(env):
pass
+
+def get_doc_classes():
+ return ["GridMap"]
+
+def get_doc_path():
+ return "doc_classes"
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
new file mode 100644
index 0000000000..3676570ec1
--- /dev/null
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GridMap" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_item" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_item_orientation" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_cell_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_center_x" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_center_y" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_center_z" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_meshes">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_octant_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_theme" qualifiers="const">
+ <return type="MeshLibrary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="resource_changed">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <argument index="3" name="item" type="int">
+ </argument>
+ <argument index="4" name="orientation" type="int" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_cell_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_center_x">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_center_y">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_center_z">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_clip">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <argument index="1" name="clipabove" type="bool" default="true">
+ </argument>
+ <argument index="2" name="floor" type="int" default="0">
+ </argument>
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_octant_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_theme">
+ <return type="void">
+ </return>
+ <argument index="0" name="theme" type="MeshLibrary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="INVALID_CELL_ITEM" value="-1" enum="">
+ </constant>
+ </constants>
+</class>
diff --git a/modules/gridmap/doc_classes/README.md b/modules/gridmap/doc_classes/README.md
new file mode 100644
index 0000000000..b1ec9058c8
--- /dev/null
+++ b/modules/gridmap/doc_classes/README.md
@@ -0,0 +1 @@
+Doc classes will appear here when generating \ No newline at end of file
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 9989785c70..90ee164b6f 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -74,15 +74,11 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
uint32_t mipmaps = f->get_32();
uint32_t flags = f->get_32();
uint32_t surfsize = f->get_32();
- uint32_t bpp = f->get_32();
- uint32_t rmask = f->get_32();
- uint32_t gmask = f->get_32();
- uint32_t bmask = f->get_32();
- uint32_t amask = f->get_32();
+ f->seek(f->get_pos() + 20); // bpp, rmask, gmask, bmask, amask
uint8_t pvrid[5] = { 0, 0, 0, 0, 0 };
f->get_buffer(pvrid, 4);
ERR_FAIL_COND_V(String((char *)pvrid) != "PVR!", RES());
- uint32_t surfcount = f->get_32();
+ f->get_32(); // surfcount
/*
print_line("height: "+itos(height));
diff --git a/modules/recast/SCsub b/modules/recast/SCsub
new file mode 100644
index 0000000000..349bd22efb
--- /dev/null
+++ b/modules/recast/SCsub
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+
+Import('env')
+
+# Not building in a separate env as core needs it
+
+# Thirdparty source files
+if (env['builtin_recast'] != 'no'):
+ thirdparty_dir = "#thirdparty/recastnavigation/Recast/"
+ thirdparty_sources = [
+ "Source/Recast.cpp",
+ "Source/RecastAlloc.cpp",
+ "Source/RecastArea.cpp",
+ "Source/RecastAssert.cpp",
+ "Source/RecastContour.cpp",
+ "Source/RecastFilter.cpp",
+ "Source/RecastLayers.cpp",
+ "Source/RecastMesh.cpp",
+ "Source/RecastMeshDetail.cpp",
+ "Source/RecastRasterization.cpp",
+ "Source/RecastRegion.cpp",
+ ]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+ env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/Include"])
+
+ # also requires recast headers
+ if (env['builtin_recast'] != 'no'):
+ env.Append(CPPPATH=["#thirdparty/recastnavigation/Recast"])
+
+ lib = env.Library("recast_builtin", thirdparty_sources)
+ env.Append(LIBS=[lib])
+
+# Godot source files
+env.add_source_files(env.modules_sources, "*.cpp")
+env.Append(CCFLAGS=['-DRECAST_ENABLED'])
+
+Export('env')
diff --git a/modules/recast/config.py b/modules/recast/config.py
new file mode 100644
index 0000000000..fb920482f5
--- /dev/null
+++ b/modules/recast/config.py
@@ -0,0 +1,7 @@
+
+def can_build(platform):
+ return True
+
+
+def configure(env):
+ pass
diff --git a/modules/recast/register_types.cpp b/modules/recast/register_types.cpp
new file mode 100644
index 0000000000..654ceec373
--- /dev/null
+++ b/modules/recast/register_types.cpp
@@ -0,0 +1,34 @@
+/*************************************************************************/
+/* register_types.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "register_types.h"
+
+void register_recast_types() {}
+void unregister_recast_types() {}
diff --git a/modules/recast/register_types.h b/modules/recast/register_types.h
new file mode 100644
index 0000000000..90587bc11f
--- /dev/null
+++ b/modules/recast/register_types.h
@@ -0,0 +1,32 @@
+/*************************************************************************/
+/* register_types.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+void register_recast_types();
+void unregister_recast_types();
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index 0d97bcce54..bfa9c84042 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -87,8 +87,8 @@ public:
Error compile(const String &p_pattern);
void _init(const String &p_pattern = "");
- Ref<RegExMatch> search(const String &p_subject, int offset = 0, int end = -1) const;
- String sub(const String &p_subject, const String &p_replacement, bool p_all = false, int p_start = 0, int p_end = -1) const;
+ Ref<RegExMatch> search(const String &p_subject, int p_offset = 0, int p_end = -1) const;
+ String sub(const String &p_subject, const String &p_replacement, bool p_all = false, int p_offset = 0, int p_end = -1) const;
bool is_valid() const;
String get_pattern() const;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index df427907f8..9457fbfaf6 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -45,6 +45,12 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
while (todo && active) {
int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, (float *)p_buffer, todo * 2);
+ if (vorbis_stream->channels == 1 && mixed > 0) {
+ //mix mono to stereo
+ for (int i = 0; i < mixed; i++) {
+ p_buffer[i].r = p_buffer[i].l;
+ }
+ }
todo -= mixed;
frames_mixed += mixed;
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index f5c379d32e..e27452354b 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -63,33 +63,39 @@ inline void change_nsvg_paint_color(NSVGpaint *p_paint, const uint32_t p_old, co
}
}
}
-void ImageLoaderSVG::_convert_colors(NSVGimage *p_svg_image, const Dictionary p_colors) {
- List<uint32_t> replace_colors_i;
- List<uint32_t> new_colors_i;
- List<Color> replace_colors;
- List<Color> new_colors;
-
- for (int i = 0; i < p_colors.keys().size(); i++) {
- Variant r_c = p_colors.keys()[i];
- Variant n_c = p_colors[p_colors.keys()[i]];
- if (r_c.get_type() == Variant::COLOR && n_c.get_type() == Variant::COLOR) {
- Color replace_color = r_c;
- Color new_color = n_c;
- replace_colors_i.push_back(replace_color.to_ABGR32());
- new_colors_i.push_back(new_color.to_ABGR32());
- }
- }
+
+void ImageLoaderSVG::_convert_colors(NSVGimage *p_svg_image) {
for (NSVGshape *shape = p_svg_image->shapes; shape != NULL; shape = shape->next) {
- for (int i = 0; i < replace_colors_i.size(); i++) {
- change_nsvg_paint_color(&(shape->stroke), replace_colors_i[i], new_colors_i[i]);
- change_nsvg_paint_color(&(shape->fill), replace_colors_i[i], new_colors_i[i]);
+ for (int i = 0; i < replace_colors.old_colors.size(); i++) {
+ change_nsvg_paint_color(&(shape->stroke), replace_colors.old_colors[i], replace_colors.new_colors[i]);
+ change_nsvg_paint_color(&(shape->fill), replace_colors.old_colors[i], replace_colors.new_colors[i]);
+ }
+ }
+}
+
+void ImageLoaderSVG::set_convert_colors(Dictionary *p_replace_color) {
+
+ if (p_replace_color) {
+ Dictionary replace_color = *p_replace_color;
+ for (int i = 0; i < replace_color.keys().size(); i++) {
+ Variant o_c = replace_color.keys()[i];
+ Variant n_c = replace_color[replace_color.keys()[i]];
+ if (o_c.get_type() == Variant::COLOR && n_c.get_type() == Variant::COLOR) {
+ Color old_color = o_c;
+ Color new_color = n_c;
+ replace_colors.old_colors.push_back(old_color.to_abgr32());
+ replace_colors.new_colors.push_back(new_color.to_abgr32());
+ }
}
+ } else {
+ replace_colors.old_colors.clear();
+ replace_colors.new_colors.clear();
}
}
-Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, const Dictionary *p_replace_colors) {
+Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors) {
NSVGimage *svg_image;
PoolVector<uint8_t>::Read src_r = p_data->read();
svg_image = nsvgParse((char *)src_r.ptr(), "px", 96);
@@ -97,10 +103,9 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
ERR_PRINT("SVG Corrupted");
return ERR_FILE_CORRUPT;
}
+ if (convert_colors)
+ _convert_colors(svg_image);
- if (p_replace_colors != NULL) {
- _convert_colors(svg_image, *p_replace_colors);
- }
float upscale = upsample ? 2.0 : 1.0;
int w = (int)(svg_image->width * p_scale * upscale);
@@ -123,15 +128,15 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
return OK;
}
-Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *svg_str, float p_scale, bool upsample, const Dictionary *p_replace_colors) {
+Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors) {
- size_t str_len = strlen(svg_str);
+ size_t str_len = strlen(p_svg_str);
PoolVector<uint8_t> src_data;
src_data.resize(str_len + 1);
PoolVector<uint8_t>::Write src_w = src_data.write();
- memcpy(src_w.ptr(), svg_str, str_len + 1);
+ memcpy(src_w.ptr(), p_svg_str, str_len + 1);
- return _create_image(p_image, &src_data, p_scale, upsample, p_replace_colors);
+ return _create_image(p_image, &src_data, p_scale, upsample, convert_colors);
}
Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
@@ -154,3 +159,5 @@ void ImageLoaderSVG::get_recognized_extensions(List<String> *p_extensions) const
ImageLoaderSVG::ImageLoaderSVG() {
}
+
+ImageLoaderSVG::ReplaceColors ImageLoaderSVG::replace_colors;
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h
index f692b1b28c..cf44cd8c50 100644
--- a/modules/svg/image_loader_svg.h
+++ b/modules/svg/image_loader_svg.h
@@ -52,13 +52,17 @@ public:
};
class ImageLoaderSVG : public ImageFormatLoader {
-
+ static struct ReplaceColors {
+ List<uint32_t> old_colors;
+ List<uint32_t> new_colors;
+ } replace_colors;
static SVGRasterizer rasterizer;
- static void _convert_colors(NSVGimage *p_svg_imge, const Dictionary p_colors);
- static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL);
+ static void _convert_colors(NSVGimage *p_svg_image);
+ static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false);
public:
- static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL);
+ static void set_convert_colors(Dictionary *p_replace_color = NULL);
+ static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors = false);
virtual Error load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 2a24f8d4d1..02b994f8db 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -414,7 +414,8 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
bool buffer_full = false;
/* if there's pending, decoded audio, grab it */
- if ((ret = vorbis_synthesis_pcmout(&vd, &pcm)) > 0) {
+ ret = vorbis_synthesis_pcmout(&vd, &pcm);
+ if (ret > 0) {
const int AUXBUF_LEN = 4096;
int to_read = ret;
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 2c8796820e..972be5f5a4 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1175,6 +1175,65 @@ void VisualScriptBuiltinFunc::_bind_methods() {
cc += func_name[i];
}
ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, cc), "set_func", "get_func");
+
+ BIND_ENUM_CONSTANT(MATH_SIN);
+ BIND_ENUM_CONSTANT(MATH_COS);
+ BIND_ENUM_CONSTANT(MATH_TAN);
+ BIND_ENUM_CONSTANT(MATH_SINH);
+ BIND_ENUM_CONSTANT(MATH_COSH);
+ BIND_ENUM_CONSTANT(MATH_TANH);
+ BIND_ENUM_CONSTANT(MATH_ASIN);
+ BIND_ENUM_CONSTANT(MATH_ACOS);
+ BIND_ENUM_CONSTANT(MATH_ATAN);
+ BIND_ENUM_CONSTANT(MATH_ATAN2);
+ BIND_ENUM_CONSTANT(MATH_SQRT);
+ BIND_ENUM_CONSTANT(MATH_FMOD);
+ BIND_ENUM_CONSTANT(MATH_FPOSMOD);
+ BIND_ENUM_CONSTANT(MATH_FLOOR);
+ BIND_ENUM_CONSTANT(MATH_CEIL);
+ BIND_ENUM_CONSTANT(MATH_ROUND);
+ BIND_ENUM_CONSTANT(MATH_ABS);
+ BIND_ENUM_CONSTANT(MATH_SIGN);
+ BIND_ENUM_CONSTANT(MATH_POW);
+ BIND_ENUM_CONSTANT(MATH_LOG);
+ BIND_ENUM_CONSTANT(MATH_EXP);
+ BIND_ENUM_CONSTANT(MATH_ISNAN);
+ BIND_ENUM_CONSTANT(MATH_ISINF);
+ BIND_ENUM_CONSTANT(MATH_EASE);
+ BIND_ENUM_CONSTANT(MATH_DECIMALS);
+ BIND_ENUM_CONSTANT(MATH_STEPIFY);
+ BIND_ENUM_CONSTANT(MATH_LERP);
+ BIND_ENUM_CONSTANT(MATH_DECTIME);
+ BIND_ENUM_CONSTANT(MATH_RANDOMIZE);
+ BIND_ENUM_CONSTANT(MATH_RAND);
+ BIND_ENUM_CONSTANT(MATH_RANDF);
+ BIND_ENUM_CONSTANT(MATH_RANDOM);
+ BIND_ENUM_CONSTANT(MATH_SEED);
+ BIND_ENUM_CONSTANT(MATH_RANDSEED);
+ BIND_ENUM_CONSTANT(MATH_DEG2RAD);
+ BIND_ENUM_CONSTANT(MATH_RAD2DEG);
+ BIND_ENUM_CONSTANT(MATH_LINEAR2DB);
+ BIND_ENUM_CONSTANT(MATH_DB2LINEAR);
+ BIND_ENUM_CONSTANT(LOGIC_MAX);
+ BIND_ENUM_CONSTANT(LOGIC_MIN);
+ BIND_ENUM_CONSTANT(LOGIC_CLAMP);
+ BIND_ENUM_CONSTANT(LOGIC_NEAREST_PO2);
+ BIND_ENUM_CONSTANT(OBJ_WEAKREF);
+ BIND_ENUM_CONSTANT(FUNC_FUNCREF);
+ BIND_ENUM_CONSTANT(TYPE_CONVERT);
+ BIND_ENUM_CONSTANT(TYPE_OF);
+ BIND_ENUM_CONSTANT(TYPE_EXISTS);
+ BIND_ENUM_CONSTANT(TEXT_CHAR);
+ BIND_ENUM_CONSTANT(TEXT_STR);
+ BIND_ENUM_CONSTANT(TEXT_PRINT);
+ BIND_ENUM_CONSTANT(TEXT_PRINTERR);
+ BIND_ENUM_CONSTANT(TEXT_PRINTRAW);
+ BIND_ENUM_CONSTANT(VAR_TO_STR);
+ BIND_ENUM_CONSTANT(STR_TO_VAR);
+ BIND_ENUM_CONSTANT(VAR_TO_BYTES);
+ BIND_ENUM_CONSTANT(BYTES_TO_VAR);
+ BIND_ENUM_CONSTANT(COLORN);
+ BIND_ENUM_CONSTANT(FUNC_MAX);
}
VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 37bd730d08..671a507377 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -491,9 +491,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_overlay(GraphNode::OVERLAY_BREAKPOINT);
}
- if (EditorSettings::get_singleton()->has("editors/visual_script/color_" + node->get_category())) {
- Color c = EditorSettings::get_singleton()->get("editors/visual_script/color_" + node->get_category());
- gnode->set_self_modulate(c);
+ if (node_styles.has(node->get_category())) {
+ gnode->add_style_override("frame", node_styles[node->get_category()]);
}
gnode->set_meta("__vnode", node);
@@ -506,7 +505,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_show_close_button(true);
}
- if (Object::cast_to<VisualScriptExpression>(*node)) {
+ if (Object::cast_to<VisualScriptExpression>(node.ptr())) {
LineEdit *line_edit = memnew(LineEdit);
line_edit->set_text(node->get_text());
@@ -520,7 +519,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_child(text);
}
- if (Object::cast_to<VisualScriptExpression>(*node)) {
+ if (Object::cast_to<VisualScriptComment>(node.ptr())) {
Ref<VisualScriptComment> vsc = node;
gnode->set_comment(true);
gnode->set_resizable(true);
@@ -926,48 +925,6 @@ void VisualScriptEditor::_member_edited() {
}
}
-void VisualScriptEditor::_override_pressed(int p_id) {
-
- //override a virtual function or method from base type
-
- ERR_FAIL_COND(!virtuals_in_menu.has(p_id));
-
- VirtualInMenu vim = virtuals_in_menu[p_id];
-
- String name = _validate_name(vim.name);
- selected = name;
- edited_func = selected;
- Ref<VisualScriptFunction> func_node;
- func_node.instance();
- func_node->set_name(vim.name);
-
- undo_redo->create_action(TTR("Add Function"));
- undo_redo->add_do_method(script.ptr(), "add_function", name);
- for (int i = 0; i < vim.args.size(); i++) {
- func_node->add_argument(vim.args[i].first, vim.args[i].second);
- }
-
- undo_redo->add_do_method(script.ptr(), "add_node", name, script->get_available_id(), func_node);
- if (vim.ret != Variant::NIL || vim.ret_variant) {
- Ref<VisualScriptReturn> ret_node;
- ret_node.instance();
- ret_node->set_return_type(vim.ret);
- ret_node->set_enable_return_value(true);
- ret_node->set_name(vim.name);
- undo_redo->add_do_method(script.ptr(), "add_node", name, script->get_available_id() + 1, ret_node, Vector2(500, 0));
- }
-
- undo_redo->add_undo_method(script.ptr(), "remove_function", name);
- undo_redo->add_do_method(this, "_update_members");
- undo_redo->add_undo_method(this, "_update_members");
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
-
- undo_redo->commit_action();
-
- _update_graph();
-}
-
void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_button) {
TreeItem *ti = Object::cast_to<TreeItem>(p_item);
@@ -980,64 +937,9 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
//add function, this one uses menu
if (p_button == 1) {
- new_function_menu->clear();
- new_function_menu->set_size(Size2(0, 0));
- int idx = 0;
-
- virtuals_in_menu.clear();
-
- List<MethodInfo> mi;
- ClassDB::get_method_list(script->get_instance_base_type(), &mi);
- for (List<MethodInfo>::Element *E = mi.front(); E; E = E->next()) {
- MethodInfo mi = E->get();
- if (mi.flags & METHOD_FLAG_VIRTUAL) {
-
- VirtualInMenu vim;
- vim.name = mi.name;
- vim.ret = mi.return_val.type;
- if (mi.return_val.name != String())
- vim.ret_variant = true;
- else
- vim.ret_variant = false;
-
- String desc;
-
- if (mi.return_val.type == Variant::NIL)
- desc = "var";
- else
- desc = Variant::get_type_name(mi.return_val.type);
- desc += " " + mi.name + " ( ";
-
- for (int i = 0; i < mi.arguments.size(); i++) {
-
- if (i > 0)
- desc += ", ";
-
- if (mi.arguments[i].type == Variant::NIL)
- desc += "var ";
- else
- desc += Variant::get_type_name(mi.arguments[i].type) + " ";
-
- desc += mi.arguments[i].name;
-
- Pair<Variant::Type, String> p;
- p.first = mi.arguments[i].type;
- p.second = mi.arguments[i].name;
- vim.args.push_back(p);
- }
- desc += " )";
+ new_virtual_method_select->select_method_from_base_type(script->get_instance_base_type(), String(), true);
- virtuals_in_menu[idx] = vim;
-
- new_function_menu->add_item(desc, idx);
- idx++;
- }
- }
-
- Rect2 pos = members->get_item_rect(ti);
- new_function_menu->set_position(members->get_global_position() + pos.position + Vector2(0, pos.size.y));
- new_function_menu->popup();
return;
} else if (p_button == 0) {
@@ -1495,415 +1397,424 @@ static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const
void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
- if (p_from == graph) {
+ if (p_from != graph) {
+ return;
+ }
- Dictionary d = p_data;
- if (d.has("type") && String(d["type"]) == "visual_script_node_drag") {
+ Dictionary d = p_data;
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (!d.has("type")) {
+ return;
+ }
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ if (String(d["type"]) == "visual_script_node_drag") {
+ if (!d.has("node_type") || String(d["node_type"]) == "Null") {
+ return;
+ }
- ofs /= EDSCALE;
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
- Ref<VisualScriptNode> vnode = VisualScriptLanguage::singleton->create_node_from_name(d["node_type"]);
- int new_id = script->get_available_id();
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- undo_redo->create_action(TTR("Add Node"));
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ ofs /= EDSCALE;
- Node *node = graph->get_node(itos(new_id));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Ref<VisualScriptNode> vnode = VisualScriptLanguage::singleton->create_node_from_name(d["node_type"]);
+ int new_id = script->get_available_id();
+
+ undo_redo->create_action(TTR("Add Node"));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
+
+ Node *node = graph->get_node(itos(new_id));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
+ }
- if (d.has("type") && String(d["type"]) == "visual_script_variable_drag") {
+ if (String(d["type"]) == "visual_script_variable_drag") {
#ifdef OSX_ENABLED
- bool use_set = Input::get_singleton()->is_key_pressed(KEY_META);
+ bool use_set = Input::get_singleton()->is_key_pressed(KEY_META);
#else
- bool use_set = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+ bool use_set = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
#endif
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- ofs /= EDSCALE;
+ ofs /= EDSCALE;
- Ref<VisualScriptNode> vnode;
- if (use_set) {
- Ref<VisualScriptVariableSet> vnodes;
- vnodes.instance();
- vnodes->set_variable(d["variable"]);
- vnode = vnodes;
- } else {
+ Ref<VisualScriptNode> vnode;
+ if (use_set) {
+ Ref<VisualScriptVariableSet> vnodes;
+ vnodes.instance();
+ vnodes->set_variable(d["variable"]);
+ vnode = vnodes;
+ } else {
- Ref<VisualScriptVariableGet> vnodeg;
- vnodeg.instance();
- vnodeg->set_variable(d["variable"]);
- vnode = vnodeg;
- }
+ Ref<VisualScriptVariableGet> vnodeg;
+ vnodeg.instance();
+ vnodeg->set_variable(d["variable"]);
+ vnode = vnodeg;
+ }
- int new_id = script->get_available_id();
+ int new_id = script->get_available_id();
- undo_redo->create_action(TTR("Add Node"));
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Add Node"));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
- Node *node = graph->get_node(itos(new_id));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Node *node = graph->get_node(itos(new_id));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
+ }
- if (d.has("type") && String(d["type"]) == "visual_script_function_drag") {
+ if (String(d["type"]) == "visual_script_function_drag") {
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- ofs /= EDSCALE;
+ ofs /= EDSCALE;
- Ref<VisualScriptFunctionCall> vnode;
- vnode.instance();
- vnode->set_call_mode(VisualScriptFunctionCall::CALL_MODE_SELF);
+ Ref<VisualScriptFunctionCall> vnode;
+ vnode.instance();
+ vnode->set_call_mode(VisualScriptFunctionCall::CALL_MODE_SELF);
- int new_id = script->get_available_id();
+ int new_id = script->get_available_id();
- undo_redo->create_action(TTR("Add Node"));
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
- undo_redo->add_do_method(vnode.ptr(), "set_base_type", script->get_instance_base_type());
- undo_redo->add_do_method(vnode.ptr(), "set_function", d["function"]);
+ undo_redo->create_action(TTR("Add Node"));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
+ undo_redo->add_do_method(vnode.ptr(), "set_base_type", script->get_instance_base_type());
+ undo_redo->add_do_method(vnode.ptr(), "set_function", d["function"]);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
- Node *node = graph->get_node(itos(new_id));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Node *node = graph->get_node(itos(new_id));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
+ }
- if (d.has("type") && String(d["type"]) == "visual_script_signal_drag") {
+ if (String(d["type"]) == "visual_script_signal_drag") {
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- ofs /= EDSCALE;
+ ofs /= EDSCALE;
- Ref<VisualScriptEmitSignal> vnode;
- vnode.instance();
- vnode->set_signal(d["signal"]);
+ Ref<VisualScriptEmitSignal> vnode;
+ vnode.instance();
+ vnode->set_signal(d["signal"]);
- int new_id = script->get_available_id();
+ int new_id = script->get_available_id();
- undo_redo->create_action(TTR("Add Node"));
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Add Node"));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, vnode, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
- Node *node = graph->get_node(itos(new_id));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Node *node = graph->get_node(itos(new_id));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
+ }
- if (d.has("type") && String(d["type"]) == "resource") {
+ if (String(d["type"]) == "resource") {
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- ofs /= EDSCALE;
+ ofs /= EDSCALE;
- Ref<VisualScriptPreload> prnode;
- prnode.instance();
- prnode->set_preload(d["resource"]);
+ Ref<VisualScriptPreload> prnode;
+ prnode.instance();
+ prnode->set_preload(d["resource"]);
- int new_id = script->get_available_id();
+ int new_id = script->get_available_id();
- undo_redo->create_action(TTR("Add Preload Node"));
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, prnode, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Add Preload Node"));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, prnode, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
- Node *node = graph->get_node(itos(new_id));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Node *node = graph->get_node(itos(new_id));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
+ }
- if (d.has("type") && String(d["type"]) == "files") {
-
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ if (String(d["type"]) == "files") {
- ofs /= EDSCALE;
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- Array files = d["files"];
+ ofs /= EDSCALE;
- List<int> new_ids;
- int new_id = script->get_available_id();
+ Array files = d["files"];
- if (files.size()) {
- undo_redo->create_action(TTR("Add Preload Node"));
+ List<int> new_ids;
+ int new_id = script->get_available_id();
- for (int i = 0; i < files.size(); i++) {
+ if (files.size()) {
+ undo_redo->create_action(TTR("Add Preload Node"));
- Ref<Resource> res = ResourceLoader::load(files[i]);
- if (!res.is_valid())
- continue;
+ for (int i = 0; i < files.size(); i++) {
- Ref<VisualScriptPreload> prnode;
- prnode.instance();
- prnode->set_preload(res);
+ Ref<Resource> res = ResourceLoader::load(files[i]);
+ if (!res.is_valid())
+ continue;
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, prnode, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
- new_ids.push_back(new_id);
- new_id++;
- ofs += Vector2(20, 20) * EDSCALE;
- }
+ Ref<VisualScriptPreload> prnode;
+ prnode.instance();
+ prnode->set_preload(res);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, prnode, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
+ new_ids.push_back(new_id);
+ new_id++;
+ ofs += Vector2(20, 20) * EDSCALE;
}
- for (List<int>::Element *E = new_ids.front(); E; E = E->next()) {
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
+ }
+
+ for (List<int>::Element *E = new_ids.front(); E; E = E->next()) {
- Node *node = graph->get_node(itos(E->get()));
- if (node) {
- graph->set_selected(node);
- _node_selected(node);
- }
+ Node *node = graph->get_node(itos(E->get()));
+ if (node) {
+ graph->set_selected(node);
+ _node_selected(node);
}
}
+ }
- if (d.has("type") && String(d["type"]) == "nodes") {
+ if (String(d["type"]) == "nodes") {
- Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
+ Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
- if (!sn) {
- EditorNode::get_singleton()->show_warning("Can't drop nodes because script '" + get_name() + "' is not used in this scene.");
- return;
- }
+ if (!sn) {
+ EditorNode::get_singleton()->show_warning("Can't drop nodes because script '" + get_name() + "' is not used in this scene.");
+ return;
+ }
#ifdef OSX_ENABLED
- bool use_node = Input::get_singleton()->is_key_pressed(KEY_META);
+ bool use_node = Input::get_singleton()->is_key_pressed(KEY_META);
#else
- bool use_node = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+ bool use_node = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
#endif
- Array nodes = d["nodes"];
-
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ Array nodes = d["nodes"];
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
- ofs /= EDSCALE;
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
- undo_redo->create_action(TTR("Add Node(s) From Tree"));
- int base_id = script->get_available_id();
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
+ ofs /= EDSCALE;
- if (nodes.size() > 1) {
- use_node = true;
- }
+ undo_redo->create_action(TTR("Add Node(s) From Tree"));
+ int base_id = script->get_available_id();
- for (int i = 0; i < nodes.size(); i++) {
+ if (nodes.size() > 1) {
+ use_node = true;
+ }
- NodePath np = nodes[i];
- Node *node = get_node(np);
- if (!node) {
- continue;
- }
+ for (int i = 0; i < nodes.size(); i++) {
- Ref<VisualScriptNode> n;
+ NodePath np = nodes[i];
+ Node *node = get_node(np);
+ if (!node) {
+ continue;
+ }
- if (use_node) {
- Ref<VisualScriptSceneNode> scene_node;
- scene_node.instance();
- scene_node->set_node_path(sn->get_path_to(node));
- n = scene_node;
+ Ref<VisualScriptNode> n;
- } else {
- Ref<VisualScriptFunctionCall> call;
- call.instance();
- call->set_call_mode(VisualScriptFunctionCall::CALL_MODE_NODE_PATH);
- call->set_base_path(sn->get_path_to(node));
- call->set_base_type(node->get_class());
- n = call;
-
- method_select->select_method_from_instance(node);
- selecting_method_id = base_id;
- }
+ if (use_node) {
+ Ref<VisualScriptSceneNode> scene_node;
+ scene_node.instance();
+ scene_node->set_node_path(sn->get_path_to(node));
+ n = scene_node;
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, n, ofs);
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
+ } else {
+ Ref<VisualScriptFunctionCall> call;
+ call.instance();
+ call->set_call_mode(VisualScriptFunctionCall::CALL_MODE_NODE_PATH);
+ call->set_base_path(sn->get_path_to(node));
+ call->set_base_type(node->get_class());
+ n = call;
- base_id++;
- ofs += Vector2(25, 25);
+ method_select->select_method_from_instance(node);
+ selecting_method_id = base_id;
}
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, n, ofs);
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
+
+ base_id++;
+ ofs += Vector2(25, 25);
}
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
+ }
- if (d.has("type") && String(d["type"]) == "obj_property") {
+ if (String(d["type"]) == "obj_property") {
- Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
+ Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
- if (!sn && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
- EditorNode::get_singleton()->show_warning("Can't drop properties because script '" + get_name() + "' is not used in this scene.\nDrop holding 'Shift' to just copy the signature.");
- return;
- }
+ if (!sn && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
+ EditorNode::get_singleton()->show_warning("Can't drop properties because script '" + get_name() + "' is not used in this scene.\nDrop holding 'Shift' to just copy the signature.");
+ return;
+ }
- Object *obj = d["object"];
+ Object *obj = d["object"];
- if (!obj)
- return;
+ if (!obj)
+ return;
- Node *node = Object::cast_to<Node>(obj);
- Vector2 ofs = graph->get_scroll_ofs() + p_point;
+ Node *node = Object::cast_to<Node>(obj);
+ Vector2 ofs = graph->get_scroll_ofs() + p_point;
- if (graph->is_using_snap()) {
- int snap = graph->get_snap();
- ofs = ofs.snapped(Vector2(snap, snap));
- }
+ if (graph->is_using_snap()) {
+ int snap = graph->get_snap();
+ ofs = ofs.snapped(Vector2(snap, snap));
+ }
- ofs /= EDSCALE;
+ ofs /= EDSCALE;
#ifdef OSX_ENABLED
- bool use_get = Input::get_singleton()->is_key_pressed(KEY_META);
+ bool use_get = Input::get_singleton()->is_key_pressed(KEY_META);
#else
- bool use_get = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+ bool use_get = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
#endif
- if (!node || Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
+ if (!node || Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
- if (use_get)
- undo_redo->create_action(TTR("Add Getter Property"));
- else
- undo_redo->create_action(TTR("Add Setter Property"));
+ if (use_get)
+ undo_redo->create_action(TTR("Add Getter Property"));
+ else
+ undo_redo->create_action(TTR("Add Setter Property"));
- int base_id = script->get_available_id();
+ int base_id = script->get_available_id();
- Ref<VisualScriptNode> vnode;
+ Ref<VisualScriptNode> vnode;
- if (!use_get) {
+ if (!use_get) {
- Ref<VisualScriptPropertySet> pset;
- pset.instance();
- pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE);
- pset->set_base_type(obj->get_class());
- /*if (use_value) {
+ Ref<VisualScriptPropertySet> pset;
+ pset.instance();
+ pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE);
+ pset->set_base_type(obj->get_class());
+ /*if (use_value) {
pset->set_use_builtin_value(true);
pset->set_builtin_value(d["value"]);
}*/
- vnode = pset;
- } else {
-
- Ref<VisualScriptPropertyGet> pget;
- pget.instance();
- pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE);
- pget->set_base_type(obj->get_class());
+ vnode = pset;
+ } else {
- vnode = pget;
- }
+ Ref<VisualScriptPropertyGet> pget;
+ pget.instance();
+ pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE);
+ pget->set_base_type(obj->get_class());
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, vnode, ofs);
- undo_redo->add_do_method(vnode.ptr(), "set_property", d["property"]);
- if (!use_get) {
- undo_redo->add_do_method(vnode.ptr(), "set_default_input_value", 0, d["value"]);
- }
+ vnode = pget;
+ }
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, vnode, ofs);
+ undo_redo->add_do_method(vnode.ptr(), "set_property", d["property"]);
+ if (!use_get) {
+ undo_redo->add_do_method(vnode.ptr(), "set_default_input_value", 0, d["value"]);
+ }
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
- } else {
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
- if (use_get)
- undo_redo->create_action(TTR("Add Getter Property"));
- else
- undo_redo->create_action(TTR("Add Setter Property"));
+ } else {
- int base_id = script->get_available_id();
+ if (use_get)
+ undo_redo->create_action(TTR("Add Getter Property"));
+ else
+ undo_redo->create_action(TTR("Add Setter Property"));
- Ref<VisualScriptNode> vnode;
+ int base_id = script->get_available_id();
- if (!use_get) {
+ Ref<VisualScriptNode> vnode;
- Ref<VisualScriptPropertySet> pset;
- pset.instance();
- if (sn == node) {
- pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_SELF);
- } else {
- pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_NODE_PATH);
- pset->set_base_path(sn->get_path_to(node));
- }
+ if (!use_get) {
- vnode = pset;
+ Ref<VisualScriptPropertySet> pset;
+ pset.instance();
+ if (sn == node) {
+ pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_SELF);
} else {
-
- Ref<VisualScriptPropertyGet> pget;
- pget.instance();
- if (sn == node) {
- pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_SELF);
- } else {
- pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_NODE_PATH);
- pget->set_base_path(sn->get_path_to(node));
- }
- vnode = pget;
+ pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_NODE_PATH);
+ pset->set_base_path(sn->get_path_to(node));
}
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, vnode, ofs);
- undo_redo->add_do_method(vnode.ptr(), "set_property", d["property"]);
- if (!use_get) {
- undo_redo->add_do_method(vnode.ptr(), "set_default_input_value", 0, d["value"]);
- }
- undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->commit_action();
+ vnode = pset;
+ } else {
+
+ Ref<VisualScriptPropertyGet> pget;
+ pget.instance();
+ if (sn == node) {
+ pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_SELF);
+ } else {
+ pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_NODE_PATH);
+ pget->set_base_path(sn->get_path_to(node));
+ }
+ vnode = pget;
}
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, base_id, vnode, ofs);
+ undo_redo->add_do_method(vnode.ptr(), "set_property", d["property"]);
+ if (!use_get) {
+ undo_redo->add_do_method(vnode.ptr(), "set_default_input_value", 0, d["value"]);
+ }
+ undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, base_id);
+
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->commit_action();
}
}
}
@@ -2686,21 +2597,21 @@ void VisualScriptEditor::_selected_connect_node_method_or_setget(const String &p
Ref<VisualScriptNode> vsn = script->get_node(edited_func, port_action_new_node);
- if (Object::cast_to<VisualScriptFunctionCall>(*vsn)) {
+ if (Object::cast_to<VisualScriptFunctionCall>(vsn.ptr())) {
Ref<VisualScriptFunctionCall> vsfc = vsn;
vsfc->set_function(p_text);
script->data_connect(edited_func, port_action_node, port_action_output, port_action_new_node, 0);
}
- if (Object::cast_to<VisualScriptPropertySet>(*vsn)) {
+ if (Object::cast_to<VisualScriptPropertySet>(vsn.ptr())) {
Ref<VisualScriptPropertySet> vsp = vsn;
vsp->set_property(p_text);
script->data_connect(edited_func, port_action_node, port_action_output, port_action_new_node, 0);
}
- if (Object::cast_to<VisualScriptPropertyGet>(*vsn)) {
+ if (Object::cast_to<VisualScriptPropertyGet>(vsn.ptr())) {
Ref<VisualScriptPropertyGet> vsp = vsn;
vsp->set_property(p_text);
@@ -2711,6 +2622,63 @@ void VisualScriptEditor::_selected_connect_node_method_or_setget(const String &p
_update_graph_connections();
}
+void VisualScriptEditor::_selected_new_virtual_method(const String &p_text) {
+
+ String name = p_text;
+ if (script->has_function(name)) {
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Script already has function '%s'"), name));
+ return;
+ }
+
+ MethodInfo minfo;
+ {
+ List<MethodInfo> methods;
+ bool found = false;
+ ClassDB::get_virtual_methods(script->get_instance_base_type(), &methods);
+ for (List<MethodInfo>::Element *E = methods.front(); E; E = E->next()) {
+ if (E->get().name == name) {
+ minfo = E->get();
+ found = true;
+ }
+ }
+
+ ERR_FAIL_COND(!found);
+ }
+
+ selected = name;
+ edited_func = selected;
+ Ref<VisualScriptFunction> func_node;
+ func_node.instance();
+ func_node->set_name(name);
+
+ undo_redo->create_action(TTR("Add Function"));
+ undo_redo->add_do_method(script.ptr(), "add_function", name);
+
+ for (int i = 0; i < minfo.arguments.size(); i++) {
+ func_node->add_argument(minfo.arguments[i].type, minfo.arguments[i].name);
+ }
+
+ undo_redo->add_do_method(script.ptr(), "add_node", name, script->get_available_id(), func_node);
+ if (minfo.return_val.type != Variant::NIL || minfo.return_val.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
+ Ref<VisualScriptReturn> ret_node;
+ ret_node.instance();
+ ret_node->set_return_type(minfo.return_val.type);
+ ret_node->set_enable_return_value(true);
+ ret_node->set_name(name);
+ undo_redo->add_do_method(script.ptr(), "add_node", name, script->get_available_id() + 1, ret_node, Vector2(500, 0));
+ }
+
+ undo_redo->add_undo_method(script.ptr(), "remove_function", name);
+ undo_redo->add_do_method(this, "_update_members");
+ undo_redo->add_undo_method(this, "_update_members");
+ undo_redo->add_do_method(this, "_update_graph");
+ undo_redo->add_undo_method(this, "_update_graph");
+
+ undo_redo->commit_action();
+
+ _update_graph();
+}
+
void VisualScriptEditor::_cancel_connect_node_method_or_setget() {
script->remove_node(edited_func, port_action_new_node);
@@ -2783,6 +2751,27 @@ void VisualScriptEditor::_notification(int p_what) {
node_filter->add_icon_override("right_icon", Control::get_icon("Search", "EditorIcons"));
variable_editor->connect("changed", this, "_update_members");
signal_editor->connect("changed", this, "_update_members");
+
+ List<Pair<String, Color> > colors;
+ colors.push_back(Pair<String, Color>("functions", Color(1, 0.9, 0.9)));
+ colors.push_back(Pair<String, Color>("data", Color(0.9, 1.0, 0.9)));
+ colors.push_back(Pair<String, Color>("operators", Color(0.9, 0.9, 1.0)));
+ colors.push_back(Pair<String, Color>("flow_control", Color(1.0, 1.0, 1.0)));
+ colors.push_back(Pair<String, Color>("custom", Color(0.8, 1.0, 1.0)));
+ colors.push_back(Pair<String, Color>("constants", Color(1.0, 0.8, 1.0)));
+
+ for (List<Pair<String, Color> >::Element *E = colors.front(); E; E = E->next()) {
+ print_line(E->get().first);
+ Ref<StyleBoxFlat> sb = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("frame", "GraphNode");
+ if (sb != NULL) {
+ Ref<StyleBoxFlat> frame_style = sb->duplicate();
+ Color c = sb->get_border_color(MARGIN_TOP);
+ Color cn = E->get().second;
+ cn.a = c.a;
+ frame_style->set_border_color_all(cn);
+ node_styles[E->get().first] = frame_style;
+ }
+ }
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
left_vsplit->set_visible(is_visible_in_tree());
@@ -3014,7 +3003,7 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) {
TreeItem *root = members->get_root();
- Ref<Texture> del_icon = Control::get_icon("Del", "EditorIcons");
+ Ref<Texture> del_icon = Control::get_icon("Remove", "EditorIcons");
Ref<Texture> edit_icon = Control::get_icon("Edit", "EditorIcons");
@@ -3147,7 +3136,6 @@ void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("_update_members", &VisualScriptEditor::_update_members);
ClassDB::bind_method("_change_base_type", &VisualScriptEditor::_change_base_type);
ClassDB::bind_method("_change_base_type_callback", &VisualScriptEditor::_change_base_type_callback);
- ClassDB::bind_method("_override_pressed", &VisualScriptEditor::_override_pressed);
ClassDB::bind_method("_node_selected", &VisualScriptEditor::_node_selected);
ClassDB::bind_method("_node_moved", &VisualScriptEditor::_node_moved);
ClassDB::bind_method("_move_node", &VisualScriptEditor::_move_node);
@@ -3166,6 +3154,8 @@ void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("_button_resource_previewed", &VisualScriptEditor::_button_resource_previewed);
ClassDB::bind_method("_port_action_menu", &VisualScriptEditor::_port_action_menu);
ClassDB::bind_method("_selected_connect_node_method_or_setget", &VisualScriptEditor::_selected_connect_node_method_or_setget);
+ ClassDB::bind_method("_selected_new_virtual_method", &VisualScriptEditor::_selected_new_virtual_method);
+
ClassDB::bind_method("_cancel_connect_node_method_or_setget", &VisualScriptEditor::_cancel_connect_node_method_or_setget);
ClassDB::bind_method("_expression_text_changed", &VisualScriptEditor::_expression_text_changed);
@@ -3344,9 +3334,6 @@ VisualScriptEditor::VisualScriptEditor() {
undo_redo = EditorNode::get_singleton()->get_undo_redo();
- new_function_menu = memnew(PopupMenu);
- new_function_menu->connect("id_pressed", this, "_override_pressed");
- add_child(new_function_menu);
updating_members = false;
set_process_input(true); //for revert on drag
@@ -3366,6 +3353,11 @@ VisualScriptEditor::VisualScriptEditor() {
new_connect_node_select->connect("selected", this, "_selected_connect_node_method_or_setget");
new_connect_node_select->get_cancel()->connect("pressed", this, "_cancel_connect_node_method_or_setget");
+ new_virtual_method_select = memnew(PropertySelector);
+ add_child(new_virtual_method_select);
+ new_virtual_method_select->connect("selected", this, "_selected_new_virtual_method");
+ new_virtual_method_select->get_cancel()->connect("pressed", this, "_selected_new_virtual_method");
+
port_action_popup = memnew(PopupMenu);
add_child(port_action_popup);
port_action_popup->connect("id_pressed", this, "_port_action_menu");
@@ -3403,12 +3395,6 @@ void VisualScriptEditor::free_clipboard() {
static void register_editor_callback() {
ScriptEditor::register_create_script_editor_function(create_editor);
- EditorSettings::get_singleton()->set("editors/visual_script/color_functions", Color(1, 0.9, 0.9));
- EditorSettings::get_singleton()->set("editors/visual_script/color_data", Color(0.9, 1.0, 0.9));
- EditorSettings::get_singleton()->set("editors/visual_script/color_operators", Color(0.9, 0.9, 1.0));
- EditorSettings::get_singleton()->set("editors/visual_script/color_flow_control", Color(1.0, 1.0, 1.0));
- EditorSettings::get_singleton()->set("editors/visual_script/color_custom", Color(0.8, 1.0, 1.0));
- EditorSettings::get_singleton()->set("editors/visual_script/color_constants", Color(1.0, 0.8, 1.0));
ED_SHORTCUT("visual_script_editor/delete_selected", TTR("Delete Selected"));
ED_SHORTCUT("visual_script_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index dd051ef8e4..db54d10300 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -103,6 +103,7 @@ class VisualScriptEditor : public ScriptEditorBase {
PropertySelector *method_select;
PropertySelector *new_connect_node_select;
+ PropertySelector *new_virtual_method_select;
VisualScriptEditorVariableEdit *variable_editor;
@@ -135,10 +136,7 @@ class VisualScriptEditor : public ScriptEditorBase {
Vector<Pair<Variant::Type, String> > args;
};
- Map<int, VirtualInMenu> virtuals_in_menu;
-
- PopupMenu *new_function_menu;
-
+ HashMap<StringName, Ref<StyleBox>, StringNameHasher> node_styles;
StringName edited_func;
void _update_graph_connections();
@@ -177,6 +175,7 @@ class VisualScriptEditor : public ScriptEditorBase {
void _port_action_menu(int p_option);
void _selected_connect_node_method_or_setget(const String &p_text);
void _cancel_connect_node_method_or_setget();
+ void _selected_new_virtual_method(const String &p_text);
int error_line;
@@ -188,7 +187,6 @@ class VisualScriptEditor : public ScriptEditorBase {
void _change_base_type();
void _member_selected();
void _member_edited();
- void _override_pressed(int p_id);
void _begin_node_move();
void _end_node_move();
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index d0e9b5bb86..eae866d167 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -831,7 +831,6 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
case TK_BUILTIN_FUNC: {
//builtin function
- Variant::Type bt = Variant::Type(int(tk.value));
_get_token(tk);
if (tk.type != TK_PARENTHESIS_OPEN) {
_set_error("Expected '('");
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 5fcc5b0ad9..267946750f 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -748,6 +748,13 @@ void VisualScriptFunctionCall::_bind_methods() {
BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
BIND_ENUM_CONSTANT(CALL_MODE_BASIC_TYPE);
+ BIND_ENUM_CONSTANT(CALL_MODE_SINGLETON);
+
+ BIND_ENUM_CONSTANT(RPC_DISABLED);
+ BIND_ENUM_CONSTANT(RPC_RELIABLE);
+ BIND_ENUM_CONSTANT(RPC_UNRELIABLE);
+ BIND_ENUM_CONSTANT(RPC_RELIABLE_TO_ID);
+ BIND_ENUM_CONSTANT(RPC_UNRELIABLE_TO_ID);
}
class VisualScriptNodeInstanceFunctionCall : public VisualScriptNodeInstance {
@@ -1487,6 +1494,19 @@ void VisualScriptPropertySet::_bind_methods() {
BIND_ENUM_CONSTANT(CALL_MODE_SELF);
BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
+ BIND_ENUM_CONSTANT(CALL_MODE_BASIC_TYPE);
+
+ BIND_ENUM_CONSTANT(ASSIGN_OP_NONE);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_ADD);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_SUB);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_MUL);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_DIV);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_MOD);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_SHIFT_LEFT);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_SHIFT_RIGHT);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_BIT_AND);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_BIT_OR);
+ BIND_ENUM_CONSTANT(ASSIGN_OP_BIT_XOR);
}
class VisualScriptNodeInstancePropertySet : public VisualScriptNodeInstance {
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 1decc004ab..b617c11bab 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1493,7 +1493,7 @@ void VisualScriptGlobalConstant::_bind_methods() {
cc += ",";
cc += GlobalConstants::get_global_constant_name(i);
}
- ADD_PROPERTY(PropertyInfo(Variant::INT, "constant/constant", PROPERTY_HINT_ENUM, cc), "set_global_constant", "get_global_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "constant", PROPERTY_HINT_ENUM, cc), "set_global_constant", "get_global_constant");
}
VisualScriptGlobalConstant::VisualScriptGlobalConstant() {
@@ -1622,7 +1622,7 @@ void VisualScriptClassConstant::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_base_type"), &VisualScriptClassConstant::get_base_type);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type", PROPERTY_HINT_TYPE_STRING, "Object"), "set_base_type", "get_base_type");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant/constant", PROPERTY_HINT_ENUM, ""), "set_class_constant", "get_class_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant", PROPERTY_HINT_ENUM, ""), "set_class_constant", "get_class_constant");
}
VisualScriptClassConstant::VisualScriptClassConstant() {
@@ -1760,7 +1760,7 @@ void VisualScriptBasicTypeConstant::_bind_methods() {
}
ADD_PROPERTY(PropertyInfo(Variant::INT, "basic_type", PROPERTY_HINT_ENUM, argt), "set_basic_type", "get_basic_type");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant/constant", PROPERTY_HINT_ENUM, ""), "set_basic_type_constant", "get_basic_type_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant", PROPERTY_HINT_ENUM, ""), "set_basic_type_constant", "get_basic_type_constant");
}
VisualScriptBasicTypeConstant::VisualScriptBasicTypeConstant() {
@@ -1881,7 +1881,17 @@ void VisualScriptMathConstant::_bind_methods() {
cc += ",";
cc += const_name[i];
}
- ADD_PROPERTY(PropertyInfo(Variant::INT, "constant/constant", PROPERTY_HINT_ENUM, cc), "set_math_constant", "get_math_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "constant", PROPERTY_HINT_ENUM, cc), "set_math_constant", "get_math_constant");
+
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_ONE);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_2PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_HALF_PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_E);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_SQRT2);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_INF);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_NAN);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_MAX);
}
VisualScriptMathConstant::VisualScriptMathConstant() {
@@ -2002,7 +2012,7 @@ void VisualScriptEngineSingleton::_bind_methods() {
cc += E->get().name;
}
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant/constant", PROPERTY_HINT_ENUM, cc), "set_singleton", "get_singleton");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant", PROPERTY_HINT_ENUM, cc), "set_singleton", "get_singleton");
}
VisualScriptEngineSingleton::VisualScriptEngineSingleton() {
@@ -3535,6 +3545,11 @@ void VisualScriptInputAction::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action_name", "get_action_name");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Pressed,Released,JustPressed,JustReleased"), "set_action_mode", "get_action_mode");
+
+ BIND_ENUM_CONSTANT(MODE_PRESSED);
+ BIND_ENUM_CONSTANT(MODE_RELEASED);
+ BIND_ENUM_CONSTANT(MODE_JUST_PRESSED);
+ BIND_ENUM_CONSTANT(MODE_JUST_RELEASED);
}
VisualScriptInputAction::VisualScriptInputAction() {
@@ -3727,11 +3742,11 @@ void register_visual_script_nodes() {
VisualScriptLanguage::singleton->add_register_func("data/preload", create_node_generic<VisualScriptPreload>);
VisualScriptLanguage::singleton->add_register_func("data/action", create_node_generic<VisualScriptInputAction>);
- VisualScriptLanguage::singleton->add_register_func("constant/constants/constant", create_node_generic<VisualScriptConstant>);
- VisualScriptLanguage::singleton->add_register_func("constant/constants/math_constant", create_node_generic<VisualScriptMathConstant>);
- VisualScriptLanguage::singleton->add_register_func("constant/constants/class_constant", create_node_generic<VisualScriptClassConstant>);
- VisualScriptLanguage::singleton->add_register_func("constant/constants/global_constant", create_node_generic<VisualScriptGlobalConstant>);
- VisualScriptLanguage::singleton->add_register_func("constant/constants/basic_type_constant", create_node_generic<VisualScriptBasicTypeConstant>);
+ VisualScriptLanguage::singleton->add_register_func("constants/constant", create_node_generic<VisualScriptConstant>);
+ VisualScriptLanguage::singleton->add_register_func("constants/math_constant", create_node_generic<VisualScriptMathConstant>);
+ VisualScriptLanguage::singleton->add_register_func("constants/class_constant", create_node_generic<VisualScriptClassConstant>);
+ VisualScriptLanguage::singleton->add_register_func("constants/global_constant", create_node_generic<VisualScriptGlobalConstant>);
+ VisualScriptLanguage::singleton->add_register_func("constants/basic_type_constant", create_node_generic<VisualScriptBasicTypeConstant>);
VisualScriptLanguage::singleton->add_register_func("custom/custom_node", create_node_generic<VisualScriptCustomNode>);
VisualScriptLanguage::singleton->add_register_func("custom/sub_call", create_node_generic<VisualScriptSubCall>);
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index d691bd7629..e3615e2298 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -520,25 +520,21 @@ class EditorExportAndroid : public EditorExportPlatform {
void _fix_manifest(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest, bool p_give_internet) {
- const int CHUNK_AXML_FILE = 0x00080003;
- const int CHUNK_RESOURCEIDS = 0x00080180;
+ // Leaving the unused types commented because looking these constants up
+ // again later would be annoying
+ // const int CHUNK_AXML_FILE = 0x00080003;
+ // const int CHUNK_RESOURCEIDS = 0x00080180;
const int CHUNK_STRINGS = 0x001C0001;
- const int CHUNK_XML_END_NAMESPACE = 0x00100101;
- const int CHUNK_XML_END_TAG = 0x00100103;
- const int CHUNK_XML_START_NAMESPACE = 0x00100100;
+ // const int CHUNK_XML_END_NAMESPACE = 0x00100101;
+ // const int CHUNK_XML_END_TAG = 0x00100103;
+ // const int CHUNK_XML_START_NAMESPACE = 0x00100100;
const int CHUNK_XML_START_TAG = 0x00100102;
- const int CHUNK_XML_TEXT = 0x00100104;
+ // const int CHUNK_XML_TEXT = 0x00100104;
const int UTF8_FLAG = 0x00000100;
Vector<String> string_table;
- uint32_t ofs = 0;
-
- uint32_t header = decode_uint32(&p_manifest[ofs]);
- uint32_t filesize = decode_uint32(&p_manifest[ofs + 4]);
- ofs += 8;
-
- //print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
+ uint32_t ofs = 8;
uint32_t string_count = 0;
uint32_t styles_count = 0;
@@ -646,24 +642,16 @@ class EditorExportAndroid : public EditorExportPlatform {
case CHUNK_XML_START_TAG: {
int iofs = ofs + 8;
- uint32_t line = decode_uint32(&p_manifest[iofs]);
- uint32_t nspace = decode_uint32(&p_manifest[iofs + 8]);
uint32_t name = decode_uint32(&p_manifest[iofs + 12]);
- uint32_t check = decode_uint32(&p_manifest[iofs + 16]);
String tname = string_table[name];
-
- //printf("NSPACE: %i\n",nspace);
- //printf("NAME: %i (%s)\n",name,tname.utf8().get_data());
- //printf("CHECK: %x\n",check);
uint32_t attrcount = decode_uint32(&p_manifest[iofs + 20]);
iofs += 28;
- //printf("ATTRCOUNT: %x\n",attrcount);
+
for (uint32_t i = 0; i < attrcount; i++) {
uint32_t attr_nspace = decode_uint32(&p_manifest[iofs]);
uint32_t attr_name = decode_uint32(&p_manifest[iofs + 4]);
uint32_t attr_value = decode_uint32(&p_manifest[iofs + 8]);
- uint32_t attr_flags = decode_uint32(&p_manifest[iofs + 12]);
uint32_t attr_resid = decode_uint32(&p_manifest[iofs + 16]);
String value;
@@ -678,12 +666,6 @@ class EditorExportAndroid : public EditorExportPlatform {
else
nspace = "";
- //printf("ATTR %i NSPACE: %i\n",i,attr_nspace);
- //printf("ATTR %i NAME: %i (%s)\n",i,attr_name,attrname.utf8().get_data());
- //printf("ATTR %i VALUE: %i (%s)\n",i,attr_value,value.utf8().get_data());
- //printf("ATTR %i FLAGS: %x\n",i,attr_flags);
- //printf("ATTR %i RESID: %x\n",i,attr_resid);
-
//replace project information
if (tname == "manifest" && attrname == "package") {
@@ -691,9 +673,6 @@ class EditorExportAndroid : public EditorExportPlatform {
string_table[attr_value] = get_package_name(package_name);
}
- //print_line("tname: "+tname);
- //print_line("nspace: "+nspace);
- //print_line("attrname: "+attrname);
if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionCode") {
print_line("FOUND versionCode");
@@ -712,13 +691,6 @@ class EditorExportAndroid : public EditorExportPlatform {
if (tname == "activity" && /*nspace=="android" &&*/ attrname == "screenOrientation") {
encode_uint32(orientation == 0 ? 0 : 1, &p_manifest[iofs + 16]);
- /*
- print_line("FOUND screen orientation");
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Version name in a resource, should be plaintext")
- } else {
- string_table[attr_value]=(orientation==0?"landscape":"portrait");
- }*/
}
if (tname == "uses-feature" && /*nspace=="android" &&*/ attrname == "glEsVersion") {
@@ -771,13 +743,10 @@ class EditorExportAndroid : public EditorExportPlatform {
} break;
}
- //printf("chunk %x: size: %d\n",chunk,size);
ofs += size;
}
- //printf("end\n");
-
//create new andriodmanifest binary
Vector<uint8_t> ret;
@@ -876,8 +845,6 @@ class EditorExportAndroid : public EditorExportPlatform {
const int UTF8_FLAG = 0x00000100;
print_line("*******************GORRRGLE***********************");
- uint32_t header = decode_uint32(&p_manifest[0]);
- uint32_t filesize = decode_uint32(&p_manifest[4]);
uint32_t string_block_len = decode_uint32(&p_manifest[16]);
uint32_t string_count = decode_uint32(&p_manifest[20]);
uint32_t string_flags = decode_uint32(&p_manifest[28]);
@@ -887,10 +854,6 @@ class EditorExportAndroid : public EditorExportPlatform {
String package_name = p_preset->get("package/name");
- //printf("stirng block len: %i\n",string_block_len);
- //printf("stirng count: %i\n",string_count);
- //printf("flags: %x\n",string_flags);
-
for (uint32_t i = 0; i < string_count; i++) {
uint32_t offset = decode_uint32(&p_manifest[string_table_begins + i * 4]);
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 1de2608b9e..dbea2d7531 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -137,12 +137,7 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
visual_server->init();
// visual_server->cursor_set_visible(false, 0);
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
physics_server = memnew(PhysicsServerSW);
physics_server->init();
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index 98d4d810b9..48c9377a5a 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -198,19 +198,19 @@ bool power_android::GetPowerInfo_Android() {
if (Android_JNI_GetPowerInfo(&plugged, &charged, &battery, &this->nsecs_left, &this->percent_left) != -1) {
if (plugged) {
if (charged) {
- this->power_state = POWERSTATE_CHARGED;
+ this->power_state = OS::POWERSTATE_CHARGED;
} else if (battery) {
- this->power_state = POWERSTATE_CHARGING;
+ this->power_state = OS::POWERSTATE_CHARGING;
} else {
- this->power_state = POWERSTATE_NO_BATTERY;
+ this->power_state = OS::POWERSTATE_NO_BATTERY;
this->nsecs_left = -1;
this->percent_left = -1;
}
} else {
- this->power_state = POWERSTATE_ON_BATTERY;
+ this->power_state = OS::POWERSTATE_ON_BATTERY;
}
} else {
- this->power_state = POWERSTATE_UNKNOWN;
+ this->power_state = OS::POWERSTATE_UNKNOWN;
this->nsecs_left = -1;
this->percent_left = -1;
}
@@ -218,12 +218,12 @@ bool power_android::GetPowerInfo_Android() {
return true;
}
-PowerState power_android::get_power_state() {
+OS::PowerState power_android::get_power_state() {
if (GetPowerInfo_Android()) {
return power_state;
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN");
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -246,7 +246,7 @@ int power_android::get_power_percent_left() {
}
power_android::power_android()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
power_android::~power_android() {
diff --git a/platform/android/power_android.h b/platform/android/power_android.h
index fc618c660d..4c7af1c771 100644
--- a/platform/android/power_android.h
+++ b/platform/android/power_android.h
@@ -31,7 +31,7 @@
#ifndef PLATFORM_ANDROID_POWER_ANDROID_H_
#define PLATFORM_ANDROID_POWER_ANDROID_H_
-#include "os/power.h"
+#include "os/os.h"
#include <android/native_window_jni.h>
class power_android {
@@ -57,7 +57,7 @@ private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool GetPowerInfo_Android();
bool UpdatePowerInfo();
@@ -71,7 +71,7 @@ public:
static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func);
static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder);
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index de2f79a0ac..9f2f88bb4e 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -137,11 +137,7 @@ void OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_
//physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>();
physics_2d_server->init();
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
power_manager = memnew(PowerHaiku);
}
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index cb68f9303f..d2fafb9129 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -117,7 +117,7 @@ public:
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const;
virtual String get_executable_path() const;
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
diff --git a/platform/haiku/power_haiku.cpp b/platform/haiku/power_haiku.cpp
index 449b43a621..8718b317a3 100644
--- a/platform/haiku/power_haiku.cpp
+++ b/platform/haiku/power_haiku.cpp
@@ -37,12 +37,12 @@ bool PowerHaiku::UpdatePowerInfo() {
return false;
}
-PowerState PowerHaiku::get_power_state() {
+OS::PowerState PowerHaiku::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN");
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -65,7 +65,7 @@ int PowerX11::get_power_percent_left() {
}
PowerHaiku::PowerHaiku()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerHaiku::~PowerHaiku() {
diff --git a/platform/haiku/power_haiku.h b/platform/haiku/power_haiku.h
index 12513bdaef..59a93cd976 100644
--- a/platform/haiku/power_haiku.h
+++ b/platform/haiku/power_haiku.h
@@ -31,11 +31,13 @@
#ifndef PLATFORM_HAIKU_POWER_HAIKU_H_
#define PLATFORM_HAIKU_POWER_HAIKU_H_
+#include <os/os.h>
+
class PowerHaiku {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool UpdatePowerInfo();
@@ -43,7 +45,7 @@ public:
PowerHaiku();
virtual ~PowerHaiku();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/power_iphone.cpp
index 2811e62108..055d31ef0a 100644
--- a/platform/iphone/power_iphone.cpp
+++ b/platform/iphone/power_iphone.cpp
@@ -30,15 +30,15 @@
#include "power_iphone.h"
-bool PowerState::UpdatePowerInfo() {
+bool OS::PowerState::UpdatePowerInfo() {
return false;
}
-PowerState PowerIphone::get_power_state() {
+OS::PowerState PowerIphone::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -59,7 +59,7 @@ int PowerIphone::get_power_percent_left() {
}
PowerIphone::PowerIphone()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
// TODO Auto-generated constructor stub
}
diff --git a/platform/iphone/power_iphone.h b/platform/iphone/power_iphone.h
index b4fb8d62dc..6270a8069c 100644
--- a/platform/iphone/power_iphone.h
+++ b/platform/iphone/power_iphone.h
@@ -31,11 +31,13 @@
#ifndef PLATFORM_IPHONE_POWER_IPHONE_H_
#define PLATFORM_IPHONE_POWER_IPHONE_H_
+#include <os/os.h>
+
class PowerIphone {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool UpdatePowerInfo();
@@ -43,7 +45,7 @@ public:
PowerIphone();
virtual ~PowerIphone();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub
index b804863ee1..e282041745 100644
--- a/platform/javascript/SCsub
+++ b/platform/javascript/SCsub
@@ -20,33 +20,32 @@ for x in javascript_files:
javascript_objects.append(env_javascript.Object(x))
env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_function','_main_after_fs_sync','_send_notification']\""])
-env.Append(LINKFLAGS=["--shell-file", '"platform/javascript/godot_shell.html"'])
# output file name without file extension
basename = "godot" + env["PROGSUFFIX"]
target_dir = env.Dir("#bin")
-js_file = target_dir.File(basename + ".js")
-implicit_targets = [js_file]
zip_dir = target_dir.Dir('.javascript_zip')
-zip_files = env.InstallAs([zip_dir.File("godot.js"), zip_dir.File("godotfs.js")], [js_file, "#misc/dist/html_fs/godotfs.js"])
+zip_files = env.InstallAs(zip_dir.File('godot.html'), '#misc/dist/html/default.html')
+implicit_targets = []
if env['wasm'] == 'yes':
- wasm_file = target_dir.File(basename+'.wasm')
- implicit_targets.append(wasm_file)
- zip_files.append(InstallAs(zip_dir.File('godot.wasm'), wasm_file))
+ wasm = target_dir.File(basename + '.wasm')
+ implicit_targets.append(wasm)
+ zip_files.append(InstallAs(zip_dir.File('godot.wasm'), wasm))
+ prejs = env.File('pre_wasm.js')
else:
- asmjs_files = [target_dir.File(basename+'.asm.js'), target_dir.File(basename+'.html.mem')]
- zip_files.append(InstallAs([zip_dir.File('godot.asm.js'), zip_dir.File('godot.mem')], asmjs_files))
+ asmjs_files = [target_dir.File(basename + '.asm.js'), target_dir.File(basename + '.js.mem')]
implicit_targets.extend(asmjs_files)
+ zip_files.append(InstallAs([zip_dir.File('godot.asm.js'), zip_dir.File('godot.mem')], asmjs_files))
+ prejs = env.File('pre_asmjs.js')
-# HTML file must be the first target in the list
-html_file = env.Program(["#bin/godot"] + implicit_targets, javascript_objects, PROGSUFFIX=env["PROGSUFFIX"]+".html")[0]
-Depends(html_file, "godot_shell.html")
+js = env.Program(['#bin/godot'] + implicit_targets, javascript_objects, PROGSUFFIX=env['PROGSUFFIX'] + '.js')[0];
+zip_files.append(InstallAs(zip_dir.File('godot.js'), js))
-# Emscripten hardcodes file names, so replace common base name with
-# placeholder while leaving extension; also change `.html.mem` to just `.mem`
-fixup_html = env.Substfile(html_file, SUBST_DICT=[(basename, '$$GODOT_BASE'), ('.html.mem', '.mem')], SUBSTFILESUFFIX='.fixup.html')
+postjs = env.File('engine.js')
+env.Depends(js, [prejs, postjs])
+env.Append(LINKFLAGS=['--pre-js', prejs.path])
+env.Append(LINKFLAGS=['--post-js', postjs.path])
-zip_files.append(InstallAs(zip_dir.File('godot.html'), fixup_html))
-Zip('#bin/godot', zip_files, ZIPSUFFIX=env['PROGSUFFIX']+env['ZIPSUFFIX'], ZIPROOT=zip_dir, ZIPCOMSTR="Archving $SOURCES as $TARGET")
+Zip('#bin/godot', zip_files, ZIPSUFFIX=env['PROGSUFFIX'] + env['ZIPSUFFIX'], ZIPROOT=zip_dir, ZIPCOMSTR="Archving $SOURCES as $TARGET")
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 5f066f1b15..bea8f156af 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -100,6 +100,7 @@ def configure(env):
## Link flags
+ env.Append(LINKFLAGS=['-s', 'EXTRA_EXPORTED_RUNTIME_METHODS="[\'FS\']"'])
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
if (env['wasm'] == 'yes'):
@@ -112,6 +113,7 @@ def configure(env):
else:
env.Append(LINKFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['--separate-asm'])
+ env.Append(LINKFLAGS=['--memory-init-file', '1'])
# TODO: Move that to opus module's config
if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js
new file mode 100644
index 0000000000..552f5a7e02
--- /dev/null
+++ b/platform/javascript/engine.js
@@ -0,0 +1,366 @@
+ return Module;
+ },
+};
+
+(function() {
+ var engine = Engine;
+
+ var USING_WASM = engine.USING_WASM;
+ var DOWNLOAD_ATTEMPTS_MAX = 4;
+
+ var basePath = null;
+ var engineLoadPromise = null;
+
+ var loadingFiles = {};
+
+ function getBasePath(path) {
+
+ if (path.endsWith('/'))
+ path = path.slice(0, -1);
+ if (path.lastIndexOf('.') > path.lastIndexOf('/'))
+ path = path.slice(0, path.lastIndexOf('.'));
+ return path;
+ }
+
+ function getBaseName(path) {
+
+ path = getBasePath(path);
+ return path.slice(path.lastIndexOf('/') + 1);
+ }
+
+ Engine = function Engine() {
+
+ this.rtenv = null;
+
+ var gameInitPromise = null;
+ var unloadAfterInit = true;
+ var memorySize = 268435456;
+
+ var progressFunc = null;
+ var pckProgressTracker = {};
+ var lastProgress = { loaded: 0, total: 0 };
+
+ var canvas = null;
+ var stdout = null;
+ var stderr = null;
+
+ this.initGame = function(mainPack) {
+
+ if (!gameInitPromise) {
+
+ if (mainPack === undefined) {
+ if (basePath !== null) {
+ mainPack = basePath + '.pck';
+ } else {
+ return Promise.reject(new Error("No main pack to load specified"));
+ }
+ }
+ if (basePath === null)
+ basePath = getBasePath(mainPack);
+
+ gameInitPromise = Engine.initEngine().then(
+ instantiate.bind(this)
+ );
+ var gameLoadPromise = loadPromise(mainPack, pckProgressTracker).then(function(xhr) { return xhr.response; });
+ gameInitPromise = Promise.all([gameLoadPromise, gameInitPromise]).then(function(values) {
+ // resolve with pck
+ return new Uint8Array(values[0]);
+ });
+ if (unloadAfterInit)
+ gameInitPromise.then(Engine.unloadEngine);
+ requestAnimationFrame(animateProgress);
+ }
+ return gameInitPromise;
+ };
+
+ function instantiate(initializer) {
+
+ var rtenvOpts = {
+ noInitialRun: true,
+ thisProgram: getBaseName(basePath),
+ engine: this,
+ };
+ if (typeof stdout === 'function')
+ rtenvOpts.print = stdout;
+ if (typeof stderr === 'function')
+ rtenvOpts.printErr = stderr;
+ if (typeof WebAssembly === 'object' && initializer instanceof WebAssembly.Module) {
+ rtenvOpts.instantiateWasm = function(imports, onSuccess) {
+ WebAssembly.instantiate(initializer, imports).then(function(result) {
+ onSuccess(result);
+ });
+ return {};
+ };
+ } else if (initializer.asm && initializer.mem) {
+ rtenvOpts.asm = initializer.asm;
+ rtenvOpts.memoryInitializerRequest = initializer.mem;
+ rtenvOpts.TOTAL_MEMORY = memorySize;
+ } else {
+ throw new Error("Invalid initializer");
+ }
+
+ return new Promise(function(resolve, reject) {
+ rtenvOpts.onRuntimeInitialized = resolve;
+ rtenvOpts.onAbort = reject;
+ rtenvOpts.engine.rtenv = Engine.RuntimeEnvironment(rtenvOpts);
+ });
+ }
+
+ this.start = function(mainPack) {
+
+ return this.initGame(mainPack).then(synchronousStart.bind(this));
+ };
+
+ function synchronousStart(pckView) {
+ // TODO don't expect canvas when runninng as cli tool
+ if (canvas instanceof HTMLCanvasElement) {
+ this.rtenv.canvas = canvas;
+ } else {
+ var firstCanvas = document.getElementsByTagName('canvas')[0];
+ if (firstCanvas instanceof HTMLCanvasElement) {
+ this.rtenv.canvas = firstCanvas;
+ } else {
+ throw new Error("No canvas found");
+ }
+ }
+
+ var actualCanvas = this.rtenv.canvas;
+ var context = false;
+ try {
+ context = actualCanvas.getContext('webgl2') || actualCanvas.getContext('experimental-webgl2');
+ } catch (e) {}
+ if (!context) {
+ throw new Error("WebGL 2 not available");
+ }
+
+ // canvas can grab focus on click
+ if (actualCanvas.tabIndex < 0) {
+ actualCanvas.tabIndex = 0;
+ }
+ // necessary to calculate cursor coordinates correctly
+ actualCanvas.style.padding = 0;
+ actualCanvas.style.borderWidth = 0;
+ actualCanvas.style.borderStyle = 'none';
+ // until context restoration is implemented
+ actualCanvas.addEventListener('webglcontextlost', function(ev) {
+ alert("WebGL context lost, please reload the page");
+ ev.preventDefault();
+ }, false);
+
+ this.rtenv.FS.createDataFile('/', this.rtenv.thisProgram + '.pck', pckView, true, true, true);
+ gameInitPromise = null;
+ this.rtenv.callMain();
+ }
+
+ this.setProgressFunc = function(func) {
+ progressFunc = func;
+ };
+
+ function animateProgress() {
+
+ var loaded = 0;
+ var total = 0;
+ var totalIsValid = true;
+ var progressIsFinal = true;
+
+ [loadingFiles, pckProgressTracker].forEach(function(tracker) {
+ Object.keys(tracker).forEach(function(file) {
+ if (!tracker[file].final)
+ progressIsFinal = false;
+ if (!totalIsValid || tracker[file].total === 0) {
+ totalIsValid = false;
+ total = 0;
+ } else {
+ total += tracker[file].total;
+ }
+ loaded += tracker[file].loaded;
+ });
+ });
+ if (loaded !== lastProgress.loaded || total !== lastProgress.total) {
+ lastProgress.loaded = loaded;
+ lastProgress.total = total;
+ if (typeof progressFunc === 'function')
+ progressFunc(loaded, total);
+ }
+ if (!progressIsFinal)
+ requestAnimationFrame(animateProgress);
+ }
+
+ this.setCanvas = function(elem) {
+ canvas = elem;
+ };
+
+ this.setAsmjsMemorySize = function(size) {
+ memorySize = size;
+ };
+
+ this.setUnloadAfterInit = function(enabled) {
+
+ if (enabled && !unloadAfterInit && gameInitPromise) {
+ gameInitPromise.then(Engine.unloadEngine);
+ }
+ unloadAfterInit = enabled;
+ };
+
+ this.setStdoutFunc = function(func) {
+
+ var print = function(text) {
+ if (arguments.length > 1) {
+ text = Array.prototype.slice.call(arguments).join(" ");
+ }
+ func(text);
+ };
+ if (this.rtenv)
+ this.rtenv.print = print;
+ stdout = print;
+ };
+
+ this.setStderrFunc = function(func) {
+
+ var printErr = function(text) {
+ if (arguments.length > 1)
+ text = Array.prototype.slice.call(arguments).join(" ");
+ func(text);
+ };
+ if (this.rtenv)
+ this.rtenv.printErr = printErr;
+ stderr = printErr;
+ };
+
+
+ }; // Engine()
+
+ Engine.RuntimeEnvironment = engine.RuntimeEnvironment;
+
+ Engine.initEngine = function(newBasePath) {
+
+ if (newBasePath !== undefined) basePath = getBasePath(newBasePath);
+ if (engineLoadPromise === null) {
+ if (USING_WASM) {
+ if (typeof WebAssembly !== 'object')
+ return Promise.reject(new Error("Browser doesn't support WebAssembly"));
+ // TODO cache/retrieve module to/from idb
+ engineLoadPromise = loadPromise(basePath + '.wasm').then(function(xhr) {
+ return WebAssembly.compile(xhr.response);
+ });
+ } else {
+ var asmjsPromise = loadPromise(basePath + '.asm.js').then(function(xhr) {
+ return asmjsModulePromise(xhr.response);
+ });
+ var memPromise = loadPromise(basePath + '.mem');
+ engineLoadPromise = Promise.all([asmjsPromise, memPromise]).then(function(values) {
+ return { asm: values[0], mem: values[1] };
+ });
+ }
+ engineLoadPromise = engineLoadPromise.catch(function(err) {
+ engineLoadPromise = null;
+ throw err;
+ });
+ }
+ return engineLoadPromise;
+ };
+
+ function asmjsModulePromise(module) {
+ var elem = document.createElement('script');
+ var script = new Blob([
+ 'Engine.asm = (function() { var Module = {};',
+ module,
+ 'return Module.asm; })();'
+ ]);
+ var url = URL.createObjectURL(script);
+ elem.src = url;
+ return new Promise(function(resolve, reject) {
+ elem.addEventListener('load', function() {
+ URL.revokeObjectURL(url);
+ var asm = Engine.asm;
+ Engine.asm = undefined;
+ setTimeout(function() {
+ // delay to reclaim compilation memory
+ resolve(asm);
+ }, 1);
+ });
+ elem.addEventListener('error', function() {
+ URL.revokeObjectURL(url);
+ reject("asm.js faiilure");
+ });
+ document.body.appendChild(elem);
+ });
+ }
+
+ Engine.unloadEngine = function() {
+ engineLoadPromise = null;
+ };
+
+ function loadPromise(file, tracker) {
+ if (tracker === undefined)
+ tracker = loadingFiles;
+ return new Promise(function(resolve, reject) {
+ loadXHR(resolve, reject, file, tracker);
+ });
+ }
+
+ function loadXHR(resolve, reject, file, tracker) {
+
+ var xhr = new XMLHttpRequest;
+ xhr.open('GET', file);
+ if (!file.endsWith('.js')) {
+ xhr.responseType = 'arraybuffer';
+ }
+ ['loadstart', 'progress', 'load', 'error', 'timeout', 'abort'].forEach(function(ev) {
+ xhr.addEventListener(ev, onXHREvent.bind(xhr, resolve, reject, file, tracker));
+ });
+ xhr.send();
+ }
+
+ function onXHREvent(resolve, reject, file, tracker, ev) {
+
+ if (this.status >= 400) {
+
+ if (this.status < 500 || ++tracker[file].attempts >= DOWNLOAD_ATTEMPTS_MAX) {
+ reject(new Error("Failed loading file '" + file + "': " + this.statusText));
+ this.abort();
+ return;
+ } else {
+ loadXHR(resolve, reject, file);
+ }
+ }
+
+ switch (ev.type) {
+ case 'loadstart':
+ if (tracker[file] === undefined) {
+ tracker[file] = {
+ total: ev.total,
+ loaded: ev.loaded,
+ attempts: 0,
+ final: false,
+ };
+ }
+ break;
+
+ case 'progress':
+ tracker[file].loaded = ev.loaded;
+ tracker[file].total = ev.total;
+ break;
+
+ case 'load':
+ tracker[file].final = true;
+ resolve(this);
+ break;
+
+ case 'error':
+ case 'timeout':
+ if (++tracker[file].attempts >= DOWNLOAD_ATTEMPTS_MAX) {
+ tracker[file].final = true;
+ reject(new Error("Failed loading file '" + file + "'"));
+ } else {
+ loadXHR(resolve, reject, file);
+ }
+ break;
+
+ case 'abort':
+ tracker[file].final = true;
+ reject(new Error("Loading file '" + file + "' was aborted."));
+ break;
+ }
+ }
+})();
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 5a161dd0ab..4a97bf4c32 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -100,8 +100,8 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re
for (int i = 0; i < lines.size(); i++) {
String current_line = lines[i];
- current_line = current_line.replace("$GODOT_TMEM", itos(memory_mb * 1024 * 1024));
- current_line = current_line.replace("$GODOT_BASE", p_name);
+ current_line = current_line.replace("$GODOT_TOTAL_MEMORY", itos(memory_mb * 1024 * 1024));
+ current_line = current_line.replace("$GODOT_BASENAME", p_name);
current_line = current_line.replace("$GODOT_HEAD_INCLUDE", p_preset->get("html/head_include"));
current_line = current_line.replace("$GODOT_DEBUG_ENABLED", p_debug ? "true" : "false");
str_export += current_line + "\n";
@@ -114,28 +114,6 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re
}
}
-void EditorExportPlatformJavaScript::_fix_fsloader_js(Vector<uint8_t> &p_js, const String &p_pack_name, uint64_t p_pack_size) {
-
- String str_template = String::utf8(reinterpret_cast<const char *>(p_js.ptr()), p_js.size());
- String str_export;
- Vector<String> lines = str_template.split("\n");
- for (int i = 0; i < lines.size(); i++) {
- if (lines[i].find("$GODOT_PACK_NAME") != -1) {
- str_export += lines[i].replace("$GODOT_PACK_NAME", p_pack_name);
- } else if (lines[i].find("$GODOT_PACK_SIZE") != -1) {
- str_export += lines[i].replace("$GODOT_PACK_SIZE", itos(p_pack_size));
- } else {
- str_export += lines[i] + "\n";
- }
- }
-
- CharString cs = str_export.utf8();
- p_js.resize(cs.length());
- for (int i = 0; i < cs.length(); i++) {
- p_js[i] = cs[i];
- }
-}
-
void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
if (p_preset->get("texture_format/s3tc")) {
@@ -286,10 +264,6 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese
_fix_html(data, p_preset, p_path.get_file().get_basename(), p_debug);
file = p_path.get_file();
- } else if (file == "godotfs.js") {
-
- _fix_fsloader_js(data, pck_path.get_file(), pack_size);
- file = p_path.get_file().get_basename() + "fs.js";
} else if (file == "godot.js") {
file = p_path.get_file().get_basename() + ".js";
diff --git a/platform/javascript/godot_shell.html b/platform/javascript/godot_shell.html
deleted file mode 100644
index ee7399a129..0000000000
--- a/platform/javascript/godot_shell.html
+++ /dev/null
@@ -1,347 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
-<head>
- <meta charset="utf-8" />
- <title></title>
- <style type="text/css">
- body {
- margin: 0;
- border: 0 none;
- padding: 0;
- text-align: center;
- background-color: #222226;
- font-family: 'Droid Sans', Arial, sans-serif;
- }
-
-
- /* Godot Engine default theme style
- * ================================ */
-
- .godot {
- color: #e0e0e0;
- background-color: #3b3943;
- background-image: linear-gradient(to bottom, #403e48, #35333c);
- border: 1px solid #45434e;
- box-shadow: 0 0 1px 1px #2f2d35;
- }
-
- button.godot {
- font-family: 'Droid Sans', Arial, sans-serif; /* override user agent style */
- padding: 1px 5px;
- background-color: #37353f;
- background-image: linear-gradient(to bottom, #413e49, #3a3842);
- border: 1px solid #514f5d;
- border-radius: 1px;
- box-shadow: 0 0 1px 1px #2a2930;
- }
-
- button.godot:hover {
- color: #f0f0f0;
- background-color: #44414e;
- background-image: linear-gradient(to bottom, #494652, #423f4c);
- border: 1px solid #5a5667;
- box-shadow: 0 0 1px 1px #26252b;
- }
-
- button.godot:active {
- color: #fff;
- background-color: #3e3b46;
- background-image: linear-gradient(to bottom, #36343d, #413e49);
- border: 1px solid #4f4c59;
- box-shadow: 0 0 1px 1px #26252b;
- }
-
- button.godot:disabled {
- color: rgba(230, 230, 230, 0.2);
- background-color: #3d3d3d;
- background-image: linear-gradient(to bottom, #434343, #393939);
- border: 1px solid #474747;
- box-shadow: 0 0 1px 1px #2d2b33;
- }
-
-
- /* Canvas / wrapper
- * ================ */
-
- #container {
- display: inline-block; /* scale with canvas */
- vertical-align: top; /* prevent extra height */
- position: relative; /* root for absolutely positioned overlay */
- margin: 0;
- border: 0 none;
- padding: 0;
- background-color: #0c0c0c;
- }
-
- #canvas {
- display: block;
- margin: 0 auto;
- /* canvas must have border and padding set to zero to
- * calculate cursor coordinates correctly */
- border: 0 none;
- padding: 0;
- color: white;
- }
-
- #canvas:focus {
- outline: none;
- }
-
-
- /* Status display
- * ============== */
-
- #status-container {
- position: absolute;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- /* don't consume click events - make children visible explicitly */
- visibility: hidden;
- }
-
- #status {
- line-height: 1.3;
- cursor: pointer;
- visibility: visible;
- padding: 4px 6px;
- }
-
-
- /* Debug output
- * ============ */
-
- #output-panel {
- display: none;
- max-width: 700px;
- font-size: small;
- margin: 6px auto 0;
- padding: 0 4px 4px;
- text-align: left;
- line-height: 2.2;
- }
-
- #output-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- #output-container {
- padding: 6px;
- background-color: #2c2a32;
- box-shadow: inset 0 0 1px 1px #232127;
- color: #bbb;
- }
-
- #output-scroll {
- line-height: 1;
- height: 12em;
- overflow-y: scroll;
- white-space: pre-wrap;
- font-size: small;
- font-family: "Lucida Console", Monaco, monospace;
- }
- </style>
-$GODOT_HEAD_INCLUDE
-</head>
-<body>
- <div id="container">
- <canvas id="canvas" width="640" height="480" tabindex="0" oncontextmenu="event.preventDefault();">
- HTML5 canvas appears to be unsupported in the current browser.<br />
- Please try updating or use a different browser.
- </canvas>
- <div id="status-container">
- <span id="status" class="godot" onclick="this.style.visibility='hidden';">Downloading page...</span>
- </div>
- </div>
- <div id="output-panel" class="godot">
- <div id="output-header">
- Output:
- <button class="godot" type="button" autocomplete="off" onclick="Presentation.clearOutput();">Clear</button>
- </div>
- <div id="output-container"><div id="output-scroll"></div></div>
- </div>
-
- <!-- Scripts -->
- <script type="text/javascript">//<![CDATA[
- var Presentation = (function() {
- var statusElement = document.getElementById("status");
- var canvasElement = document.getElementById("canvas");
-
- var presentation = {
- postRun: [],
- setStatusVisible: function setStatusVisible(visible) {
- statusElement.style.visibility = (visible ? "visible" : "hidden");
- },
- setStatus: function setStatus(text) {
- if (text.length === 0) {
- // emscripten sets empty string as status after "Running..."
- // per timeout, but another status may have been set by then
- if (Presentation.setStatus.lastText === "Running...")
- Presentation.setStatusVisible(false);
- return;
- }
- Presentation.setStatus.lastText = text;
- while (statusElement.lastChild) {
- statusElement.removeChild(statusElement.lastChild);
- }
- var lines = text.split("\n");
- lines.forEach(function(line, index) {
- statusElement.appendChild(document.createTextNode(line));
- statusElement.appendChild(document.createElement("br"));
- });
- var closeNote = document.createElement("span");
- closeNote.style.fontSize = "small";
- closeNote.textContent = "click to close";
- statusElement.appendChild(closeNote);
- Presentation.setStatusVisible(true);
- },
- isWebGL2Available: function isWebGL2Available() {
- var context;
- try {
- context = canvasElement.getContext("webgl2") || canvasElement.getContext("experimental-webgl2");
- } catch (e) {}
- return !!context;
- },
- };
-
- window.onerror = function(event) { presentation.setStatus("Failure during start-up\nSee JavaScript console") };
-
- if ($GODOT_DEBUG_ENABLED) { // debugging enabled
- var outputRoot = document.getElementById("output-panel");
- var outputElement = document.getElementById("output-scroll");
- const maxOutputMessages = 400;
-
- presentation.setOutputVisible = function setOutputVisible(visible) {
- outputRoot.style.display = (visible ? "block" : "none");
- };
- presentation.clearOutput = function clearOutput() {
- while (outputElement.firstChild) {
- outputElement.firstChild.remove();
- }
- };
-
- presentation.setOutputVisible(true);
-
- presentation.print = function print(text) {
- if (arguments.length > 1) {
- text = Array.prototype.slice.call(arguments).join(" ");
- }
- if (text.length <= 0) return;
- while (outputElement.childElementCount >= maxOutputMessages) {
- outputElement.firstChild.remove();
- }
- var msg = document.createElement("div");
- if (String.prototype.trim.call(text).startsWith("**ERROR**")
- || String.prototype.trim.call(text).startsWith("**EXCEPTION**")) {
- msg.style.color = "#d44";
- } else if (String.prototype.trim.call(text).startsWith("**WARNING**")) {
- msg.style.color = "#ccc000";
- } else if (String.prototype.trim.call(text).startsWith("**SCRIPT ERROR**")) {
- msg.style.color = "#c6d";
- }
- msg.textContent = text;
- var scrollToBottom = outputElement.scrollHeight - (outputElement.clientHeight + outputElement.scrollTop) < 10;
- outputElement.appendChild(msg);
- if (scrollToBottom) {
- outputElement.scrollTop = outputElement.scrollHeight;
- }
- };
-
- presentation.postRun.push(function() {
- window.onerror = function(event) { presentation.print("**EXCEPTION**:", event) };
- });
-
- } else {
- presentation.postRun.push(function() { window.onerror = null; });
- }
-
- return presentation;
- })();
-
- // Emscripten interface
- var Module = (function() {
- const BASE_NAME = '$GODOT_BASE';
- var module = {
- thisProgram: BASE_NAME,
- wasmBinaryFile: BASE_NAME + '.wasm',
- TOTAL_MEMORY: $GODOT_TMEM,
- print: function print(text) {
- if (arguments.length > 1) {
- text = Array.prototype.slice.call(arguments).join(" ");
- }
- console.log(text);
- if (typeof Presentation !== "undefined" && typeof Presentation.print === "function") {
- Presentation.print(text);
- }
- },
- printErr: function printErr(text) {
- if (arguments.length > 1) {
- text = Array.prototype.slice.call(arguments).join(" ");
- }
- console.error(text);
- if (typeof Presentation !== "undefined" && typeof Presentation.print === "function") {
- Presentation.print("**ERROR**:", text)
- }
- },
- canvas: document.getElementById("canvas"),
- setStatus: function setStatus(text) {
- var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
- var now = Date.now();
- if (m) {
- if (now - Date.now() < 30) // if this is a progress update, skip it if too soon
- return;
- text = m[1];
- }
- if (typeof Presentation !== "undefined" && typeof Presentation.setStatus == "function") {
- Presentation.setStatus(text);
- }
- }
- };
-
- // As a default initial behavior, pop up an alert when WebGL context is lost. To make your
- // application robust, you may want to override this behavior before shipping!
- // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
- module.canvas.addEventListener("webglcontextlost", function(e) { alert("WebGL context lost. Plase reload the page."); e.preventDefault(); }, false);
-
- if (typeof Presentation !== "undefined" && Presentation.postRun instanceof Array) {
- module.postRun = Presentation.postRun;
- }
-
- return module;
- })();
-
- if (!Presentation.isWebGL2Available()) {
- Presentation.setStatus("WebGL 2 appears to be unsupported.\nPlease update browser and drivers.");
- Presentation.preventLoading = true;
- } else {
- Presentation.setStatus("Downloading...");
- }
-
- if (Presentation.preventLoading) {
- // prevent *fs.js and Emscripten's SCRIPT placeholder from loading any files
- Presentation._XHR_send = XMLHttpRequest.prototype.send;
- XMLHttpRequest.prototype.send = function() {};
- Presentation._Node_appendChild = Node.prototype.appendChild;
- Node.prototype.appendChild = function(node) {
- if (!(node instanceof HTMLScriptElement)) {
- return Presentation._Node_appendChild.call(this, node);
- }
- }
- }
- //]]></script>
- <script type="text/javascript" src="$GODOT_BASEfs.js"></script>
-{{{ SCRIPT }}}
- <script type="text/javascript">
- if (Presentation.preventLoading) {
- XMLHttpRequest.prototype.send = Presentation._XHR_send;
- Node.prototype.appendChild = Presentation._Node_appendChild;
- }
- </script>
-</body>
-</html>
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index ac8d367366..67d2a6e369 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -464,11 +464,7 @@ void OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, i
print_line("Init Audio");
AudioDriverManager::add_driver(&audio_driver_javascript);
- audio_driver_javascript.set_singleton();
- if (audio_driver_javascript.init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
@@ -976,7 +972,7 @@ String OS_JavaScript::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
-PowerState OS_JavaScript::get_power_state() {
+OS::PowerState OS_JavaScript::get_power_state() {
return power_manager->get_power_state();
}
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index f78a3f2768..4c6469cb58 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -165,7 +165,7 @@ public:
virtual String get_joy_guid(int p_device) const;
bool joy_connection_changed(int p_type, const EmscriptenGamepadEvent *p_event);
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
diff --git a/platform/javascript/power_javascript.cpp b/platform/javascript/power_javascript.cpp
index 3d54146595..10964502d4 100644
--- a/platform/javascript/power_javascript.cpp
+++ b/platform/javascript/power_javascript.cpp
@@ -36,12 +36,12 @@ bool PowerJavascript::UpdatePowerInfo() {
return false;
}
-PowerState PowerJavascript::get_power_state() {
+OS::PowerState PowerJavascript::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN");
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -64,7 +64,7 @@ int PowerJavascript::get_power_percent_left() {
}
PowerJavascript::PowerJavascript()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerJavascript::~PowerJavascript() {
diff --git a/platform/javascript/power_javascript.h b/platform/javascript/power_javascript.h
index 834d765557..8454c5d728 100644
--- a/platform/javascript/power_javascript.h
+++ b/platform/javascript/power_javascript.h
@@ -31,13 +31,13 @@
#ifndef PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
#define PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
-#include "os/power.h"
+#include "os/os.h"
class PowerJavascript {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool UpdatePowerInfo();
@@ -45,7 +45,7 @@ public:
PowerJavascript();
virtual ~PowerJavascript();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/javascript/pre_asmjs.js b/platform/javascript/pre_asmjs.js
new file mode 100644
index 0000000000..3c497721b6
--- /dev/null
+++ b/platform/javascript/pre_asmjs.js
@@ -0,0 +1,3 @@
+var Engine = {
+ USING_WASM: false,
+ RuntimeEnvironment: function(Module) {
diff --git a/platform/javascript/pre_wasm.js b/platform/javascript/pre_wasm.js
new file mode 100644
index 0000000000..be4383c8c9
--- /dev/null
+++ b/platform/javascript/pre_wasm.js
@@ -0,0 +1,3 @@
+var Engine = {
+ USING_WASM: true,
+ RuntimeEnvironment: function(Module) {
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index 27117c2e8d..5b2de54535 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -3,6 +3,7 @@
Import('env')
files = [
+ 'crash_handler_osx.mm',
'os_osx.mm',
'godot_main_osx.mm',
'audio_driver_osx.cpp',
@@ -12,4 +13,8 @@ files = [
'power_osx.cpp',
]
-env.Program('#bin/godot', files)
+prog = env.Program('#bin/godot', files)
+if (env['target'] == "debug" or env['target'] == "release_debug"):
+ # Build the .dSYM file for atos
+ action = "dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM"
+ env.AddPostAction(prog, action)
diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp
index 78c52af201..3b3ba60507 100644
--- a/platform/osx/audio_driver_osx.cpp
+++ b/platform/osx/audio_driver_osx.cpp
@@ -58,14 +58,14 @@ Error AudioDriverOSX::initDevice() {
AudioStreamBasicDescription strdesc;
- // TODO: Implement this
- /*zeromem(&strdesc, sizeof(strdesc));
+ zeromem(&strdesc, sizeof(strdesc));
UInt32 size = sizeof(strdesc);
result = AudioUnitGetProperty(audio_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, kOutputBus, &strdesc, &size);
ERR_FAIL_COND_V(result != noErr, FAILED);
switch (strdesc.mChannelsPerFrame) {
case 2: // Stereo
+ case 4: // Surround 3.1
case 6: // Surround 5.1
case 8: // Surround 7.1
channels = strdesc.mChannelsPerFrame;
@@ -75,7 +75,7 @@ Error AudioDriverOSX::initDevice() {
// Unknown number of channels, default to stereo
channels = 2;
break;
- }*/
+ }
mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
@@ -103,7 +103,8 @@ Error AudioDriverOSX::initDevice() {
samples_in.resize(buffer_size);
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ print_line("CoreAudio: detected " + itos(channels) + " channels");
+ print_line("CoreAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
}
AURenderCallbackStruct callback;
@@ -242,7 +243,7 @@ int AudioDriverOSX::get_mix_rate() const {
};
AudioDriver::SpeakerMode AudioDriverOSX::get_speaker_mode() const {
- return SPEAKER_MODE_STEREO;
+ return get_speaker_mode_by_total_channels(channels);
};
void AudioDriverOSX::lock() {
diff --git a/core/os/power.h b/platform/osx/crash_handler_osx.h
index 59a091012e..ff037e6b7a 100644
--- a/core/os/power.h
+++ b/platform/osx/crash_handler_osx.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* power.h */
+/* crash_handler_osx.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,16 +27,21 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifndef CRASH_HANDLER_OSX_H
+#define CRASH_HANDLER_OSX_H
-#ifndef CORE_OS_POWER_H_
-#define CORE_OS_POWER_H_
+class CrashHandler {
-typedef enum {
- POWERSTATE_UNKNOWN, /**< cannot determine power status */
- POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
- POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
- POWERSTATE_CHARGING, /**< Plugged in, charging battery */
- POWERSTATE_CHARGED /**< Plugged in, battery charged */
-} PowerState;
+ bool disabled;
-#endif /* CORE_OS_POWER_H_ */
+public:
+ void initialize();
+
+ void disable();
+ bool is_disabled() const { return disabled; };
+
+ CrashHandler();
+ ~CrashHandler();
+};
+
+#endif
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
new file mode 100644
index 0000000000..9239573734
--- /dev/null
+++ b/platform/osx/crash_handler_osx.mm
@@ -0,0 +1,178 @@
+/*************************************************************************/
+/* crash_handler_osx.mm */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "main/main.h"
+#include "os_osx.h"
+
+#include <string.h>
+#include <unistd.h>
+
+// Note: Dump backtrace in 32bit mode is getting a bus error on the fgets by the ->execute, so enable only on 64bit
+#if defined(DEBUG_ENABLED) && defined(__x86_64__)
+#define CRASH_HANDLER_ENABLED 1
+#endif
+
+#ifdef CRASH_HANDLER_ENABLED
+#include <cxxabi.h>
+#include <dlfcn.h>
+#include <execinfo.h>
+#include <signal.h>
+
+#include <mach-o/dyld.h>
+#include <mach-o/getsect.h>
+
+#ifdef __x86_64__
+static uint64_t load_address() {
+ const struct segment_command_64 *cmd = getsegbyname("__TEXT");
+#else
+static uint32_t load_address() {
+ const struct segment_command *cmd = getsegbyname("__TEXT");
+#endif
+ char full_path[1024];
+ uint32_t size = sizeof(full_path);
+
+ if (cmd && !_NSGetExecutablePath(full_path, &size)) {
+ uint32_t dyld_count = _dyld_image_count();
+ for (uint32_t i = 0; i < dyld_count; i++) {
+ const char *image_name = _dyld_get_image_name(i);
+ if (image_name && strncmp(image_name, full_path, 1024) == 0) {
+ return cmd->vmaddr + _dyld_get_image_vmaddr_slide(i);
+ }
+ }
+ }
+
+ return 0;
+}
+
+static void handle_crash(int sig) {
+ if (OS::get_singleton() == NULL)
+ return;
+
+ void *bt_buffer[256];
+ size_t size = backtrace(bt_buffer, 256);
+ String _execpath = OS::get_singleton()->get_executable_path();
+ String msg = GLOBAL_GET("debug/settings/backtrace/message");
+
+ // Dump the backtrace to stderr with a message to the user
+ fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);
+ fprintf(stderr, "Dumping the backtrace. %ls\n", msg.c_str());
+ char **strings = backtrace_symbols(bt_buffer, size);
+ if (strings) {
+ void *load_addr = (void *)load_address();
+
+ for (int i = 1; i < size; i++) {
+ char fname[1024];
+ Dl_info info;
+
+ snprintf(fname, 1024, "%s", strings[i]);
+
+ // Try to demangle the function name to provide a more readable one
+ if (dladdr(bt_buffer[i], &info) && info.dli_sname) {
+ if (info.dli_sname[0] == '_') {
+ int status;
+ char *demangled = abi::__cxa_demangle(info.dli_sname, NULL, 0, &status);
+
+ if (status == 0 && demangled) {
+ snprintf(fname, 1024, "%s", demangled);
+ }
+
+ if (demangled)
+ free(demangled);
+ }
+ }
+
+ String output = fname;
+
+ // Try to get the file/line number using atos
+ if (bt_buffer[i] > (void *)0x0 && OS::get_singleton()) {
+ List<String> args;
+ char str[1024];
+
+ args.push_back("-o");
+ args.push_back(_execpath);
+ args.push_back("-arch");
+#ifdef __x86_64__
+ args.push_back("x86_64");
+#else
+ args.push_back("i386");
+#endif
+ args.push_back("-l");
+ snprintf(str, 1024, "%p", load_addr);
+ args.push_back(str);
+ snprintf(str, 1024, "%p", bt_buffer[i]);
+ args.push_back(str);
+
+ int ret;
+ String out = "";
+ Error err = OS::get_singleton()->execute(String("atos"), args, true, NULL, &out, &ret);
+ if (err == OK && out.substr(0, 2) != "0x") {
+ out.erase(out.length() - 1, 1);
+ output = out;
+ }
+ }
+
+ fprintf(stderr, "[%d] %ls\n", i, output.c_str());
+ }
+
+ free(strings);
+ }
+ fprintf(stderr, "-- END OF BACKTRACE --\n");
+
+ // Abort to pass the error to the OS
+ abort();
+}
+#endif
+
+CrashHandler::CrashHandler() {
+ disabled = false;
+}
+
+CrashHandler::~CrashHandler() {
+}
+
+void CrashHandler::disable() {
+ if (disabled)
+ return;
+
+#ifdef CRASH_HANDLER_ENABLED
+ signal(SIGSEGV, NULL);
+ signal(SIGFPE, NULL);
+ signal(SIGILL, NULL);
+#endif
+
+ disabled = true;
+}
+
+void CrashHandler::initialize() {
+#ifdef CRASH_HANDLER_ENABLED
+ signal(SIGSEGV, handle_crash);
+ signal(SIGFPE, handle_crash);
+ signal(SIGILL, handle_crash);
+#endif
+}
diff --git a/platform/osx/dir_access_osx.h b/platform/osx/dir_access_osx.h
index c988dfe425..9a7773f5ee 100644
--- a/platform/osx/dir_access_osx.h
+++ b/platform/osx/dir_access_osx.h
@@ -46,6 +46,9 @@
class DirAccessOSX : public DirAccessUnix {
protected:
virtual String fix_unicode_name(const char *p_name) const;
+
+ virtual int get_drive_count();
+ virtual String get_drive(int p_drive);
};
#endif //UNIX ENABLED
diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm
index 6e8ceb5e19..6121e6ccfb 100644
--- a/platform/osx/dir_access_osx.mm
+++ b/platform/osx/dir_access_osx.mm
@@ -33,7 +33,8 @@
#include <errno.h>
-#include <Foundation/NSString.h>
+#include <AppKit/NSWorkspace.h>
+#include <Foundation/Foundation.h>
String DirAccessOSX::fix_unicode_name(const char *p_name) const {
@@ -45,4 +46,19 @@ String DirAccessOSX::fix_unicode_name(const char *p_name) const {
return fname;
}
+int DirAccessOSX::get_drive_count() {
+ NSArray *vols = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];
+ return [vols count];
+}
+
+String DirAccessOSX::get_drive(int p_drive) {
+ NSArray *vols = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];
+ int count = [vols count];
+
+ ERR_FAIL_INDEX_V(p_drive, count, "");
+
+ NSString *path = vols[p_drive];
+ return String([path UTF8String]);
+}
+
#endif //posix_enabled
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 7f749030ec..2ec76fe0dd 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -88,8 +88,15 @@ public:
};
void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
-
- // what does this need to do?
+ if (p_preset->get("texture_format/s3tc")) {
+ r_features->push_back("s3tc");
+ }
+ if (p_preset->get("texture_format/etc")) {
+ r_features->push_back("etc");
+ }
+ if (p_preset->get("texture_format/etc2")) {
+ r_features->push_back("etc2");
+ }
}
void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) {
@@ -112,6 +119,10 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/identity"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements"), ""));
#endif
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false));
}
void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data) {
diff --git a/platform/osx/godot_main_osx.mm b/platform/osx/godot_main_osx.mm
index 83d782cc2f..e2740fc666 100644
--- a/platform/osx/godot_main_osx.mm
+++ b/platform/osx/godot_main_osx.mm
@@ -35,7 +35,6 @@
#include <unistd.h>
int main(int argc, char **argv) {
-
int first_arg = 1;
const char *dbg_arg = "-NSDocumentRevisionsDebugMode";
printf("arguments\n");
@@ -74,6 +73,13 @@ int main(int argc, char **argv) {
}
}
+#ifdef DEBUG_ENABLED
+ // lets report the path we made current after all that
+ char cwd[4096];
+ getcwd(cwd, 4096);
+ printf("Current path: %s\n", cwd);
+#endif
+
OS_OSX os;
Error err = Main::setup(argv[0], argc - first_arg, &argv[first_arg]);
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index ebaebd84ce..059dd5afd0 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -30,6 +30,7 @@
#ifndef OS_OSX_H
#define OS_OSX_H
+#include "crash_handler_osx.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/unix/os_unix.h"
@@ -110,6 +111,8 @@ public:
power_osx *power_manager;
+ CrashHandler crash_handler;
+
float _mouse_scale(float p_scale) {
if (display_scale > 1.0)
return p_scale;
@@ -181,6 +184,7 @@ public:
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const;
virtual String get_executable_path() const;
+ virtual String get_resource_dir() const;
virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
@@ -212,7 +216,7 @@ public:
virtual void set_ime_position(const Point2 &p_pos);
virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp);
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
@@ -223,6 +227,9 @@ public:
void set_mouse_mode(MouseMode p_mode);
MouseMode get_mouse_mode() const;
+ void disable_crash_handler();
+ bool is_disable_crash_handler() const;
+
OS_OSX();
};
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index f502fb9a9c..111cdb0cf1 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -910,6 +910,8 @@ OS::VideoMode OS_OSX::get_default_video_mode() const {
void OS_OSX::initialize_core() {
+ crash_handler.initialize();
+
OS_Unix::initialize_core();
DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_RESOURCES);
@@ -1086,12 +1088,7 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
visual_server->init();
// visual_server->cursor_set_visible(false, 0);
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
//
physics_server = memnew(PhysicsServerSW);
@@ -1736,6 +1733,17 @@ String OS_OSX::get_executable_path() const {
}
}
+String OS_OSX::get_resource_dir() const {
+ // start with our executable path
+ String path = get_executable_path();
+
+ int pos = path.find_last("/Contents/MacOS/");
+ if (pos < 0)
+ return OS::get_resource_dir();
+
+ return path.substr(0, pos) + "/Contents/Resources/";
+}
+
// Returns string representation of keys, if they are printable.
//
static NSString *createStringForKeys(const CGKeyCode *keyCode, int length) {
@@ -1901,7 +1909,7 @@ String OS_OSX::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
-PowerState OS_OSX::get_power_state() {
+OS::PowerState OS_OSX::get_power_state() {
return power_manager->get_power_state();
}
@@ -2011,3 +2019,11 @@ OS_OSX::OS_OSX() {
bool OS_OSX::_check_internal_feature_support(const String &p_feature) {
return p_feature == "pc" || p_feature == "s3tc";
}
+
+void OS_OSX::disable_crash_handler() {
+ crash_handler.disable();
+}
+
+bool OS_OSX::is_disable_crash_handler() const {
+ return crash_handler.is_disabled();
+}
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index 5f3938cb91..eed03e63c1 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -174,7 +174,7 @@ bool power_osx::GetPowerInfo_MacOSX() {
nsecs_left = -1;
percent_left = -1;
- power_state = POWERSTATE_UNKNOWN;
+ power_state = OS::POWERSTATE_UNKNOWN;
if (blob != NULL) {
CFArrayRef list = IOPSCopyPowerSourcesList(blob);
@@ -194,13 +194,13 @@ bool power_osx::GetPowerInfo_MacOSX() {
}
if (!have_battery) {
- power_state = POWERSTATE_NO_BATTERY;
+ power_state = OS::POWERSTATE_NO_BATTERY;
} else if (charging) {
- power_state = POWERSTATE_CHARGING;
+ power_state = OS::POWERSTATE_CHARGING;
} else if (have_ac) {
- power_state = POWERSTATE_CHARGED;
+ power_state = OS::POWERSTATE_CHARGED;
} else {
- power_state = POWERSTATE_ON_BATTERY;
+ power_state = OS::POWERSTATE_ON_BATTERY;
}
CFRelease(list);
@@ -218,11 +218,11 @@ bool power_osx::UpdatePowerInfo() {
return false;
}
-PowerState power_osx::get_power_state() {
+OS::PowerState power_osx::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -243,7 +243,7 @@ int power_osx::get_power_percent_left() {
}
power_osx::power_osx()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
power_osx::~power_osx() {
diff --git a/platform/osx/power_osx.h b/platform/osx/power_osx.h
index 692c850d7c..20e47e9cd9 100644
--- a/platform/osx/power_osx.h
+++ b/platform/osx/power_osx.h
@@ -33,7 +33,7 @@
#include "dir_access_osx.h"
#include "os/file_access.h"
-#include "os/power.h"
+#include "os/os.h"
#include <CoreFoundation/CoreFoundation.h>
class power_osx {
@@ -41,7 +41,7 @@ class power_osx {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
void checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging);
bool GetPowerInfo_MacOSX(/*PowerState * state, int *seconds, int *percent*/);
bool UpdatePowerInfo();
@@ -50,7 +50,7 @@ public:
power_osx();
virtual ~power_osx();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 44034e815d..300c5cffcc 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -62,12 +62,7 @@ void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p
//visual_server = memnew( VisualServerRaster(rasterizer) );
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
sample_manager = memnew(SampleManagerMallocSW);
audio_server = memnew(AudioServerSW(sample_manager));
@@ -200,7 +195,7 @@ void OS_Server::move_window_to_foreground() {
void OS_Server::set_cursor_shape(CursorShape p_shape) {
}
-PowerState OS_Server::get_power_state() {
+OS::PowerState OS_Server::get_power_state() {
return power_manager->get_power_state();
}
@@ -232,7 +227,6 @@ void OS_Server::run() {
OS_Server::OS_Server() {
- AudioDriverManager::add_driver(&driver_dummy);
//adriver here
grab = false;
};
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index f3db053be3..ba12f649be 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -34,7 +34,6 @@
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/unix/os_unix.h"
#include "main/input_default.h"
-#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio_server.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_server.h"
@@ -55,7 +54,6 @@ class OS_Server : public OS_Unix {
List<String> args;
MainLoop *main_loop;
- AudioDriverDummy driver_dummy;
bool grab;
PhysicsServer *physics_server;
@@ -106,7 +104,7 @@ public:
void run();
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index a2be126c58..25d44c24b5 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -466,8 +466,6 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
EditorNode::progress_task_step(progress_task, "File: " + p_file_name, (p_file_no * 100) / p_total_files);
}
- bool do_hash = p_file_name != "AppxSignature.p7x";
-
FileMeta meta;
meta.name = p_file_name;
meta.uncompressed_size = p_len;
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 3a8932aae2..b909ccccd6 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -268,12 +268,7 @@ void OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_aud
joypad = ref new JoypadUWP(input);
joypad->register_events();
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
power_manager = memnew(PowerUWP);
@@ -855,7 +850,7 @@ bool OSUWP::_check_internal_feature_support(const String &p_feature) {
return p_feature == "pc" || p_feature == "s3tc";
}
-PowerState OSUWP::get_power_state() {
+OS::PowerState OSUWP::get_power_state() {
return power_manager->get_power_state();
}
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 5f36396017..a7a5d32cb9 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -259,7 +259,7 @@ public:
void input_event(const Ref<InputEvent> &p_event);
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
diff --git a/platform/uwp/power_uwp.cpp b/platform/uwp/power_uwp.cpp
index 07a726647d..81e97b1391 100644
--- a/platform/uwp/power_uwp.cpp
+++ b/platform/uwp/power_uwp.cpp
@@ -31,7 +31,7 @@
#include "power_uwp.h"
PowerUWP::PowerUWP()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerUWP::~PowerUWP() {
@@ -47,12 +47,12 @@ bool PowerUWP::UpdatePowerInfo() {
return false;
}
-PowerState PowerUWP::get_power_state() {
+OS::PowerState PowerUWP::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN");
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
diff --git a/platform/uwp/power_uwp.h b/platform/uwp/power_uwp.h
index 9a9811a4f5..0c57689c50 100644
--- a/platform/uwp/power_uwp.h
+++ b/platform/uwp/power_uwp.h
@@ -33,14 +33,14 @@
#include "os/dir_access.h"
#include "os/file_access.h"
-#include "os/power.h"
+#include "os/os.h"
class PowerUWP {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool UpdatePowerInfo();
@@ -48,7 +48,7 @@ public:
PowerUWP();
virtual ~PowerUWP();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index befbe00183..b56a5c6a80 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -5,6 +5,7 @@ Import('env')
common_win = [
"context_gl_win.cpp",
+ "crash_handler_win.cpp",
"os_windows.cpp",
"ctxgl_procaddr.cpp",
"key_mapping_win.cpp",
@@ -12,7 +13,7 @@ common_win = [
"packet_peer_udp_winsock.cpp",
"stream_peer_winsock.cpp",
"joypad.cpp",
- "power_windows.cpp",
+ "power_windows.cpp",
]
restarget = "godot_res" + env["OBJSUFFIX"]
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp
index 328b987f1f..8640f27699 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_win.cpp
@@ -130,24 +130,28 @@ Error ContextGL_Win::initialize() {
0, 0, 0 // Layer Masks Ignored
};
- if (!(hDC = GetDC(hWnd))) {
+ hDC = GetDC(hWnd);
+ if (!hDC) {
MessageBox(NULL, "Can't Create A GL Device Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return FALSE
}
- if (!(pixel_format = ChoosePixelFormat(hDC, &pfd))) // Did Windows Find A Matching Pixel Format?
+ pixel_format = ChoosePixelFormat(hDC, &pfd);
+ if (!pixel_format) // Did Windows Find A Matching Pixel Format?
{
MessageBox(NULL, "Can't Find A Suitable pixel_format.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return FALSE
}
- if (!SetPixelFormat(hDC, pixel_format, &pfd)) // Are We Able To Set The Pixel Format?
+ BOOL ret = SetPixelFormat(hDC, pixel_format, &pfd);
+ if (!ret) // Are We Able To Set The Pixel Format?
{
MessageBox(NULL, "Can't Set The pixel_format.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return FALSE
}
- if (!(hRC = wglCreateContext(hDC))) // Are We Able To Get A Rendering Context?
+ hRC = wglCreateContext(hDC);
+ if (!hRC) // Are We Able To Get A Rendering Context?
{
MessageBox(NULL, "Can't Create A Temporary GL Rendering Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return FALSE
@@ -175,8 +179,8 @@ Error ContextGL_Win::initialize() {
return ERR_CANT_CREATE;
}
- HGLRC new_hRC;
- if (!(new_hRC = wglCreateContextAttribsARB(hDC, 0, attribs))) {
+ HGLRC new_hRC = wglCreateContextAttribsARB(hDC, 0, attribs);
+ if (!new_hRC) {
wglDeleteContext(hRC);
MessageBox(NULL, "Can't Create An OpenGL 3.3 Rendering Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return ERR_CANT_CREATE; // Return false
diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_win.cpp
new file mode 100644
index 0000000000..c9385f36d6
--- /dev/null
+++ b/platform/windows/crash_handler_win.cpp
@@ -0,0 +1,211 @@
+/*************************************************************************/
+/* crash_handler_win.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "main/main.h"
+#include "os_windows.h"
+
+#ifdef CRASH_HANDLER_EXCEPTION
+
+// Backtrace code code based on: https://stackoverflow.com/questions/6205981/windows-c-stack-trace-from-a-running-app
+
+#include <psapi.h>
+#include <algorithm>
+#include <iterator>
+
+#pragma comment(lib, "psapi.lib")
+#pragma comment(lib, "dbghelp.lib")
+
+// Some versions of imagehlp.dll lack the proper packing directives themselves
+// so we need to do it.
+#pragma pack(push, before_imagehlp, 8)
+#include <imagehlp.h>
+#pragma pack(pop, before_imagehlp)
+
+struct module_data {
+ std::string image_name;
+ std::string module_name;
+ void *base_address;
+ DWORD load_size;
+};
+
+class symbol {
+ typedef IMAGEHLP_SYMBOL64 sym_type;
+ sym_type *sym;
+ static const int max_name_len = 1024;
+
+public:
+ symbol(HANDLE process, DWORD64 address)
+ : sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
+ memset(sym, '\0', sizeof(*sym) + max_name_len);
+ sym->SizeOfStruct = sizeof(*sym);
+ sym->MaxNameLength = max_name_len;
+ DWORD64 displacement;
+
+ SymGetSymFromAddr64(process, address, &displacement, sym);
+ }
+
+ std::string name() { return std::string(sym->Name); }
+ std::string undecorated_name() {
+ if (*sym->Name == '\0')
+ return "<couldn't map PC to fn name>";
+ std::vector<char> und_name(max_name_len);
+ UnDecorateSymbolName(sym->Name, &und_name[0], max_name_len, UNDNAME_COMPLETE);
+ return std::string(&und_name[0], strlen(&und_name[0]));
+ }
+};
+
+class get_mod_info {
+ HANDLE process;
+
+public:
+ get_mod_info(HANDLE h)
+ : process(h) {}
+
+ module_data operator()(HMODULE module) {
+ module_data ret;
+ char temp[4096];
+ MODULEINFO mi;
+
+ GetModuleInformation(process, module, &mi, sizeof(mi));
+ ret.base_address = mi.lpBaseOfDll;
+ ret.load_size = mi.SizeOfImage;
+
+ GetModuleFileNameEx(process, module, temp, sizeof(temp));
+ ret.image_name = temp;
+ GetModuleBaseName(process, module, temp, sizeof(temp));
+ ret.module_name = temp;
+ std::vector<char> img(ret.image_name.begin(), ret.image_name.end());
+ std::vector<char> mod(ret.module_name.begin(), ret.module_name.end());
+ SymLoadModule64(process, 0, &img[0], &mod[0], (DWORD64)ret.base_address, ret.load_size);
+ return ret;
+ }
+};
+
+DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
+ HANDLE process = GetCurrentProcess();
+ HANDLE hThread = GetCurrentThread();
+ DWORD offset_from_symbol = 0;
+ IMAGEHLP_LINE64 line = { 0 };
+ std::vector<module_data> modules;
+ DWORD cbNeeded;
+ std::vector<HMODULE> module_handles(1);
+
+ if (OS::get_singleton() == NULL || OS::get_singleton()->is_disable_crash_handler()) {
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+
+ fprintf(stderr, "%s: Program crashed\n", __FUNCTION__);
+
+ // Load the symbols:
+ if (!SymInitialize(process, NULL, false))
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ SymSetOptions(SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);
+ EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);
+ module_handles.resize(cbNeeded / sizeof(HMODULE));
+ EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);
+ std::transform(module_handles.begin(), module_handles.end(), std::back_inserter(modules), get_mod_info(process));
+ void *base = modules[0].base_address;
+
+ // Setup stuff:
+ CONTEXT *context = ep->ContextRecord;
+ STACKFRAME64 frame;
+ bool skip_first = false;
+
+ frame.AddrPC.Mode = AddrModeFlat;
+ frame.AddrStack.Mode = AddrModeFlat;
+ frame.AddrFrame.Mode = AddrModeFlat;
+
+#ifdef _M_X64
+ frame.AddrPC.Offset = context->Rip;
+ frame.AddrStack.Offset = context->Rsp;
+ frame.AddrFrame.Offset = context->Rbp;
+#else
+ frame.AddrPC.Offset = context->Eip;
+ frame.AddrStack.Offset = context->Esp;
+ frame.AddrFrame.Offset = context->Ebp;
+
+ // Skip the first one to avoid a duplicate on 32-bit mode
+ skip_first = true;
+#endif
+
+ line.SizeOfStruct = sizeof(line);
+ IMAGE_NT_HEADERS *h = ImageNtHeader(base);
+ DWORD image_type = h->FileHeader.Machine;
+ int n = 0;
+ String msg = GLOBAL_GET("debug/settings/backtrace/message");
+
+ fprintf(stderr, "Dumping the backtrace. %ls\n", msg.c_str());
+
+ do {
+ if (skip_first) {
+ skip_first = false;
+ } else {
+ if (frame.AddrPC.Offset != 0) {
+ std::string fnName = symbol(process, frame.AddrPC.Offset).undecorated_name();
+
+ if (SymGetLineFromAddr64(process, frame.AddrPC.Offset, &offset_from_symbol, &line))
+ fprintf(stderr, "[%d] %s (%s:%d)\n", n, fnName.c_str(), line.FileName, line.LineNumber);
+ else
+ fprintf(stderr, "[%d] %s\n", n, fnName.c_str());
+ } else
+ fprintf(stderr, "[%d] ???\n", n);
+
+ n++;
+ }
+
+ if (!StackWalk64(image_type, process, hThread, &frame, context, NULL, SymFunctionTableAccess64, SymGetModuleBase64, NULL))
+ break;
+ } while (frame.AddrReturn.Offset != 0 && n < 256);
+
+ fprintf(stderr, "-- END OF BACKTRACE --\n");
+
+ SymCleanup(process);
+
+ // Pass the exception to the OS
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+#endif
+
+CrashHandler::CrashHandler() {
+ disabled = false;
+}
+
+CrashHandler::~CrashHandler() {
+}
+
+void CrashHandler::disable() {
+ if (disabled)
+ return;
+
+ disabled = true;
+}
+
+void CrashHandler::initialize() {
+}
diff --git a/core/event_queue.h b/platform/windows/crash_handler_win.h
index af1a760945..0b1889e4fe 100644
--- a/core/event_queue.h
+++ b/platform/windows/crash_handler_win.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* event_queue.h */
+/* crash_handler_win.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,38 +27,30 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef EVENT_QUEUE_H
-#define EVENT_QUEUE_H
+#ifndef CRASH_HANDLER_WIN_H
+#define CRASH_HANDLER_WIN_H
-#include "object.h"
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class EventQueue {
+#include <windows.h>
- enum {
+// Crash handler exception only enabled with MSVC
+#if defined(DEBUG_ENABLED) && defined(MSVC)
+#define CRASH_HANDLER_EXCEPTION 1
- DEFAULT_EVENT_QUEUE_SIZE_KB = 256
- };
-
- struct Event {
+extern DWORD CrashHandlerException(EXCEPTION_POINTERS *ep);
+#endif
- uint32_t instance_ID;
- StringName method;
- int args;
- };
+class CrashHandler {
- uint8_t *event_buffer;
- uint32_t buffer_end;
- uint32_t buffer_max_used;
- uint32_t buffer_size;
+ bool disabled;
public:
- Error push_call(uint32_t p_instance_ID, const StringName &p_method, VARIANT_ARG_LIST);
- void flush_events();
+ void initialize();
+
+ void disable();
+ bool is_disabled() const { return disabled; };
- EventQueue(uint32_t p_buffer_size = DEFAULT_EVENT_QUEUE_SIZE_KB * 1024);
- ~EventQueue();
+ CrashHandler();
+ ~CrashHandler();
};
#endif
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index d239ccf7d2..5bd9a78f49 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -123,7 +123,7 @@ def configure(env):
env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['/Z7', '/DDEBUG_ENABLED', '/DDEBUG_MEMORY_ENABLED', '/DD3D_DEBUG_INFO', '/Od'])
+ env.Append(CCFLAGS=['/Z7', '/DDEBUG_ENABLED', '/DDEBUG_MEMORY_ENABLED', '/DD3D_DEBUG_INFO', '/Od', '/EHsc'])
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
env.Append(LINKFLAGS=['/DEBUG'])
@@ -226,10 +226,13 @@ def configure(env):
else:
env["PROGSUFFIX"] = env["PROGSUFFIX"] + ".exe" # for linux cross-compilation
- mingw_prefix = ""
-
if (env["bits"] == "default"):
- env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+ if (os.name == "nt"):
+ env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+ else: # default to 64-bit on Linux
+ env["bits"] = "64"
+
+ mingw_prefix = ""
if (env["bits"] == "32"):
env.Append(LINKFLAGS=['-static'])
diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_win.cpp
index d2ac6ecb50..4450cb3670 100644
--- a/platform/windows/godot_win.cpp
+++ b/platform/windows/godot_win.cpp
@@ -157,24 +157,32 @@ int widechar_main(int argc, wchar_t **argv) {
};
int main(int _argc, char **_argv) {
- // _argc and _argv are ignored
- // we are going to use the WideChar version of them instead
+// _argc and _argv are ignored
+// we are going to use the WideChar version of them instead
- LPWSTR *wc_argv;
- int argc;
- int result;
+#ifdef CRASH_HANDLER_EXCEPTION
+ __try {
+#endif
+ LPWSTR *wc_argv;
+ int argc;
+ int result;
- wc_argv = CommandLineToArgvW(GetCommandLineW(), &argc);
+ wc_argv = CommandLineToArgvW(GetCommandLineW(), &argc);
- if (NULL == wc_argv) {
- wprintf(L"CommandLineToArgvW failed\n");
- return 0;
- }
+ if (NULL == wc_argv) {
+ wprintf(L"CommandLineToArgvW failed\n");
+ return 0;
+ }
- result = widechar_main(argc, wc_argv);
+ result = widechar_main(argc, wc_argv);
- LocalFree(wc_argv);
- return result;
+ LocalFree(wc_argv);
+ return result;
+#ifdef CRASH_HANDLER_EXCEPTION
+ } __except (CrashHandlerException(GetExceptionInformation())) {
+ return 1;
+ }
+#endif
}
HINSTANCE godot_hinstance = NULL;
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad.cpp
index 00cfa812de..0c7358f499 100644
--- a/platform/windows/joypad.cpp
+++ b/platform/windows/joypad.cpp
@@ -379,7 +379,9 @@ void JoypadWindows::process_joypads() {
IDirectInputDevice8_Acquire(joy->di_joy);
joy->di_joy->Poll();
}
- if (FAILED(hr = joy->di_joy->GetDeviceState(sizeof(DIJOYSTATE2), &js))) {
+
+ hr = joy->di_joy->GetDeviceState(sizeof(DIJOYSTATE2), &js);
+ if (FAILED(hr)) {
//printf("failed to read joy #%d\n", i);
continue;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index deb9c25576..461caf479c 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -164,6 +164,8 @@ const char *OS_Windows::get_audio_driver_name(int p_driver) const {
void OS_Windows::initialize_core() {
+ crash_handler.initialize();
+
last_button_state = 0;
//RedirectIOToConsole();
@@ -887,6 +889,12 @@ static int QueryDpiForMonitor(HMONITOR hmon, _MonitorDpiType dpiType = MDT_Defau
return (dpiX + dpiY) / 2;
}
+typedef enum _SHC_PROCESS_DPI_AWARENESS {
+ SHC_PROCESS_DPI_UNAWARE = 0,
+ SHC_PROCESS_SYSTEM_DPI_AWARE = 1,
+ SHC_PROCESS_PER_MONITOR_DPI_AWARE = 2
+} SHC_PROCESS_DPI_AWARENESS;
+
void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
main_loop = NULL;
@@ -894,6 +902,20 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
window_has_focus = true;
WNDCLASSEXW wc;
+ if (is_hidpi_allowed()) {
+ HMODULE Shcore = LoadLibraryW(L"Shcore.dll");
+
+ if (Shcore != NULL) {
+ typedef HRESULT(WINAPI * SetProcessDpiAwareness_t)(SHC_PROCESS_DPI_AWARENESS);
+
+ SetProcessDpiAwareness_t SetProcessDpiAwareness = (SetProcessDpiAwareness_t)GetProcAddress(Shcore, "SetProcessDpiAwareness");
+
+ if (SetProcessDpiAwareness) {
+ SetProcessDpiAwareness(SHC_PROCESS_SYSTEM_DPI_AWARE);
+ }
+ }
+ }
+
video_mode = p_desired;
//printf("**************** desired %s, mode %s\n", p_desired.fullscreen?"true":"false", video_mode.fullscreen?"true":"false");
RECT WindowRect;
@@ -996,7 +1018,16 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
video_mode.fullscreen = false;
} else {
- if (!(hWnd = CreateWindowExW(dwExStyle, L"Engine", L"", dwStyle | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, (GetSystemMetrics(SM_CXSCREEN) - WindowRect.right) / 2, (GetSystemMetrics(SM_CYSCREEN) - WindowRect.bottom) / 2, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top, NULL, NULL, hInstance, NULL))) {
+ hWnd = CreateWindowExW(
+ dwExStyle,
+ L"Engine", L"",
+ dwStyle | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ (GetSystemMetrics(SM_CXSCREEN) - WindowRect.right) / 2,
+ (GetSystemMetrics(SM_CYSCREEN) - WindowRect.bottom) / 2,
+ WindowRect.right - WindowRect.left,
+ WindowRect.bottom - WindowRect.top,
+ NULL, NULL, hInstance, NULL);
+ if (!hWnd) {
MessageBoxW(NULL, L"Window Creation Error.", L"ERROR", MB_OK | MB_ICONEXCLAMATION);
return; // Return FALSE
}
@@ -1050,12 +1081,7 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
power_manager = memnew(PowerWindows);
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- ERR_PRINT("Initializing audio failed.");
- }
+ AudioDriverManager::initialize(p_audio_driver);
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
@@ -2322,7 +2348,7 @@ bool OS_Windows::is_vsync_enabled() const {
return true;
}
-PowerState OS_Windows::get_power_state() {
+OS::PowerState OS_Windows::get_power_state() {
return power_manager->get_power_state();
}
@@ -2339,6 +2365,14 @@ bool OS_Windows::_check_internal_feature_support(const String &p_feature) {
return p_feature == "pc" || p_feature == "s3tc";
}
+void OS_Windows::disable_crash_handler() {
+ crash_handler.disable();
+}
+
+bool OS_Windows::is_disable_crash_handler() const {
+ return crash_handler.is_disabled();
+}
+
OS_Windows::OS_Windows(HINSTANCE _hInstance) {
key_event_pos = 0;
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 0c5965bf51..1a01ac950d 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -31,6 +31,7 @@
#define OS_WINDOWS_H
#include "context_gl_win.h"
+#include "crash_handler_win.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/wasapi/audio_driver_wasapi.h"
#include "os/input.h"
@@ -134,6 +135,8 @@ class OS_Windows : public OS {
AudioDriverXAudio2 driver_xaudio2;
#endif
+ CrashHandler crash_handler;
+
void _drag_event(int p_x, int p_y, int idx);
void _touch_event(bool p_pressed, int p_x, int p_y, int idx);
@@ -278,12 +281,15 @@ public:
virtual void set_use_vsync(bool p_enable);
virtual bool is_vsync_enabled() const;
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
virtual bool _check_internal_feature_support(const String &p_feature);
+ void disable_crash_handler();
+ bool is_disable_crash_handler() const;
+
OS_Windows(HINSTANCE _hInstance);
~OS_Windows();
};
diff --git a/platform/windows/power_windows.cpp b/platform/windows/power_windows.cpp
index b37e189a3a..8d86f160f1 100644
--- a/platform/windows/power_windows.cpp
+++ b/platform/windows/power_windows.cpp
@@ -64,19 +64,19 @@ bool PowerWindows::GetPowerInfo_Windows() {
/* This API should exist back to Win95. */
if (!GetSystemPowerStatus(&status)) {
/* !!! FIXME: push GetLastError() into GetError() */
- power_state = POWERSTATE_UNKNOWN;
+ power_state = OS::POWERSTATE_UNKNOWN;
} else if (status.BatteryFlag == 0xFF) { /* unknown state */
- power_state = POWERSTATE_UNKNOWN;
+ power_state = OS::POWERSTATE_UNKNOWN;
} else if (status.BatteryFlag & (1 << 7)) { /* no battery */
- power_state = POWERSTATE_NO_BATTERY;
+ power_state = OS::POWERSTATE_NO_BATTERY;
} else if (status.BatteryFlag & (1 << 3)) { /* charging */
- power_state = POWERSTATE_CHARGING;
+ power_state = OS::POWERSTATE_CHARGING;
need_details = TRUE;
} else if (status.ACLineStatus == 1) {
- power_state = POWERSTATE_CHARGED; /* on AC, not charging. */
+ power_state = OS::POWERSTATE_CHARGED; /* on AC, not charging. */
need_details = TRUE;
} else {
- power_state = POWERSTATE_ON_BATTERY; /* not on AC. */
+ power_state = OS::POWERSTATE_ON_BATTERY; /* not on AC. */
need_details = TRUE;
}
@@ -97,11 +97,11 @@ bool PowerWindows::GetPowerInfo_Windows() {
return TRUE; /* always the definitive answer on Windows. */
}
-PowerState PowerWindows::get_power_state() {
+OS::PowerState PowerWindows::get_power_state() {
if (GetPowerInfo_Windows()) {
return power_state;
} else {
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -122,7 +122,7 @@ int PowerWindows::get_power_percent_left() {
}
PowerWindows::PowerWindows()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerWindows::~PowerWindows() {
diff --git a/platform/windows/power_windows.h b/platform/windows/power_windows.h
index 9da9841f48..0745615195 100644
--- a/platform/windows/power_windows.h
+++ b/platform/windows/power_windows.h
@@ -33,7 +33,7 @@
#include "os/dir_access.h"
#include "os/file_access.h"
-#include "os/power.h"
+#include "os/os.h"
#include <windows.h>
@@ -42,7 +42,7 @@ class PowerWindows {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool GetPowerInfo_Windows();
@@ -50,7 +50,7 @@ public:
PowerWindows();
virtual ~PowerWindows();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/platform/x11/SCsub b/platform/x11/SCsub
index fc9208c563..62717f3221 100644
--- a/platform/x11/SCsub
+++ b/platform/x11/SCsub
@@ -3,12 +3,13 @@
Import('env')
-common_x11 = [\
- "context_gl_x11.cpp",\
- "os_x11.cpp",\
- "key_mapping_x11.cpp",\
- "joypad_linux.cpp",\
- "power_x11.cpp",\
+common_x11 = [
+ "context_gl_x11.cpp",
+ "crash_handler_x11.cpp",
+ "os_x11.cpp",
+ "key_mapping_x11.cpp",
+ "joypad_linux.cpp",
+ "power_x11.cpp",
]
env.Program('#bin/godot', ['godot_x11.cpp'] + common_x11)
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
new file mode 100644
index 0000000000..c926b7799d
--- /dev/null
+++ b/platform/x11/crash_handler_x11.cpp
@@ -0,0 +1,135 @@
+/*************************************************************************/
+/* crash_handler_x11.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifdef DEBUG_ENABLED
+#define CRASH_HANDLER_ENABLED 1
+#endif
+
+#include "main/main.h"
+#include "os_x11.h"
+
+#ifdef CRASH_HANDLER_ENABLED
+#include <cxxabi.h>
+#include <dlfcn.h>
+#include <execinfo.h>
+#include <signal.h>
+
+static void handle_crash(int sig) {
+ if (OS::get_singleton() == NULL)
+ return;
+
+ void *bt_buffer[256];
+ size_t size = backtrace(bt_buffer, 256);
+ String _execpath = OS::get_singleton()->get_executable_path();
+ String msg = GLOBAL_GET("debug/settings/backtrace/message");
+
+ // Dump the backtrace to stderr with a message to the user
+ fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);
+ fprintf(stderr, "Dumping the backtrace. %ls\n", msg.c_str());
+ char **strings = backtrace_symbols(bt_buffer, size);
+ if (strings) {
+ for (size_t i = 1; i < size; i++) {
+ char fname[1024];
+ Dl_info info;
+
+ snprintf(fname, 1024, "%s", strings[i]);
+
+ // Try to demangle the function name to provide a more readable one
+ if (dladdr(bt_buffer[i], &info) && info.dli_sname) {
+ if (info.dli_sname[0] == '_') {
+ int status;
+ char *demangled = abi::__cxa_demangle(info.dli_sname, NULL, 0, &status);
+
+ if (status == 0 && demangled) {
+ snprintf(fname, 1024, "%s", demangled);
+ }
+
+ if (demangled)
+ free(demangled);
+ }
+ }
+
+ List<String> args;
+
+ char str[1024];
+ snprintf(str, 1024, "%p", bt_buffer[i]);
+ args.push_back(str);
+ args.push_back("-e");
+ args.push_back(_execpath);
+
+ String output = "";
+
+ // Try to get the file/line number using addr2line
+ if (OS::get_singleton()) {
+ int ret;
+ Error err = OS::get_singleton()->execute(String("addr2line"), args, true, NULL, &output, &ret);
+ if (err == OK) {
+ output.erase(output.length() - 1, 1);
+ }
+ }
+
+ fprintf(stderr, "[%ld] %s (%ls)\n", i, fname, output.c_str());
+ }
+
+ free(strings);
+ }
+ fprintf(stderr, "-- END OF BACKTRACE --\n");
+
+ // Abort to pass the error to the OS
+ abort();
+}
+#endif
+
+CrashHandler::CrashHandler() {
+ disabled = false;
+}
+
+CrashHandler::~CrashHandler() {
+}
+
+void CrashHandler::disable() {
+ if (disabled)
+ return;
+
+#ifdef CRASH_HANDLER_ENABLED
+ signal(SIGSEGV, NULL);
+ signal(SIGFPE, NULL);
+ signal(SIGILL, NULL);
+#endif
+
+ disabled = true;
+}
+
+void CrashHandler::initialize() {
+#ifdef CRASH_HANDLER_ENABLED
+ signal(SIGSEGV, handle_crash);
+ signal(SIGFPE, handle_crash);
+ signal(SIGILL, handle_crash);
+#endif
+}
diff --git a/platform/x11/crash_handler_x11.h b/platform/x11/crash_handler_x11.h
new file mode 100644
index 0000000000..e01334cbf2
--- /dev/null
+++ b/platform/x11/crash_handler_x11.h
@@ -0,0 +1,47 @@
+/*************************************************************************/
+/* crash_handler_x11.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef CRASH_HANDLER_X11_H
+#define CRASH_HANDLER_X11_H
+
+class CrashHandler {
+
+ bool disabled;
+
+public:
+ void initialize();
+
+ void disable();
+ bool is_disabled() const { return disabled; };
+
+ CrashHandler();
+ ~CrashHandler();
+};
+
+#endif
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 086681d4a4..d61175da60 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -87,6 +87,7 @@ def configure(env):
elif (env["target"] == "debug"):
env.Prepend(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(LINKFLAGS=['-rdynamic'])
## Architecture
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index 59b1a44247..fdb43c9ae0 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -50,6 +50,7 @@ void register_x11_exporter() {
platform->set_release_64("linux_x11_64_release");
platform->set_debug_64("linux_x11_64_debug");
platform->set_os_name("X11");
+ platform->set_chmod_flags(0755);
EditorExport::get_singleton()->add_export_platform(platform);
}
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index 3453297716..428385f7cb 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -125,7 +125,6 @@ void JoypadLinux::enumerate_joypads(udev *p_udev) {
enumerate = udev_enumerate_new(p_udev);
udev_enumerate_add_match_subsystem(enumerate, "input");
- udev_enumerate_add_match_property(enumerate, "ID_INPUT_JOYPAD", "1");
udev_enumerate_scan_devices(enumerate);
devices = udev_enumerate_get_list_entry(enumerate);
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index f96343c92c..3e8709a11e 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -93,6 +93,13 @@ const char *OS_X11::get_audio_driver_name(int p_driver) const {
return AudioDriverManager::get_driver(p_driver)->get_name();
}
+void OS_X11::initialize_core() {
+
+ crash_handler.initialize();
+
+ OS_Unix::initialize_core();
+}
+
void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
long im_event_mask = 0;
@@ -246,6 +253,11 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// borderless fullscreen window mode
if (current_videomode.fullscreen) {
+ // set bypass compositor hint
+ Atom bypass_compositor = XInternAtom(x11_display, "_NET_WM_BYPASS_COMPOSITOR", False);
+ unsigned long compositing_disable_on = 1;
+ XChangeProperty(x11_display, x11_window, bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&compositing_disable_on, 1);
+
// needed for lxde/openbox, possibly others
Hints hints;
Atom property;
@@ -301,29 +313,7 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
XFree(xsh);
}
- AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
-
- audio_driver_index = p_audio_driver;
- if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
-
- bool success = false;
- audio_driver_index = -1;
- for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
- if (i == p_audio_driver)
- continue;
- AudioDriverManager::get_driver(i)->set_singleton();
- if (AudioDriverManager::get_driver(i)->init() == OK) {
- success = true;
- print_line("Audio Driver Failed: " + String(AudioDriverManager::get_driver(p_audio_driver)->get_name()));
- print_line("Using alternate audio driver: " + String(AudioDriverManager::get_driver(i)->get_name()));
- audio_driver_index = i;
- break;
- }
- }
- if (!success) {
- ERR_PRINT("Initializing audio failed.");
- }
- }
+ AudioDriverManager::initialize(p_audio_driver);
ERR_FAIL_COND(!visual_server);
ERR_FAIL_COND(x11_window == 0);
@@ -695,6 +685,12 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) {
xev.xclient.data.l[2] = 0;
XSendEvent(x11_display, DefaultRootWindow(x11_display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+
+ // set bypass compositor hint
+ Atom bypass_compositor = XInternAtom(x11_display, "_NET_WM_BYPASS_COMPOSITOR", False);
+ unsigned long compositing_disable_on = p_enabled ? 1 : 0;
+ XChangeProperty(x11_display, x11_window, bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&compositing_disable_on, 1);
+
XFlush(x11_display);
if (!p_enabled && !is_window_resizable()) {
@@ -2149,7 +2145,7 @@ void OS_X11::set_context(int p_context) {
}
}
-PowerState OS_X11::get_power_state() {
+OS::PowerState OS_X11::get_power_state() {
return power_manager->get_power_state();
}
@@ -2161,11 +2157,15 @@ int OS_X11::get_power_percent_left() {
return power_manager->get_power_percent_left();
}
-OS_X11::OS_X11() {
+void OS_X11::disable_crash_handler() {
+ crash_handler.disable();
+}
-#ifdef RTAUDIO_ENABLED
- AudioDriverManager::add_driver(&driver_rtaudio);
-#endif
+bool OS_X11::is_disable_crash_handler() const {
+ return crash_handler.is_disabled();
+}
+
+OS_X11::OS_X11() {
#ifdef PULSEAUDIO_ENABLED
AudioDriverManager::add_driver(&driver_pulseaudio);
@@ -2175,11 +2175,6 @@ OS_X11::OS_X11() {
AudioDriverManager::add_driver(&driver_alsa);
#endif
- if (AudioDriverManager::get_driver_count() == 0) {
- WARN_PRINT("No sound driver found... Defaulting to dummy driver");
- AudioDriverManager::add_driver(&driver_dummy);
- }
-
minimized = false;
xim_style = 0L;
mouse_mode = MOUSE_MODE_VISIBLE;
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 51240fa023..0e2430c650 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -31,17 +31,16 @@
#define OS_X11_H
#include "context_gl_x11.h"
+#include "crash_handler_x11.h"
#include "drivers/unix/os_unix.h"
#include "os/input.h"
#include "servers/visual_server.h"
//#include "servers/visual/visual_server_wrap_mt.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
-#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "joypad_linux.h"
#include "main/input_default.h"
#include "power_x11.h"
-#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio_server.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
@@ -153,10 +152,6 @@ class OS_X11 : public OS_Unix {
JoypadLinux *joypad;
#endif
-#ifdef RTAUDIO_ENABLED
- AudioDriverRtAudio driver_rtaudio;
-#endif
-
#ifdef ALSA_ENABLED
AudioDriverALSA driver_alsa;
#endif
@@ -164,12 +159,13 @@ class OS_X11 : public OS_Unix {
#ifdef PULSEAUDIO_ENABLED
AudioDriverPulseAudio driver_pulseaudio;
#endif
- AudioDriverDummy driver_dummy;
Atom net_wm_icon;
PowerX11 *power_manager;
+ CrashHandler crash_handler;
+
int audio_driver_index;
unsigned int capture_idle;
bool maximized;
@@ -191,6 +187,7 @@ protected:
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
+ virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
virtual void finalize();
@@ -265,7 +262,7 @@ public:
virtual void set_use_vsync(bool p_enable);
virtual bool is_vsync_enabled() const;
- virtual PowerState get_power_state();
+ virtual OS::PowerState get_power_state();
virtual int get_power_seconds_left();
virtual int get_power_percent_left();
@@ -273,6 +270,9 @@ public:
void run();
+ void disable_crash_handler();
+ bool is_disable_crash_handler() const;
+
OS_X11();
};
diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp
index 32100354a6..76ff7f91fb 100644
--- a/platform/x11/power_x11.cpp
+++ b/platform/x11/power_x11.cpp
@@ -252,7 +252,7 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() {
this->nsecs_left = -1;
this->percent_left = -1;
- this->power_state = POWERSTATE_UNKNOWN;
+ this->power_state = OS::POWERSTATE_UNKNOWN;
dirp->change_dir(proc_acpi_battery_path);
Error err = dirp->list_dir_begin();
@@ -282,13 +282,13 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() {
}
if (!have_battery) {
- this->power_state = POWERSTATE_NO_BATTERY;
+ this->power_state = OS::POWERSTATE_NO_BATTERY;
} else if (charging) {
- this->power_state = POWERSTATE_CHARGING;
+ this->power_state = OS::POWERSTATE_CHARGING;
} else if (have_ac) {
- this->power_state = POWERSTATE_CHARGED;
+ this->power_state = OS::POWERSTATE_CHARGED;
} else {
- this->power_state = POWERSTATE_ON_BATTERY;
+ this->power_state = OS::POWERSTATE_ON_BATTERY;
}
return true; /* definitive answer. */
@@ -400,17 +400,17 @@ bool PowerX11::GetPowerInfo_Linux_proc_apm() {
}
if (battery_flag == 0xFF) { /* unknown state */
- this->power_state = POWERSTATE_UNKNOWN;
+ this->power_state = OS::POWERSTATE_UNKNOWN;
} else if (battery_flag & (1 << 7)) { /* no battery */
- this->power_state = POWERSTATE_NO_BATTERY;
+ this->power_state = OS::POWERSTATE_NO_BATTERY;
} else if (battery_flag & (1 << 3)) { /* charging */
- this->power_state = POWERSTATE_CHARGING;
+ this->power_state = OS::POWERSTATE_CHARGING;
need_details = true;
} else if (ac_status == 1) {
- this->power_state = POWERSTATE_CHARGED; /* on AC, not charging. */
+ this->power_state = OS::POWERSTATE_CHARGED; /* on AC, not charging. */
need_details = true;
} else {
- this->power_state = POWERSTATE_ON_BATTERY;
+ this->power_state = OS::POWERSTATE_ON_BATTERY;
need_details = true;
}
@@ -445,7 +445,7 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in
return false;
}
- this->power_state = POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */
+ this->power_state = OS::POWERSTATE_NO_BATTERY; /* assume we're just plugged in. */
this->nsecs_left = -1;
this->percent_left = -1;
@@ -454,7 +454,7 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in
while (name != "") {
bool choose = false;
char str[64];
- PowerState st;
+ OS::PowerState st;
int secs;
int pct;
@@ -475,17 +475,17 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in
/* some drivers don't offer this, so if it's not explicitly reported assume it's present. */
if (read_power_file(base, name.utf8().get_data(), "present", str, sizeof(str)) && (String(str) == "0\n")) {
- st = POWERSTATE_NO_BATTERY;
+ st = OS::POWERSTATE_NO_BATTERY;
} else if (!read_power_file(base, name.utf8().get_data(), "status", str, sizeof(str))) {
- st = POWERSTATE_UNKNOWN; /* uh oh */
+ st = OS::POWERSTATE_UNKNOWN; /* uh oh */
} else if (String(str) == "Charging\n") {
- st = POWERSTATE_CHARGING;
+ st = OS::POWERSTATE_CHARGING;
} else if (String(str) == "Discharging\n") {
- st = POWERSTATE_ON_BATTERY;
+ st = OS::POWERSTATE_ON_BATTERY;
} else if ((String(str) == "Full\n") || (String(str) == "Not charging\n")) {
- st = POWERSTATE_CHARGED;
+ st = OS::POWERSTATE_CHARGED;
} else {
- st = POWERSTATE_UNKNOWN; /* uh oh */
+ st = OS::POWERSTATE_UNKNOWN; /* uh oh */
}
if (!read_power_file(base, name.utf8().get_data(), "capacity", str, sizeof(str))) {
@@ -543,17 +543,17 @@ bool PowerX11::UpdatePowerInfo() {
}
PowerX11::PowerX11()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerX11::~PowerX11() {
}
-PowerState PowerX11::get_power_state() {
+OS::PowerState PowerX11::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
diff --git a/platform/x11/power_x11.h b/platform/x11/power_x11.h
index e34223036d..7fc258bc0d 100644
--- a/platform/x11/power_x11.h
+++ b/platform/x11/power_x11.h
@@ -33,14 +33,14 @@
#include "os/dir_access.h"
#include "os/file_access.h"
-#include "os/power.h"
+#include "os/os.h"
class PowerX11 {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
FileAccessRef open_power_file(const char *base, const char *node, const char *key);
bool read_power_file(const char *base, const char *node, const char *key, char *buf, size_t buflen);
@@ -58,7 +58,7 @@ public:
PowerX11();
virtual ~PowerX11();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 1124904963..9fc6c8d23a 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -596,7 +596,7 @@ void Area2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_area_enter_tree", "id"), &Area2D::_area_enter_tree);
ClassDB::bind_method(D_METHOD("_area_exit_tree", "id"), &Area2D::_area_exit_tree);
- ClassDB::bind_method(D_METHOD("set_space_override_mode", "enable"), &Area2D::set_space_override_mode);
+ ClassDB::bind_method(D_METHOD("set_space_override_mode", "space_override_mode"), &Area2D::set_space_override_mode);
ClassDB::bind_method(D_METHOD("get_space_override_mode"), &Area2D::get_space_override_mode);
ClassDB::bind_method(D_METHOD("set_gravity_is_point", "enable"), &Area2D::set_gravity_is_point);
@@ -680,6 +680,12 @@ void Area2D::_bind_methods() {
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus");
+
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE);
}
Area2D::Area2D()
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 39d3f2d6bf..b6abe90035 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -57,52 +57,32 @@ void AudioStreamPlayer2D::_mix_audio() {
AudioFrame vol_inc = (current.vol - prev_outputs[i].vol) / float(buffer_size);
AudioFrame vol = current.vol;
- switch (AudioServer::get_singleton()->get_speaker_mode()) {
+ int cc = AudioServer::get_singleton()->get_channel_count();
- case AudioServer::SPEAKER_MODE_STEREO: {
- AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 0);
+ if (cc == 1) {
+ AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 0);
- for (int j = 0; j < buffer_size; j++) {
+ for (int j = 0; j < buffer_size; j++) {
- target[j] += buffer[j] * vol;
- vol += vol_inc;
- }
-
- } break;
- case AudioServer::SPEAKER_SURROUND_51: {
-
- AudioFrame *targets[2] = {
- AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 1),
- AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 2),
- };
-
- for (int j = 0; j < buffer_size; j++) {
-
- AudioFrame frame = buffer[j] * vol;
- targets[0][j] += frame;
- targets[1][j] += frame;
- vol += vol_inc;
- }
+ target[j] += buffer[j] * vol;
+ vol += vol_inc;
+ }
- } break;
- case AudioServer::SPEAKER_SURROUND_71: {
+ } else {
+ AudioFrame *targets[4];
- AudioFrame *targets[3] = {
- AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 1),
- AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 2),
- AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 3)
- };
+ for (int k = 0; k < cc; k++) {
+ targets[k] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, k);
+ }
- for (int j = 0; j < buffer_size; j++) {
+ for (int j = 0; j < buffer_size; j++) {
- AudioFrame frame = buffer[j] * vol;
- targets[0][j] += frame;
- targets[1][j] += frame;
- targets[2][j] += frame;
- vol += vol_inc;
+ AudioFrame frame = buffer[j] * vol;
+ for (int k = 0; k < cc; k++) {
+ targets[k][j] += frame;
}
-
- } break;
+ vol += vol_inc;
+ }
}
prev_outputs[i] = current;
@@ -217,13 +197,15 @@ void AudioStreamPlayer2D::_notification(int p_what) {
setseek = setplay;
active = true;
setplay = -1;
- _change_notify("playing"); //update property in editor
+ //do not update, this makes it easier to animate (will shut off otherise)
+ //_change_notify("playing"); //update property in editor
}
//stop playing if no longer active
if (!active) {
set_fixed_process_internal(false);
- _change_notify("playing"); //update property in editor
+ //do not update, this makes it easier to animate (will shut off otherise)
+ //_change_notify("playing"); //update property in editor
emit_signal("finished");
}
}
@@ -252,8 +234,6 @@ void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) {
stream.unref();
ERR_FAIL_COND(stream_playback.is_null());
}
-
-
}
Ref<AudioStream> AudioStreamPlayer2D::get_stream() const {
@@ -439,7 +419,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "_is_active");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_RANGE, "1,65536,1"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING), "set_attenuation", "get_attenuation");
@@ -447,7 +427,6 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_SIGNAL(MethodInfo("finished"));
-
}
AudioStreamPlayer2D::AudioStreamPlayer2D() {
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index a7c5d1adbb..ec1ea7df38 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -338,7 +338,6 @@ void CanvasItem::_update_callback() {
notification(NOTIFICATION_DRAW);
emit_signal(SceneStringNames::get_singleton()->draw);
if (get_script_instance()) {
- Variant::CallError err;
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_draw, NULL, 0);
}
drawing = false;
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index e2764a6e8d..a840744c78 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -302,6 +302,9 @@ void CollisionPolygon2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled");
+
+ BIND_ENUM_CONSTANT(BUILD_SOLIDS);
+ BIND_ENUM_CONSTANT(BUILD_SEGMENTS);
}
CollisionPolygon2D::CollisionPolygon2D() {
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 1bca2c6f37..516acefe2a 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -443,6 +443,13 @@ void Light2D::_bind_methods() {
BIND_ENUM_CONSTANT(MODE_SUB);
BIND_ENUM_CONSTANT(MODE_MIX);
BIND_ENUM_CONSTANT(MODE_MASK);
+
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_NONE);
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_PCF3);
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_PCF5);
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_PCF7);
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_PCF9);
+ BIND_ENUM_CONSTANT(SHADOW_FILTER_PCF13);
}
Light2D::Light2D() {
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index c87a9a5b1e..d8cef5b937 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -28,13 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "line_2d.h"
+#include "line_builder.h"
#include "core_string_names.h"
// Needed so we can bind functions
-VARIANT_ENUM_CAST(LineJointMode)
-VARIANT_ENUM_CAST(LineCapMode)
-VARIANT_ENUM_CAST(LineTextureMode)
+VARIANT_ENUM_CAST(Line2D::LineJointMode)
+VARIANT_ENUM_CAST(Line2D::LineCapMode)
+VARIANT_ENUM_CAST(Line2D::LineTextureMode)
Line2D::Line2D()
: Node2D() {
@@ -134,7 +135,7 @@ void Line2D::set_texture_mode(const LineTextureMode mode) {
update();
}
-LineTextureMode Line2D::get_texture_mode() const {
+Line2D::LineTextureMode Line2D::get_texture_mode() const {
return _texture_mode;
}
@@ -143,7 +144,7 @@ void Line2D::set_joint_mode(LineJointMode mode) {
update();
}
-LineJointMode Line2D::get_joint_mode() const {
+Line2D::LineJointMode Line2D::get_joint_mode() const {
return _joint_mode;
}
@@ -152,7 +153,7 @@ void Line2D::set_begin_cap_mode(LineCapMode mode) {
update();
}
-LineCapMode Line2D::get_begin_cap_mode() const {
+Line2D::LineCapMode Line2D::get_begin_cap_mode() const {
return _begin_cap_mode;
}
@@ -161,7 +162,7 @@ void Line2D::set_end_cap_mode(LineCapMode mode) {
update();
}
-LineCapMode Line2D::get_end_cap_mode() const {
+Line2D::LineCapMode Line2D::get_end_cap_mode() const {
return _end_cap_mode;
}
diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h
index 017ccf13ff..36aadfd265 100644
--- a/scene/2d/line_2d.h
+++ b/scene/2d/line_2d.h
@@ -30,7 +30,6 @@
#ifndef LINE2D_H
#define LINE2D_H
-#include "line_builder.h"
#include "node_2d.h"
class Line2D : public Node2D {
@@ -38,6 +37,24 @@ class Line2D : public Node2D {
GDCLASS(Line2D, Node2D)
public:
+ enum LineJointMode {
+ LINE_JOINT_SHARP = 0,
+ LINE_JOINT_BEVEL,
+ LINE_JOINT_ROUND
+ };
+
+ enum LineCapMode {
+ LINE_CAP_NONE = 0,
+ LINE_CAP_BOX,
+ LINE_CAP_ROUND
+ };
+
+ enum LineTextureMode {
+ LINE_TEXTURE_NONE = 0,
+ LINE_TEXTURE_TILE
+ // TODO STRETCH mode
+ };
+
Line2D();
void set_points(const PoolVector<Vector2> &p_points);
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index 1235013af4..4873c47827 100644
--- a/scene/2d/line_builder.cpp
+++ b/scene/2d/line_builder.cpp
@@ -92,14 +92,14 @@ static inline Vector2 interpolate(const Rect2 &r, const Vector2 &v) {
//----------------------------------------------------------------------------
LineBuilder::LineBuilder() {
- joint_mode = LINE_JOINT_SHARP;
+ joint_mode = Line2D::LINE_JOINT_SHARP;
width = 10;
default_color = Color(0.4, 0.5, 1);
gradient = NULL;
sharp_limit = 2.f;
round_precision = 8;
- begin_cap_mode = LINE_CAP_NONE;
- end_cap_mode = LINE_CAP_NONE;
+ begin_cap_mode = Line2D::LINE_CAP_NONE;
+ end_cap_mode = Line2D::LINE_CAP_NONE;
_interpolate_color = false;
_last_index[0] = 0;
@@ -141,7 +141,7 @@ void LineBuilder::build() {
float current_distance1 = 0.f;
float total_distance = 0.f;
_interpolate_color = gradient != NULL;
- bool distance_required = _interpolate_color || texture_mode == LINE_TEXTURE_TILE;
+ bool distance_required = _interpolate_color || texture_mode == Line2D::LINE_TEXTURE_TILE;
if (distance_required)
total_distance = calculate_total_distance(points);
if (_interpolate_color)
@@ -153,7 +153,7 @@ void LineBuilder::build() {
float uvx1 = 0.f;
// Begin cap
- if (begin_cap_mode == LINE_CAP_BOX) {
+ if (begin_cap_mode == Line2D::LINE_CAP_BOX) {
// Push back first vertices a little bit
pos_up0 -= f0 * hw;
pos_down0 -= f0 * hw;
@@ -161,8 +161,8 @@ void LineBuilder::build() {
total_distance += width;
current_distance0 += hw;
current_distance1 = current_distance0;
- } else if (begin_cap_mode == LINE_CAP_ROUND) {
- if (texture_mode == LINE_TEXTURE_TILE) {
+ } else if (begin_cap_mode == Line2D::LINE_CAP_ROUND) {
+ if (texture_mode == Line2D::LINE_TEXTURE_TILE) {
uvx0 = 0.5f;
}
new_arc(pos0, pos_up0 - pos0, -Math_PI, color0, Rect2(0.f, 0.f, 1.f, 1.f));
@@ -173,13 +173,15 @@ void LineBuilder::build() {
strip_begin(pos_up0, pos_down0, color0, uvx0);
- // pos_up0 ------------- pos_up1 --------------------
- // | |
- // pos0 - - - - - - - - - pos1 - - - - - - - - - pos2
- // | |
- // pos_down0 ------------ pos_down1 ------------------
- //
- // i-1 i i+1
+ /*
+ * pos_up0 ------------- pos_up1 --------------------
+ * | |
+ * pos0 - - - - - - - - - pos1 - - - - - - - - - pos2
+ * | |
+ * pos_down0 ------------ pos_down1 ------------------
+ *
+ * i-1 i i+1
+ */
// http://labs.hyperandroid.com/tag/opengl-lines
// (not the same implementation but visuals help a lot)
@@ -206,17 +208,19 @@ void LineBuilder::build() {
inner_normal1 = -u1 * hw;
}
- // ---------------------------
- // /
- // 0 / 1
- // / /
- // --------------------x------ /
- // / / (here shown with orientation == DOWN)
- // / /
- // / /
- // / /
- // 2 /
- // /
+ /*
+ * ---------------------------
+ * /
+ * 0 / 1
+ * / /
+ * --------------------x------ /
+ * / / (here shown with orientation == DOWN)
+ * / /
+ * / /
+ * / /
+ * 2 /
+ * /
+ */
// Find inner intersection at the joint
Vector2 corner_pos_in, corner_pos_out;
@@ -243,15 +247,15 @@ void LineBuilder::build() {
corner_pos_down = corner_pos_in;
}
- LineJointMode current_joint_mode = joint_mode;
+ Line2D::LineJointMode current_joint_mode = joint_mode;
Vector2 pos_up1, pos_down1;
if (intersection_result == SEGMENT_INTERSECT) {
// Fallback on bevel if sharp angle is too high (because it would produce very long miters)
- if (current_joint_mode == LINE_JOINT_SHARP && corner_pos_out.distance_squared_to(pos1) / hw_sq > sharp_limit_sq) {
- current_joint_mode = LINE_JOINT_BEVEL;
+ if (current_joint_mode == Line2D::LINE_JOINT_SHARP && corner_pos_out.distance_squared_to(pos1) / hw_sq > sharp_limit_sq) {
+ current_joint_mode = Line2D::LINE_JOINT_BEVEL;
}
- if (current_joint_mode == LINE_JOINT_SHARP) {
+ if (current_joint_mode == Line2D::LINE_JOINT_SHARP) {
// In this case, we won't create joint geometry,
// The previous and next line quads will directly share an edge.
pos_up1 = corner_pos_up;
@@ -280,7 +284,7 @@ void LineBuilder::build() {
if (_interpolate_color) {
color1 = gradient->get_color_at_offset(current_distance1 / total_distance);
}
- if (texture_mode == LINE_TEXTURE_TILE) {
+ if (texture_mode == Line2D::LINE_TEXTURE_TILE) {
uvx0 = current_distance0 / width;
uvx1 = current_distance1 / width;
}
@@ -294,7 +298,7 @@ void LineBuilder::build() {
pos0 = pos1;
current_distance0 = current_distance1;
if (intersection_result == SEGMENT_INTERSECT) {
- if (current_joint_mode == LINE_JOINT_SHARP) {
+ if (current_joint_mode == Line2D::LINE_JOINT_SHARP) {
pos_up0 = pos_up1;
pos_down0 = pos_down1;
} else {
@@ -313,15 +317,16 @@ void LineBuilder::build() {
// From this point, bu0 and bd0 concern the next segment
// Add joint geometry
- if (current_joint_mode != LINE_JOINT_SHARP) {
+ if (current_joint_mode != Line2D::LINE_JOINT_SHARP) {
- // ________________ cbegin
- // / \
- // / \
- // ____________/_ _ _\ cend
- // | |
- // | |
- // | |
+ /* ________________ cbegin
+ * / \
+ * / \
+ * ____________/_ _ _\ cend
+ * | |
+ * | |
+ * | |
+ */
Vector2 cbegin, cend;
if (orientation == UP) {
@@ -332,9 +337,9 @@ void LineBuilder::build() {
cend = pos_up0;
}
- if (current_joint_mode == LINE_JOINT_BEVEL) {
+ if (current_joint_mode == Line2D::LINE_JOINT_BEVEL) {
strip_add_tri(cend, orientation);
- } else if (current_joint_mode == LINE_JOINT_ROUND) {
+ } else if (current_joint_mode == Line2D::LINE_JOINT_ROUND) {
Vector2 vbegin = cbegin - pos1;
Vector2 vend = cend - pos1;
strip_add_arc(pos1, vbegin.angle_to(vend), orientation);
@@ -355,7 +360,7 @@ void LineBuilder::build() {
Vector2 pos_down1 = pos1 - u0 * hw;
// End cap (box)
- if (end_cap_mode == LINE_CAP_BOX) {
+ if (end_cap_mode == Line2D::LINE_CAP_BOX) {
pos_up1 += f0 * hw;
pos_down1 += f0 * hw;
}
@@ -366,14 +371,14 @@ void LineBuilder::build() {
if (_interpolate_color) {
color1 = gradient->get_color(gradient->get_points_count() - 1);
}
- if (texture_mode == LINE_TEXTURE_TILE) {
+ if (texture_mode == Line2D::LINE_TEXTURE_TILE) {
uvx1 = current_distance1 / width;
}
strip_add_quad(pos_up1, pos_down1, color1, uvx1);
// End cap (round)
- if (end_cap_mode == LINE_CAP_ROUND) {
+ if (end_cap_mode == Line2D::LINE_CAP_ROUND) {
// Note: color is not used in case we don't interpolate...
Color color = _interpolate_color ? gradient->get_color(gradient->get_points_count() - 1) : Color(0, 0, 0);
new_arc(pos1, pos_up1 - pos1, Math_PI, color, Rect2(uvx1 - 0.5f, 0.f, 1.f, 1.f));
@@ -391,7 +396,7 @@ void LineBuilder::strip_begin(Vector2 up, Vector2 down, Color color, float uvx)
colors.push_back(color);
}
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
uvs.push_back(Vector2(uvx, 0.f));
uvs.push_back(Vector2(uvx, 1.f));
}
@@ -415,7 +420,7 @@ void LineBuilder::strip_new_quad(Vector2 up, Vector2 down, Color color, float uv
colors.push_back(color);
}
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
uvs.push_back(uvs[_last_index[UP]]);
uvs.push_back(uvs[_last_index[DOWN]]);
uvs.push_back(Vector2(uvx, UP));
@@ -444,7 +449,7 @@ void LineBuilder::strip_add_quad(Vector2 up, Vector2 down, Color color, float uv
colors.push_back(color);
}
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
uvs.push_back(Vector2(uvx, 0.f));
uvs.push_back(Vector2(uvx, 1.f));
}
@@ -471,7 +476,7 @@ void LineBuilder::strip_add_tri(Vector2 up, Orientation orientation) {
Orientation opposite_orientation = orientation == UP ? DOWN : UP;
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
// UVs are just one slice of the texture all along
// (otherwise we can't share the bottom vertice)
uvs.push_back(uvs[_last_index[opposite_orientation]]);
@@ -536,7 +541,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
vertices.push_back(center);
if (_interpolate_color)
colors.push_back(color);
- if (texture_mode != LINE_TEXTURE_NONE)
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE)
uvs.push_back(interpolate(uv_rect, Vector2(0.5f, 0.5f)));
// Arc vertices
@@ -547,7 +552,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
vertices.push_back(rpos);
if (_interpolate_color)
colors.push_back(color);
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
Vector2 tsc = Vector2(Math::cos(tt), Math::sin(tt));
uvs.push_back(interpolate(uv_rect, 0.5f * (tsc + Vector2(1.f, 1.f))));
tt += angle_step;
@@ -560,7 +565,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
vertices.push_back(rpos);
if (_interpolate_color)
colors.push_back(color);
- if (texture_mode != LINE_TEXTURE_NONE) {
+ if (texture_mode != Line2D::LINE_TEXTURE_NONE) {
tt = tt_begin + angle_delta;
Vector2 tsc = Vector2(Math::cos(tt), Math::sin(tt));
uvs.push_back(interpolate(uv_rect, 0.5f * (tsc + Vector2(1.f, 1.f))));
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index 227e0abd08..f12fbf6f82 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -31,39 +31,22 @@
#define LINE_BUILDER_H
#include "color.h"
+#include "line_2d.h"
#include "math_2d.h"
#include "scene/resources/color_ramp.h"
-enum LineJointMode {
- LINE_JOINT_SHARP = 0,
- LINE_JOINT_BEVEL,
- LINE_JOINT_ROUND
-};
-
-enum LineCapMode {
- LINE_CAP_NONE = 0,
- LINE_CAP_BOX,
- LINE_CAP_ROUND
-};
-
-enum LineTextureMode {
- LINE_TEXTURE_NONE = 0,
- LINE_TEXTURE_TILE
- // TODO STRETCH mode
-};
-
class LineBuilder {
public:
// TODO Move in a struct and reference it
// Input
Vector<Vector2> points;
- LineJointMode joint_mode;
- LineCapMode begin_cap_mode;
- LineCapMode end_cap_mode;
+ Line2D::LineJointMode joint_mode;
+ Line2D::LineCapMode begin_cap_mode;
+ Line2D::LineCapMode end_cap_mode;
float width;
Color default_color;
Gradient *gradient;
- LineTextureMode texture_mode;
+ Line2D::LineTextureMode texture_mode;
float sharp_limit;
int round_precision;
// TODO offset_joints option (offers alternative implementation of round joints)
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 1d7bd8fc2a..9bd5576d91 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -137,7 +137,8 @@ void PathFollow2D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- if ((path = Object::cast_to<Path2D>(get_parent()))) {
+ path = Object::cast_to<Path2D>(get_parent());
+ if (path) {
_update_transform();
}
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index b1eb2ba267..c6cd3677cd 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -955,35 +955,25 @@ RigidBody2D::~RigidBody2D() {
//////////////////////////
-Dictionary KinematicBody2D::_move(const Vector2 &p_motion) {
+Ref<KinematicCollision2D> KinematicBody2D::_move(const Vector2 &p_motion) {
Collision col;
- if (move(p_motion, col)) {
- Dictionary d;
- d["position"] = col.collision;
- d["normal"] = col.normal;
- d["local_shape"] = col.local_shape;
- d["travel"] = col.travel;
- d["remainder"] = col.remainder;
- d["collider_id"] = col.collider;
- d["collider_velocity"] = col.collider_vel;
- if (col.collider) {
- d["collider"] = ObjectDB::get_instance(col.collider);
- } else {
- d["collider"] = Variant();
- }
- d["collider_shape_index"] = col.collider_shape;
- d["collider_metadata"] = col.collider_metadata;
+ if (move_and_collide(p_motion, col)) {
+ if (motion_cache.is_null()) {
+ motion_cache.instance();
+ motion_cache->owner = this;
+ }
- return d;
+ motion_cache->collision = col;
- } else {
- return Dictionary();
+ return motion_cache;
}
+
+ return Ref<KinematicCollision2D>();
}
-bool KinematicBody2D::move(const Vector2 &p_motion, Collision &r_collision) {
+bool KinematicBody2D::move_and_collide(const Vector2 &p_motion, Collision &r_collision) {
Transform2D gt = get_global_transform();
Physics2DServer::MotionResult result;
@@ -1007,7 +997,7 @@ bool KinematicBody2D::move(const Vector2 &p_motion, Collision &r_collision) {
return colliding;
}
-Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction, float p_slope_stop_min_velocity, int p_max_bounces, float p_floor_max_angle) {
+Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction, float p_slope_stop_min_velocity, int p_max_slides, float p_floor_max_angle) {
Vector2 motion = (floor_velocity + p_linear_velocity) * get_fixed_process_delta_time();
Vector2 lv = p_linear_velocity;
@@ -1018,11 +1008,11 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
colliders.clear();
floor_velocity = Vector2();
- while (p_max_bounces) {
+ while (p_max_slides) {
Collision collision;
- bool collided = move(motion, collision);
+ bool collided = move_and_collide(motion, collision);
if (collided) {
@@ -1060,7 +1050,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
break;
}
- p_max_bounces--;
+ p_max_slides--;
if (motion == Vector2())
break;
}
@@ -1103,75 +1093,35 @@ float KinematicBody2D::get_safe_margin() const {
return margin;
}
-int KinematicBody2D::get_collision_count() const {
+int KinematicBody2D::get_slide_count() const {
return colliders.size();
}
-Vector2 KinematicBody2D::get_collision_position(int p_collision) const {
-
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Vector2());
- return colliders[p_collision].collision;
-}
-Vector2 KinematicBody2D::get_collision_normal(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Vector2());
- return colliders[p_collision].normal;
+KinematicBody2D::Collision KinematicBody2D::get_slide_collision(int p_bounce) const {
+ ERR_FAIL_INDEX_V(p_bounce, colliders.size(), Collision());
+ return colliders[p_bounce];
}
-Vector2 KinematicBody2D::get_collision_travel(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Vector2());
- return colliders[p_collision].travel;
-}
-Vector2 KinematicBody2D::get_collision_remainder(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Vector2());
- return colliders[p_collision].remainder;
-}
-Object *KinematicBody2D::get_collision_local_shape(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), NULL);
- uint32_t owner = shape_find_owner(colliders[p_collision].local_shape);
- return shape_owner_get_owner(owner);
-}
-Object *KinematicBody2D::get_collision_collider(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), NULL);
+Ref<KinematicCollision2D> KinematicBody2D::_get_slide_collision(int p_bounce) {
- if (colliders[p_collision].collider) {
- return ObjectDB::get_instance(colliders[p_collision].collider);
+ ERR_FAIL_INDEX_V(p_bounce, colliders.size(), Ref<KinematicCollision2D>());
+ if (p_bounce >= slide_colliders.size()) {
+ slide_colliders.resize(p_bounce + 1);
}
- return NULL;
-}
-ObjectID KinematicBody2D::get_collision_collider_id(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), 0);
-
- return colliders[p_collision].collider;
-}
-Object *KinematicBody2D::get_collision_collider_shape(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), NULL);
- Object *collider = get_collision_collider(p_collision);
- CollisionObject2D *obj2d = Object::cast_to<CollisionObject2D>(collider);
- if (obj2d) {
- uint32_t owner = shape_find_owner(colliders[p_collision].collider_shape);
- return obj2d->shape_owner_get_owner(owner);
+ if (slide_colliders[p_bounce].is_null()) {
+ slide_colliders[p_bounce].instance();
+ slide_colliders[p_bounce]->owner = this;
}
- return NULL;
-}
-int KinematicBody2D::get_collision_collider_shape_index(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), -1);
- return colliders[p_collision].collider_shape;
-}
-Vector2 KinematicBody2D::get_collision_collider_velocity(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Vector2());
- return colliders[p_collision].collider_vel;
-}
-Variant KinematicBody2D::get_collision_collider_metadata(int p_collision) const {
- ERR_FAIL_INDEX_V(p_collision, colliders.size(), Variant());
- return colliders[p_collision].collider_metadata;
+ slide_colliders[p_bounce]->collision = colliders[p_bounce];
+ return slide_colliders[p_bounce];
}
void KinematicBody2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("move", "rel_vec"), &KinematicBody2D::_move);
+ ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec"), &KinematicBody2D::_move);
ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "floor_normal", "slope_stop_min_velocity", "max_bounces", "floor_max_angle"), &KinematicBody2D::move_and_slide, DEFVAL(Vector2(0, 0)), DEFVAL(5), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)));
ClassDB::bind_method(D_METHOD("test_move", "from", "rel_vec"), &KinematicBody2D::test_move);
@@ -1184,18 +1134,8 @@ void KinematicBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_safe_margin", "pixels"), &KinematicBody2D::set_safe_margin);
ClassDB::bind_method(D_METHOD("get_safe_margin"), &KinematicBody2D::get_safe_margin);
- ClassDB::bind_method(D_METHOD("get_collision_count"), &KinematicBody2D::get_collision_count);
- ClassDB::bind_method(D_METHOD("get_collision_position", "collision"), &KinematicBody2D::get_collision_position);
- ClassDB::bind_method(D_METHOD("get_collision_normal", "collision"), &KinematicBody2D::get_collision_normal);
- ClassDB::bind_method(D_METHOD("get_collision_travel", "collision"), &KinematicBody2D::get_collision_travel);
- ClassDB::bind_method(D_METHOD("get_collision_remainder", "collision"), &KinematicBody2D::get_collision_remainder);
- ClassDB::bind_method(D_METHOD("get_collision_local_shape", "collision"), &KinematicBody2D::get_collision_local_shape);
- ClassDB::bind_method(D_METHOD("get_collision_collider", "collision"), &KinematicBody2D::get_collision_collider);
- ClassDB::bind_method(D_METHOD("get_collision_collider_id", "collision"), &KinematicBody2D::get_collision_collider_id);
- ClassDB::bind_method(D_METHOD("get_collision_collider_shape", "collision"), &KinematicBody2D::get_collision_collider_shape);
- ClassDB::bind_method(D_METHOD("get_collision_collider_shape_index", "collision"), &KinematicBody2D::get_collision_collider_shape_index);
- ClassDB::bind_method(D_METHOD("get_collision_collider_velocity", "collision"), &KinematicBody2D::get_collision_collider_velocity);
- ClassDB::bind_method(D_METHOD("get_collision_collider_metadata", "collision"), &KinematicBody2D::get_collision_collider_metadata);
+ ClassDB::bind_method(D_METHOD("get_slide_count"), &KinematicBody2D::get_slide_count);
+ ClassDB::bind_method(D_METHOD("get_slide_collision", "slide_idx"), &KinematicBody2D::_get_slide_collision);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
}
@@ -1210,4 +1150,106 @@ KinematicBody2D::KinematicBody2D()
on_wall = false;
}
KinematicBody2D::~KinematicBody2D() {
+ if (motion_cache.is_valid()) {
+ motion_cache->owner = NULL;
+ }
+
+ for (int i = 0; i < slide_colliders.size(); i++) {
+ if (slide_colliders[i].is_valid()) {
+ slide_colliders[i]->owner = NULL;
+ }
+ }
+}
+
+////////////////////////
+
+Vector2 KinematicCollision2D::get_position() const {
+
+ return collision.collision;
+}
+Vector2 KinematicCollision2D::get_normal() const {
+ return collision.normal;
+}
+Vector2 KinematicCollision2D::get_travel() const {
+ return collision.travel;
+}
+Vector2 KinematicCollision2D::get_remainder() const {
+ return collision.remainder;
+}
+Object *KinematicCollision2D::get_local_shape() const {
+ ERR_FAIL_COND_V(!owner, NULL);
+ uint32_t ownerid = owner->shape_find_owner(collision.local_shape);
+ return owner->shape_owner_get_owner(ownerid);
+}
+
+Object *KinematicCollision2D::get_collider() const {
+
+ if (collision.collider) {
+ return ObjectDB::get_instance(collision.collider);
+ }
+
+ return NULL;
+}
+ObjectID KinematicCollision2D::get_collider_id() const {
+
+ return collision.collider;
+}
+Object *KinematicCollision2D::get_collider_shape() const {
+
+ Object *collider = get_collider();
+ if (collider) {
+ CollisionObject2D *obj2d = Object::cast_to<CollisionObject2D>(collider);
+ if (obj2d) {
+ uint32_t ownerid = obj2d->shape_find_owner(collision.collider_shape);
+ return obj2d->shape_owner_get_owner(ownerid);
+ }
+ }
+
+ return NULL;
+}
+int KinematicCollision2D::get_collider_shape_index() const {
+
+ return collision.collider_shape;
+}
+Vector2 KinematicCollision2D::get_collider_velocity() const {
+
+ return collision.collider_vel;
+}
+Variant KinematicCollision2D::get_collider_metadata() const {
+
+ return Variant();
+}
+
+void KinematicCollision2D::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("get_position"), &KinematicCollision2D::get_position);
+ ClassDB::bind_method(D_METHOD("get_normal"), &KinematicCollision2D::get_normal);
+ ClassDB::bind_method(D_METHOD("get_travel"), &KinematicCollision2D::get_travel);
+ ClassDB::bind_method(D_METHOD("get_remainder"), &KinematicCollision2D::get_remainder);
+ ClassDB::bind_method(D_METHOD("get_local_shape"), &KinematicCollision2D::get_local_shape);
+ ClassDB::bind_method(D_METHOD("get_collider"), &KinematicCollision2D::get_collider);
+ ClassDB::bind_method(D_METHOD("get_collider_id"), &KinematicCollision2D::get_collider_id);
+ ClassDB::bind_method(D_METHOD("get_collider_shape"), &KinematicCollision2D::get_collider_shape);
+ ClassDB::bind_method(D_METHOD("get_collider_shape_index"), &KinematicCollision2D::get_collider_shape_index);
+ ClassDB::bind_method(D_METHOD("get_collider_velocity"), &KinematicCollision2D::get_collider_velocity);
+ ClassDB::bind_method(D_METHOD("get_collider_metadata"), &KinematicCollision2D::get_collider_metadata);
+
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position"), "", "get_position");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "", "get_normal");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "travel"), "", "get_travel");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "remainder"), "", "get_remainder");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "local_shape"), "", "get_local_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_collider");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id"), "", "get_collider_id");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider_shape"), "", "get_collider_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape_index"), "", "get_collider_shape_index");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "collider_velocity"), "", "get_collider_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::NIL, "collider_metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "", "get_collider_metadata");
+}
+
+KinematicCollision2D::KinematicCollision2D() {
+ collision.collider = 0;
+ collision.collider_shape = 0;
+ collision.local_shape = 0;
+ owner = NULL;
}
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 1a4b0c0f5c..b82771a8f4 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -34,6 +34,8 @@
#include "servers/physics_2d_server.h"
#include "vset.h"
+class KinematicCollision2D;
+
class PhysicsBody2D : public CollisionObject2D {
GDCLASS(PhysicsBody2D, CollisionObject2D);
@@ -288,42 +290,62 @@ private:
bool on_ceiling;
bool on_wall;
Vector<Collision> colliders;
+ Vector<Ref<KinematicCollision2D> > slide_colliders;
+ Ref<KinematicCollision2D> motion_cache;
_FORCE_INLINE_ bool _ignores_mode(Physics2DServer::BodyMode) const;
- Dictionary _move(const Vector2 &p_motion);
+ Ref<KinematicCollision2D> _move(const Vector2 &p_motion);
+ Ref<KinematicCollision2D> _get_slide_collision(int p_bounce);
protected:
static void _bind_methods();
public:
- bool move(const Vector2 &p_motion, Collision &r_collision);
+ bool move_and_collide(const Vector2 &p_motion, Collision &r_collision);
bool test_move(const Transform2D &p_from, const Vector2 &p_motion);
void set_safe_margin(float p_margin);
float get_safe_margin() const;
- Vector2 move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction = Vector2(0, 0), float p_slope_stop_min_velocity = 5, int p_max_bounces = 4, float p_floor_max_angle = Math::deg2rad((float)45));
+ Vector2 move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction = Vector2(0, 0), float p_slope_stop_min_velocity = 5, int p_max_slides = 4, float p_floor_max_angle = Math::deg2rad((float)45));
bool is_on_floor() const;
bool is_on_wall() const;
bool is_on_ceiling() const;
Vector2 get_floor_velocity() const;
- int get_collision_count() const;
- Vector2 get_collision_position(int p_collision) const;
- Vector2 get_collision_normal(int p_collision) const;
- Vector2 get_collision_travel(int p_collision) const;
- Vector2 get_collision_remainder(int p_collision) const;
- Object *get_collision_local_shape(int p_collision) const;
- Object *get_collision_collider(int p_collision) const;
- ObjectID get_collision_collider_id(int p_collision) const;
- Object *get_collision_collider_shape(int p_collision) const;
- int get_collision_collider_shape_index(int p_collision) const;
- Vector2 get_collision_collider_velocity(int p_collision) const;
- Variant get_collision_collider_metadata(int p_collision) const;
+ int get_slide_count() const;
+ Collision get_slide_collision(int p_bounce) const;
KinematicBody2D();
~KinematicBody2D();
};
+class KinematicCollision2D : public Reference {
+
+ GDCLASS(KinematicCollision2D, Reference);
+
+ KinematicBody2D *owner;
+ friend class KinematicBody2D;
+ KinematicBody2D::Collision collision;
+
+protected:
+ static void _bind_methods();
+
+public:
+ Vector2 get_position() const;
+ Vector2 get_normal() const;
+ Vector2 get_travel() const;
+ Vector2 get_remainder() const;
+ Object *get_local_shape() const;
+ Object *get_collider() const;
+ ObjectID get_collider_id() const;
+ Object *get_collider_shape() const;
+ int get_collider_shape_index() const;
+ Vector2 get_collider_velocity() const;
+ Variant get_collider_metadata() const;
+
+ KinematicCollision2D();
+};
+
#endif // PHYSICS_BODY_2D_H
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index c9bf6675d2..bf7c5a3ba4 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -399,6 +399,9 @@ void TouchScreenButton::_bind_methods() {
ADD_SIGNAL(MethodInfo("pressed"));
ADD_SIGNAL(MethodInfo("released"));
+
+ BIND_ENUM_CONSTANT(VISIBILITY_ALWAYS);
+ BIND_ENUM_CONSTANT(VISIBILITY_TOUCHSCREEN_ONLY);
}
TouchScreenButton::TouchScreenButton() {
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 217cb71230..266bc5e381 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -729,6 +729,12 @@ void Area::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");
+
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE);
}
Area::Area()
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index caf313190b..147d3bf115 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -31,7 +31,6 @@
#include "arvr_nodes.h"
#include "core/os/input.h"
#include "servers/arvr/arvr_interface.h"
-#include "servers/arvr/arvr_positional_tracker.h"
#include "servers/arvr_server.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -142,6 +141,7 @@ void ARVRController::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_joystick_axis", "axis"), &ARVRController::get_joystick_axis);
ClassDB::bind_method(D_METHOD("get_is_active"), &ARVRController::get_is_active);
+ ClassDB::bind_method(D_METHOD("get_hand"), &ARVRController::get_hand);
ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::INT, "button")));
ADD_SIGNAL(MethodInfo("button_release", PropertyInfo(Variant::INT, "button")));
@@ -184,7 +184,7 @@ int ARVRController::get_joystick_id() const {
int ARVRController::is_button_pressed(int p_button) const {
int joy_id = get_joystick_id();
- if (joy_id == 0) {
+ if (joy_id == -1) {
return false;
};
@@ -193,7 +193,7 @@ int ARVRController::is_button_pressed(int p_button) const {
float ARVRController::get_joystick_axis(int p_axis) const {
int joy_id = get_joystick_id();
- if (joy_id == 0) {
+ if (joy_id == -1) {
return 0.0;
};
@@ -204,6 +204,19 @@ bool ARVRController::get_is_active() const {
return is_active;
};
+ARVRPositionalTracker::TrackerHand ARVRController::get_hand() const {
+ // get our ARVRServer
+ ARVRServer *arvr_server = ARVRServer::get_singleton();
+ ERR_FAIL_NULL_V(arvr_server, ARVRPositionalTracker::TRACKER_HAND_UNKNOWN);
+
+ ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id);
+ if (tracker == NULL) {
+ return ARVRPositionalTracker::TRACKER_HAND_UNKNOWN;
+ };
+
+ return tracker->get_hand();
+};
+
String ARVRController::get_configuration_warning() const {
if (!is_visible() || !is_inside_tree())
return String();
diff --git a/scene/3d/arvr_nodes.h b/scene/3d/arvr_nodes.h
index 4c14be71b5..5269ec0248 100644
--- a/scene/3d/arvr_nodes.h
+++ b/scene/3d/arvr_nodes.h
@@ -33,6 +33,7 @@
#include "scene/3d/camera.h"
#include "scene/3d/spatial.h"
+#include "servers/arvr/arvr_positional_tracker.h"
/**
@author Bastiaan Olij <mux213@gmail.com>
@@ -84,6 +85,7 @@ public:
float get_joystick_axis(int p_axis) const;
bool get_is_active() const;
+ ARVRPositionalTracker::TrackerHand get_hand() const;
String get_configuration_warning() const;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index a69bec2fc8..b8c6a86f55 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -72,34 +72,13 @@ void AudioStreamPlayer3D::_mix_audio() {
//mix!
- int buffers = 0;
- int first = 0;
-
- switch (AudioServer::get_singleton()->get_speaker_mode()) {
-
- case AudioServer::SPEAKER_MODE_STEREO: {
- buffers = 1;
- first = 0;
-
- } break;
- case AudioServer::SPEAKER_SURROUND_51: {
- buffers = 2;
- first = 1;
-
- } break;
- case AudioServer::SPEAKER_SURROUND_71: {
-
- buffers = 3;
- first = 1;
-
- } break;
- }
+ int buffers = AudioServer::get_singleton()->get_channel_count();
for (int k = 0; k < buffers; k++) {
AudioFrame vol_inc = (current.vol[k] - prev_outputs[i].vol[k]) / float(buffer_size);
AudioFrame vol = current.vol[k];
- AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, first + k);
+ AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, k);
current.filter.set_mode(AudioFilterSW::HIGHSHELF);
current.filter.set_sampling_rate(AudioServer::get_singleton()->get_mix_rate());
@@ -146,7 +125,7 @@ void AudioStreamPlayer3D::_mix_audio() {
if (current.reverb_bus_index >= 0) {
- AudioFrame *rtarget = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.reverb_bus_index, first + k);
+ AudioFrame *rtarget = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.reverb_bus_index, k);
if (current.reverb_bus_index == prev_outputs[i].reverb_bus_index) {
AudioFrame rvol_inc = (current.reverb_vol[k] - prev_outputs[i].reverb_vol[k]) / float(buffer_size);
@@ -341,49 +320,57 @@ void AudioStreamPlayer3D::_notification(int p_what) {
flat_pos.y = 0;
flat_pos.normalize();
- switch (AudioServer::get_singleton()->get_speaker_mode()) {
+ unsigned int cc = AudioServer::get_singleton()->get_channel_count();
+ if (cc == 1) {
+ // Stereo pair
+ float c = flat_pos.x * 0.5 + 0.5;
- case AudioServer::SPEAKER_MODE_STEREO: {
-
- float c = flat_pos.x * 0.5 + 0.5;
- output.vol[0].l = 1.0 - c;
- output.vol[0].r = c;
-
- output.vol[0] *= multiplier;
+ output.vol[0].l = 1.0 - c;
+ output.vol[0].r = c;
+ } else {
+ Vector3 camtopos = global_pos - camera->get_global_transform().origin;
+ float c = camtopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
+ float angle = Math::rad2deg(Math::acos(c));
+ float av = angle * (flat_pos.x < 0 ? -1 : 1) / 180.0;
- } break;
- case AudioServer::SPEAKER_SURROUND_51: {
+ if (cc >= 1) {
+ // Stereo pair
+ float fl = Math::abs(1.0 - Math::abs(-0.8 - av));
+ float fr = Math::abs(1.0 - Math::abs(0.8 - av));
- float xl = Vector3(-1, 0, -1).normalized().dot(flat_pos) * 0.5 + 0.5;
- float xr = Vector3(1, 0, -1).normalized().dot(flat_pos) * 0.5 + 0.5;
+ output.vol[0].l = fl;
+ output.vol[0].r = fr;
+ }
- output.vol[0].l = xl;
- output.vol[1].r = 1.0 - xl;
- output.vol[0].r = xr;
- output.vol[1].l = 1.0 - xr;
+ if (cc >= 2) {
+ // Center pair
+ float center = 1.0 - Math::sin(Math::acos(c));
- output.vol[0] *= multiplier;
- output.vol[1] *= multiplier;
- } break;
- case AudioServer::SPEAKER_SURROUND_71: {
+ output.vol[1].l = center;
+ output.vol[1].r = center;
+ }
- float xl = Vector3(-1, 0, -1).normalized().dot(flat_pos) * 0.5 + 0.5;
- float xr = Vector3(1, 0, -1).normalized().dot(flat_pos) * 0.5 + 0.5;
+ if (cc >= 3) {
+ // Side pair
+ float sl = Math::abs(1.0 - Math::abs(-0.4 - av));
+ float sr = Math::abs(1.0 - Math::abs(0.4 - av));
- output.vol[0].l = xl;
- output.vol[1].r = 1.0 - xl;
- output.vol[0].r = xr;
- output.vol[1].l = 1.0 - xr;
+ output.vol[2].l = sl;
+ output.vol[2].r = sr;
+ }
- float c = flat_pos.x * 0.5 + 0.5;
- output.vol[2].l = 1.0 - c;
- output.vol[2].r = c;
+ if (cc >= 4) {
+ // Rear pair
+ float rl = Math::abs(1.0 - Math::abs(-0.2 - av));
+ float rr = Math::abs(1.0 - Math::abs(0.2 - av));
- output.vol[0] *= multiplier;
- output.vol[1] *= multiplier;
- output.vol[2] *= multiplier;
+ output.vol[3].l = rl;
+ output.vol[3].r = rr;
+ }
+ }
- } break;
+ for (int k = 0; k < cc; k++) {
+ output.vol[k] *= multiplier;
}
bool filled_reverb = false;
@@ -422,41 +409,30 @@ void AudioStreamPlayer3D::_notification(int p_what) {
rev_pos.y = 0;
rev_pos.normalize();
- switch (AudioServer::get_singleton()->get_speaker_mode()) {
-
- case AudioServer::SPEAKER_MODE_STEREO: {
-
- float c = rev_pos.x * 0.5 + 0.5;
- output.reverb_vol[0].l = 1.0 - c;
- output.reverb_vol[0].r = c;
-
- } break;
- case AudioServer::SPEAKER_SURROUND_51: {
-
- float xl = Vector3(-1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
- float xr = Vector3(1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
-
- output.reverb_vol[0].l = xl;
- output.reverb_vol[1].r = 1.0 - xl;
- output.reverb_vol[0].r = xr;
- output.reverb_vol[1].l = 1.0 - xr;
-
- } break;
- case AudioServer::SPEAKER_SURROUND_71: {
-
- float xl = Vector3(-1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
- float xr = Vector3(1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
+ if (cc >= 1) {
+ // Stereo pair
+ float c = rev_pos.x * 0.5 + 0.5;
+ output.reverb_vol[0].l = 1.0 - c;
+ output.reverb_vol[0].r = c;
+ }
- output.reverb_vol[0].l = xl;
- output.reverb_vol[1].r = 1.0 - xl;
- output.reverb_vol[0].r = xr;
- output.reverb_vol[1].l = 1.0 - xr;
+ if (cc >= 3) {
+ // Center pair + Side pair
+ float xl = Vector3(-1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
+ float xr = Vector3(1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
- float c = rev_pos.x * 0.5 + 0.5;
- output.reverb_vol[2].l = 1.0 - c;
- output.reverb_vol[2].r = c;
+ output.reverb_vol[1].l = xl;
+ output.reverb_vol[1].r = xr;
+ output.reverb_vol[2].l = 1.0 - xr;
+ output.reverb_vol[2].r = 1.0 - xl;
+ }
- } break;
+ if (cc >= 4) {
+ // Rear pair
+ // FIXME: Not sure what math should be done here
+ float c = rev_pos.x * 0.5 + 0.5;
+ output.reverb_vol[3].l = 1.0 - c;
+ output.reverb_vol[3].r = c;
}
for (int i = 0; i < vol_index_max; i++) {
@@ -530,13 +506,15 @@ void AudioStreamPlayer3D::_notification(int p_what) {
setseek = setplay;
active = true;
setplay = -1;
- _change_notify("playing"); //update property in editor
+ //do not update, this makes it easier to animate (will shut off otherise)
+ ///_change_notify("playing"); //update property in editor
}
//stop playing if no longer active
if (!active) {
set_fixed_process_internal(false);
- _change_notify("playing"); //update property in editor
+ //do not update, this makes it easier to animate (will shut off otherise)
+ //_change_notify("playing"); //update property in editor
emit_signal("finished");
}
}
@@ -877,7 +855,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "_is_active");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_RANGE, "0,65536,1"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::INT, "out_of_range_mode", PROPERTY_HINT_ENUM, "Mix,Pause"), "set_out_of_range_mode", "get_out_of_range_mode");
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index 8603cab5a4..b729b55f7e 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -40,12 +40,12 @@ private:
AudioFilterSW filter;
AudioFilterSW::Processor filter_process[6];
- AudioFrame vol[3];
+ AudioFrame vol[4];
float filter_gain;
float pitch_scale;
int bus_index;
int reverb_bus_index;
- AudioFrame reverb_vol[3];
+ AudioFrame reverb_vol[4];
Viewport *viewport; //pointer only used for reference to previous mix
Output() {
diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp
index e1a5329fb0..2580b645e2 100644
--- a/scene/3d/bone_attachment.cpp
+++ b/scene/3d/bone_attachment.cpp
@@ -71,7 +71,8 @@ void BoneAttachment::_get_property_list(List<PropertyInfo> *p_list) const {
void BoneAttachment::_check_bind() {
- if (Skeleton *sk = Object::cast_to<Skeleton>(get_parent())) {
+ Skeleton *sk = Object::cast_to<Skeleton>(get_parent());
+ if (sk) {
int idx = sk->find_bone(bone_name);
if (idx != -1) {
@@ -86,7 +87,8 @@ void BoneAttachment::_check_unbind() {
if (bound) {
- if (Skeleton *sk = Object::cast_to<Skeleton>(get_parent())) {
+ Skeleton *sk = Object::cast_to<Skeleton>(get_parent());
+ if (sk) {
int idx = sk->find_bone(bone_name);
if (idx != -1) {
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index 5f1151f8e9..f49d89122d 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -50,7 +50,8 @@ void CollisionShape::make_convex_from_brothers() {
for (int i = 0; i < p->get_child_count(); i++) {
Node *n = p->get_child(i);
- if (MeshInstance *mi = Object::cast_to<MeshInstance>(n)) {
+ MeshInstance *mi = Object::cast_to<MeshInstance>(n);
+ if (mi) {
Ref<Mesh> m = mi->get_mesh();
if (m.is_valid()) {
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index bb54a43028..66364d40f9 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -696,22 +696,6 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
p_baker->bake_cells[p_idx].normal[2] += normal_accum.z;
p_baker->bake_cells[p_idx].alpha += alpha;
- static const Vector3 side_normals[6] = {
- Vector3(-1, 0, 0),
- Vector3(1, 0, 0),
- Vector3(0, -1, 0),
- Vector3(0, 1, 0),
- Vector3(0, 0, -1),
- Vector3(0, 0, 1),
- };
-
- /*
- for(int i=0;i<6;i++) {
- if (normal.dot(side_normals[i])>CMP_EPSILON) {
- p_baker->bake_cells[p_idx].used_sides|=(1<<i);
- }
- }*/
-
} else {
//go down
@@ -1092,7 +1076,7 @@ void GIProbe::_plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, Baker *p_b
void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) {
MeshInstance *mi = Object::cast_to<MeshInstance>(p_at_node);
- if (mi && mi->get_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT)) {
+ if (mi && mi->get_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT) && mi->is_visible_in_tree()) {
Ref<Mesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
@@ -1113,25 +1097,29 @@ void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) {
}
}
- if (Spatial *s = Object::cast_to<Spatial>(p_at_node)) {
+ Spatial *s = Object::cast_to<Spatial>(p_at_node);
+ if (s) {
- Array meshes = p_at_node->call("get_meshes");
- for (int i = 0; i < meshes.size(); i += 2) {
+ if (s->is_visible_in_tree()) {
- Transform mxf = meshes[i];
- Ref<Mesh> mesh = meshes[i + 1];
- if (!mesh.is_valid())
- continue;
+ Array meshes = p_at_node->call("get_meshes");
+ for (int i = 0; i < meshes.size(); i += 2) {
- Rect3 aabb = mesh->get_aabb();
+ Transform mxf = meshes[i];
+ Ref<Mesh> mesh = meshes[i + 1];
+ if (!mesh.is_valid())
+ continue;
- Transform xf = get_global_transform().affine_inverse() * (s->get_global_transform() * mxf);
+ Rect3 aabb = mesh->get_aabb();
- if (Rect3(-extents, extents * 2).intersects(xf.xform(aabb))) {
- Baker::PlotMesh pm;
- pm.local_xform = xf;
- pm.mesh = mesh;
- p_baker->mesh_list.push_back(pm);
+ Transform xf = get_global_transform().affine_inverse() * (s->get_global_transform() * mxf);
+
+ if (Rect3(-extents, extents * 2).intersects(xf.xform(aabb))) {
+ Baker::PlotMesh pm;
+ pm.local_xform = xf;
+ pm.mesh = mesh;
+ p_baker->mesh_list.push_back(pm);
+ }
}
}
}
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index 157ae42571..0f281b694d 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -55,8 +55,8 @@ void InterpolatedCamera::_notification(int p_what) {
Transform local_transform = get_global_transform();
local_transform = local_transform.interpolate_with(target_xform, delta);
set_global_transform(local_transform);
-
- if (Camera *cam = Object::cast_to<Camera>(node)) {
+ Camera *cam = Object::cast_to<Camera>(node);
+ if (cam) {
if (cam->get_projection() == get_projection()) {
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 09b253b309..7402e664d9 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -230,7 +230,6 @@ void Light::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_shadow_color", "get_shadow_color");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_max_distance", PROPERTY_HINT_RANGE, "0,65536,0.1"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_reverse_cull_face"), "set_shadow_reverse_cull_face", "get_shadow_reverse_cull_face");
ADD_GROUP("Editor", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
@@ -308,6 +307,16 @@ DirectionalLight::ShadowMode DirectionalLight::get_shadow_mode() const {
return shadow_mode;
}
+void DirectionalLight::set_shadow_depth_range(ShadowDepthRange p_range) {
+ shadow_depth_range = p_range;
+ VS::get_singleton()->light_directional_set_shadow_depth_range_mode(light, VS::LightDirectionalShadowDepthRangeMode(p_range));
+}
+
+DirectionalLight::ShadowDepthRange DirectionalLight::get_shadow_depth_range() const {
+
+ return shadow_depth_range;
+}
+
void DirectionalLight::set_blend_splits(bool p_enable) {
blend_splits = p_enable;
@@ -324,6 +333,9 @@ void DirectionalLight::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shadow_mode", "mode"), &DirectionalLight::set_shadow_mode);
ClassDB::bind_method(D_METHOD("get_shadow_mode"), &DirectionalLight::get_shadow_mode);
+ ClassDB::bind_method(D_METHOD("set_shadow_depth_range", "mode"), &DirectionalLight::set_shadow_depth_range);
+ ClassDB::bind_method(D_METHOD("get_shadow_depth_range"), &DirectionalLight::get_shadow_depth_range);
+
ClassDB::bind_method(D_METHOD("set_blend_splits", "enabled"), &DirectionalLight::set_blend_splits);
ClassDB::bind_method(D_METHOD("is_blend_splits_enabled"), &DirectionalLight::is_blend_splits_enabled);
@@ -335,10 +347,15 @@ void DirectionalLight::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_depth_range", PROPERTY_HINT_ENUM, "Stable,Optimized"), "set_shadow_depth_range", "get_shadow_depth_range");
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_max_distance", PROPERTY_HINT_RANGE, "0,65536,0.1"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL);
BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
BIND_ENUM_CONSTANT(SHADOW_PARALLEL_4_SPLITS);
+
+ BIND_ENUM_CONSTANT(SHADOW_DEPTH_RANGE_STABLE);
+ BIND_ENUM_CONSTANT(SHADOW_DEPTH_RANGE_OPTIMIZED);
}
DirectionalLight::DirectionalLight()
@@ -349,6 +366,7 @@ DirectionalLight::DirectionalLight()
set_param(PARAM_SHADOW_MAX_DISTANCE, 200);
set_param(PARAM_SHADOW_BIAS_SPLIT_SCALE, 0.25);
set_shadow_mode(SHADOW_PARALLEL_4_SPLITS);
+ set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);
blend_splits = false;
}
@@ -387,6 +405,12 @@ void OmniLight::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_attenuation", PROPERTY_HINT_EXP_EASING), "set_param", "get_param", PARAM_ATTENUATION);
ADD_PROPERTY(PropertyInfo(Variant::INT, "omni_shadow_mode", PROPERTY_HINT_ENUM, "Dual Paraboloid,Cube"), "set_shadow_mode", "get_shadow_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "omni_shadow_detail", PROPERTY_HINT_ENUM, "Vertical,Horizontal"), "set_shadow_detail", "get_shadow_detail");
+
+ BIND_ENUM_CONSTANT(SHADOW_DUAL_PARABOLOID);
+ BIND_ENUM_CONSTANT(SHADOW_CUBE);
+
+ BIND_ENUM_CONSTANT(SHADOW_DETAIL_VERTICAL);
+ BIND_ENUM_CONSTANT(SHADOW_DETAIL_HORIZONTAL);
}
OmniLight::OmniLight()
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 5d589d33e5..2f3ac8a5e7 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -133,9 +133,15 @@ public:
SHADOW_PARALLEL_4_SPLITS
};
+ enum ShadowDepthRange {
+ SHADOW_DEPTH_RANGE_STABLE = VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE,
+ SHADOW_DEPTH_RANGE_OPTIMIZED = VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED,
+ };
+
private:
bool blend_splits;
ShadowMode shadow_mode;
+ ShadowDepthRange shadow_depth_range;
protected:
static void _bind_methods();
@@ -144,6 +150,9 @@ public:
void set_shadow_mode(ShadowMode p_mode);
ShadowMode get_shadow_mode() const;
+ void set_shadow_depth_range(ShadowDepthRange p_range);
+ ShadowDepthRange get_shadow_depth_range() const;
+
void set_blend_splits(bool p_enable);
bool is_blend_splits_enabled() const;
@@ -151,6 +160,7 @@ public:
};
VARIANT_ENUM_CAST(DirectionalLight::ShadowMode)
+VARIANT_ENUM_CAST(DirectionalLight::ShadowDepthRange)
class OmniLight : public Light {
diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp
index 7a55f956e0..40750cdfe8 100644
--- a/scene/3d/navigation_mesh.cpp
+++ b/scene/3d/navigation_mesh.cpp
@@ -63,6 +63,143 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
}
}
+void NavigationMesh::set_sample_partition_type(int p_value) {
+ ERR_FAIL_COND(p_value >= SAMPLE_PARTITION_MAX);
+ partition_type = static_cast<SamplePartitionType>(p_value);
+}
+
+int NavigationMesh::get_sample_partition_type() const {
+ return static_cast<int>(partition_type);
+}
+
+void NavigationMesh::set_cell_size(float p_value) {
+ cell_size = p_value;
+}
+
+float NavigationMesh::get_cell_size() const {
+ return cell_size;
+}
+
+void NavigationMesh::set_cell_height(float p_value) {
+ cell_height = p_value;
+}
+
+float NavigationMesh::get_cell_height() const {
+ return cell_height;
+}
+
+void NavigationMesh::set_agent_height(float p_value) {
+ agent_height = p_value;
+}
+
+float NavigationMesh::get_agent_height() const {
+ return agent_height;
+}
+
+void NavigationMesh::set_agent_radius(float p_value) {
+ agent_radius = p_value;
+}
+
+float NavigationMesh::get_agent_radius() {
+ return agent_radius;
+}
+
+void NavigationMesh::set_agent_max_climb(float p_value) {
+ agent_max_climb = p_value;
+}
+
+float NavigationMesh::get_agent_max_climb() const {
+ return agent_max_climb;
+}
+
+void NavigationMesh::set_agent_max_slope(float p_value) {
+ agent_max_slope = p_value;
+}
+
+float NavigationMesh::get_agent_max_slope() const {
+ return agent_max_slope;
+}
+
+void NavigationMesh::set_region_min_size(float p_value) {
+ region_min_size = p_value;
+}
+
+float NavigationMesh::get_region_min_size() const {
+ return region_min_size;
+}
+
+void NavigationMesh::set_region_merge_size(float p_value) {
+ region_merge_size = p_value;
+}
+
+float NavigationMesh::get_region_merge_size() const {
+ return region_merge_size;
+}
+
+void NavigationMesh::set_edge_max_length(float p_value) {
+ edge_max_length = p_value;
+}
+
+float NavigationMesh::get_edge_max_length() const {
+ return edge_max_length;
+}
+
+void NavigationMesh::set_edge_max_error(float p_value) {
+ edge_max_error = p_value;
+}
+
+float NavigationMesh::get_edge_max_error() const {
+ return edge_max_error;
+}
+
+void NavigationMesh::set_verts_per_poly(float p_value) {
+ verts_per_poly = p_value;
+}
+
+float NavigationMesh::get_verts_per_poly() const {
+ return verts_per_poly;
+}
+
+void NavigationMesh::set_detail_sample_distance(float p_value) {
+ detail_sample_distance = p_value;
+}
+
+float NavigationMesh::get_detail_sample_distance() const {
+ return detail_sample_distance;
+}
+
+void NavigationMesh::set_detail_sample_max_error(float p_value) {
+ detail_sample_max_error = p_value;
+}
+
+float NavigationMesh::get_detail_sample_max_error() const {
+ return detail_sample_max_error;
+}
+
+void NavigationMesh::set_filter_low_hanging_obstacles(bool p_value) {
+ filter_low_hanging_obstacles = p_value;
+}
+
+bool NavigationMesh::get_filter_low_hanging_obstacles() const {
+ return filter_low_hanging_obstacles;
+}
+
+void NavigationMesh::set_filter_ledge_spans(bool p_value) {
+ filter_ledge_spans = p_value;
+}
+
+bool NavigationMesh::get_filter_ledge_spans() const {
+ return filter_ledge_spans;
+}
+
+void NavigationMesh::set_filter_walkable_low_height_spans(bool p_value) {
+ filter_walkable_low_height_spans = p_value;
+}
+
+bool NavigationMesh::get_filter_walkable_low_height_spans() const {
+ return filter_walkable_low_height_spans;
+}
+
void NavigationMesh::set_vertices(const PoolVector<Vector3> &p_vertices) {
vertices = p_vertices;
@@ -199,6 +336,56 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
}
void NavigationMesh::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_sample_partition_type", "sample_partition_type"), &NavigationMesh::set_sample_partition_type);
+ ClassDB::bind_method(D_METHOD("get_sample_partition_type"), &NavigationMesh::get_sample_partition_type);
+
+ ClassDB::bind_method(D_METHOD("set_cell_size", "cell_size"), &NavigationMesh::set_cell_size);
+ ClassDB::bind_method(D_METHOD("get_cell_size"), &NavigationMesh::get_cell_size);
+
+ ClassDB::bind_method(D_METHOD("set_cell_height", "cell_height"), &NavigationMesh::set_cell_height);
+ ClassDB::bind_method(D_METHOD("get_cell_height"), &NavigationMesh::get_cell_height);
+
+ ClassDB::bind_method(D_METHOD("set_agent_height", "agent_height"), &NavigationMesh::set_agent_height);
+ ClassDB::bind_method(D_METHOD("get_agent_height"), &NavigationMesh::get_agent_height);
+
+ ClassDB::bind_method(D_METHOD("set_agent_radius", "agent_radius"), &NavigationMesh::set_agent_radius);
+ ClassDB::bind_method(D_METHOD("get_agent_radius"), &NavigationMesh::get_agent_radius);
+
+ ClassDB::bind_method(D_METHOD("set_agent_max_climb", "agent_max_climb"), &NavigationMesh::set_agent_max_climb);
+ ClassDB::bind_method(D_METHOD("get_agent_max_climb"), &NavigationMesh::get_agent_max_climb);
+
+ ClassDB::bind_method(D_METHOD("set_agent_max_slope", "agent_max_slope"), &NavigationMesh::set_agent_max_slope);
+ ClassDB::bind_method(D_METHOD("get_agent_max_slope"), &NavigationMesh::get_agent_max_slope);
+
+ ClassDB::bind_method(D_METHOD("set_region_min_size", "region_min_size"), &NavigationMesh::set_region_min_size);
+ ClassDB::bind_method(D_METHOD("get_region_min_size"), &NavigationMesh::get_region_min_size);
+
+ ClassDB::bind_method(D_METHOD("set_region_merge_size", "region_merge_size"), &NavigationMesh::set_region_merge_size);
+ ClassDB::bind_method(D_METHOD("get_region_merge_size"), &NavigationMesh::get_region_merge_size);
+
+ ClassDB::bind_method(D_METHOD("set_edge_max_length", "edge_max_length"), &NavigationMesh::set_edge_max_length);
+ ClassDB::bind_method(D_METHOD("get_edge_max_length"), &NavigationMesh::get_edge_max_length);
+
+ ClassDB::bind_method(D_METHOD("set_edge_max_error", "edge_max_error"), &NavigationMesh::set_edge_max_error);
+ ClassDB::bind_method(D_METHOD("get_edge_max_error"), &NavigationMesh::get_edge_max_error);
+
+ ClassDB::bind_method(D_METHOD("set_verts_per_poly", "verts_per_poly"), &NavigationMesh::set_verts_per_poly);
+ ClassDB::bind_method(D_METHOD("get_verts_per_poly"), &NavigationMesh::get_verts_per_poly);
+
+ ClassDB::bind_method(D_METHOD("set_detail_sample_distance", "detail_sample_dist"), &NavigationMesh::set_detail_sample_distance);
+ ClassDB::bind_method(D_METHOD("get_detail_sample_distance"), &NavigationMesh::get_detail_sample_distance);
+
+ ClassDB::bind_method(D_METHOD("set_detail_sample_max_error", "detail_sample_max_error"), &NavigationMesh::set_detail_sample_max_error);
+ ClassDB::bind_method(D_METHOD("get_detail_sample_max_error"), &NavigationMesh::get_detail_sample_max_error);
+
+ ClassDB::bind_method(D_METHOD("set_filter_low_hanging_obstacles", "filter_low_hanging_obstacles"), &NavigationMesh::set_filter_low_hanging_obstacles);
+ ClassDB::bind_method(D_METHOD("get_filter_low_hanging_obstacles"), &NavigationMesh::get_filter_low_hanging_obstacles);
+
+ ClassDB::bind_method(D_METHOD("set_filter_ledge_spans", "filter_ledge_spans"), &NavigationMesh::set_filter_ledge_spans);
+ ClassDB::bind_method(D_METHOD("get_filter_ledge_spans"), &NavigationMesh::get_filter_ledge_spans);
+
+ ClassDB::bind_method(D_METHOD("set_filter_walkable_low_height_spans", "filter_walkable_low_height_spans"), &NavigationMesh::set_filter_walkable_low_height_spans);
+ ClassDB::bind_method(D_METHOD("get_filter_walkable_low_height_spans"), &NavigationMesh::get_filter_walkable_low_height_spans);
ClassDB::bind_method(D_METHOD("set_vertices", "vertices"), &NavigationMesh::set_vertices);
ClassDB::bind_method(D_METHOD("get_vertices"), &NavigationMesh::get_vertices);
@@ -213,11 +400,54 @@ void NavigationMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_polygons", "polygons"), &NavigationMesh::_set_polygons);
ClassDB::bind_method(D_METHOD("_get_polygons"), &NavigationMesh::_get_polygons);
+ BIND_CONSTANT(SAMPLE_PARTITION_WATERSHED);
+ BIND_CONSTANT(SAMPLE_PARTITION_MONOTONE);
+ BIND_CONSTANT(SAMPLE_PARTITION_LAYERS);
+
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_vertices", "get_vertices");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_polygons", "_get_polygons");
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "sample_partition_type/sample_partition_type", PROPERTY_HINT_ENUM, "Watershed,Monotone,Layers"), "set_sample_partition_type", "get_sample_partition_type");
+
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01"), "set_cell_height", "get_cell_height");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01"), "set_agent_height", "get_agent_height");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01"), "set_agent_radius", "get_agent_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01"), "set_agent_max_climb", "get_agent_max_climb");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01"), "set_region_min_size", "get_region_min_size");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01"), "set_region_merge_size", "get_region_merge_size");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01"), "set_edge_max_length", "get_edge_max_length");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01"), "set_edge_max_error", "get_edge_max_error");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0"), "set_verts_per_poly", "get_verts_per_poly");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01"), "set_detail_sample_distance", "get_detail_sample_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01"), "set_detail_sample_max_error", "get_detail_sample_max_error");
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/low_hanging_obstacles"), "set_filter_low_hanging_obstacles", "get_filter_low_hanging_obstacles");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/ledge_spans"), "set_filter_ledge_spans", "get_filter_ledge_spans");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/filter_walkable_low_height_spans"), "set_filter_walkable_low_height_spans", "get_filter_walkable_low_height_spans");
}
NavigationMesh::NavigationMesh() {
+ cell_size = 0.3f;
+ cell_height = 0.2f;
+ agent_height = 2.0f;
+ agent_radius = 0.6f;
+ agent_max_climb = 0.9f;
+ agent_max_slope = 45.0f;
+ region_min_size = 8.0f;
+ region_merge_size = 20.0f;
+ edge_max_length = 12.0f;
+ edge_max_error = 1.3f;
+ verts_per_poly = 6.0f;
+ detail_sample_distance = 6.0f;
+ detail_sample_max_error = 1.0f;
+
+ partition_type = SAMPLE_PARTITION_WATERSHED;
+
+ filter_low_hanging_obstacles = false;
+ filter_ledge_spans = false;
+ filter_walkable_low_height_spans = false;
}
void NavigationMeshInstance::set_enabled(bool p_enabled) {
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h
index 36fe3ee34b..dd5ed79500 100644
--- a/scene/3d/navigation_mesh.h
+++ b/scene/3d/navigation_mesh.h
@@ -61,6 +61,87 @@ protected:
Array _get_polygons() const;
public:
+ enum SamplePartitionType {
+ SAMPLE_PARTITION_WATERSHED = 0,
+ SAMPLE_PARTITION_MONOTONE,
+ SAMPLE_PARTITION_LAYERS,
+ SAMPLE_PARTITION_MAX
+ };
+
+protected:
+ float cell_size;
+ float cell_height;
+ float agent_height;
+ float agent_radius;
+ float agent_max_climb;
+ float agent_max_slope;
+ float region_min_size;
+ float region_merge_size;
+ float edge_max_length;
+ float edge_max_error;
+ float verts_per_poly;
+ float detail_sample_distance;
+ float detail_sample_max_error;
+
+ SamplePartitionType partition_type;
+
+ bool filter_low_hanging_obstacles;
+ bool filter_ledge_spans;
+ bool filter_walkable_low_height_spans;
+
+public:
+ // Recast settings
+ void set_sample_partition_type(int p_value);
+ int get_sample_partition_type() const;
+
+ void set_cell_size(float p_value);
+ float get_cell_size() const;
+
+ void set_cell_height(float p_value);
+ float get_cell_height() const;
+
+ void set_agent_height(float p_value);
+ float get_agent_height() const;
+
+ void set_agent_radius(float p_value);
+ float get_agent_radius();
+
+ void set_agent_max_climb(float p_value);
+ float get_agent_max_climb() const;
+
+ void set_agent_max_slope(float p_value);
+ float get_agent_max_slope() const;
+
+ void set_region_min_size(float p_value);
+ float get_region_min_size() const;
+
+ void set_region_merge_size(float p_value);
+ float get_region_merge_size() const;
+
+ void set_edge_max_length(float p_value);
+ float get_edge_max_length() const;
+
+ void set_edge_max_error(float p_value);
+ float get_edge_max_error() const;
+
+ void set_verts_per_poly(float p_value);
+ float get_verts_per_poly() const;
+
+ void set_detail_sample_distance(float p_value);
+ float get_detail_sample_distance() const;
+
+ void set_detail_sample_max_error(float p_value);
+ float get_detail_sample_max_error() const;
+
+ void set_filter_low_hanging_obstacles(bool p_value);
+ bool get_filter_low_hanging_obstacles() const;
+
+ void set_filter_ledge_spans(bool p_value);
+ bool get_filter_ledge_spans() const;
+
+ void set_filter_walkable_low_height_spans(bool p_value);
+ bool get_filter_walkable_low_height_spans() const;
+
void create_from_mesh(const Ref<Mesh> &p_mesh);
void set_vertices(const PoolVector<Vector3> &p_vertices);
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index ed4d88417c..60245fe6ce 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -155,8 +155,8 @@ void PathFollow::_notification(int p_what) {
Node *parent = get_parent();
if (parent) {
-
- if ((path = Object::cast_to<Path>(parent))) {
+ path = Object::cast_to<Path>(parent);
+ if (path) {
_update_transform();
}
}
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 6a8226c0e1..6551deabf2 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -874,6 +874,11 @@ void RigidBody::_bind_methods() {
BIND_ENUM_CONSTANT(MODE_KINEMATIC);
BIND_ENUM_CONSTANT(MODE_RIGID);
BIND_ENUM_CONSTANT(MODE_CHARACTER);
+
+ BIND_ENUM_CONSTANT(AXIS_LOCK_DISABLED);
+ BIND_ENUM_CONSTANT(AXIS_LOCK_X);
+ BIND_ENUM_CONSTANT(AXIS_LOCK_Y);
+ BIND_ENUM_CONSTANT(AXIS_LOCK_Z);
}
RigidBody::RigidBody()
@@ -1061,7 +1066,7 @@ KinematicBody::Collision KinematicBody::get_slide_collision(int p_bounce) const
Ref<KinematicCollision> KinematicBody::_get_slide_collision(int p_bounce) {
ERR_FAIL_INDEX_V(p_bounce, colliders.size(), Ref<KinematicCollision>());
- if (p_bounce > slide_colliders.size()) {
+ if (p_bounce >= slide_colliders.size()) {
slide_colliders.resize(p_bounce + 1);
}
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 7db3bb18bd..91fe426b99 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -175,7 +175,6 @@ void Spatial::_notification(int p_what) {
if (get_script_instance()) {
- Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, NULL, 0);
}
#ifdef TOOLS_ENABLED
@@ -207,7 +206,6 @@ void Spatial::_notification(int p_what) {
if (get_script_instance()) {
- Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_world, NULL, 0);
}
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index d6b3206fbf..3518113130 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -102,6 +102,14 @@ void VehicleWheel::_notification(int p_what) {
}
}
+String VehicleWheel::get_configuration_warning() const {
+ if (!Object::cast_to<VehicleBody>(get_parent())) {
+ return TTR("VehicleWheel serves to provide a wheel system to a VehicleBody. Please use it as a child of a VehicleBody.");
+ }
+
+ return String();
+}
+
void VehicleWheel::_update(PhysicsDirectBodyState *s) {
if (m_raycastInfo.m_isInContact)
diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h
index d67209c58f..eb661adb90 100644
--- a/scene/3d/vehicle_body.h
+++ b/scene/3d/vehicle_body.h
@@ -131,6 +131,8 @@ public:
void set_roll_influence(float p_value);
float get_roll_influence() const;
+ String get_configuration_warning() const;
+
VehicleWheel();
};
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 0464a82f65..fa35d982eb 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -288,12 +288,13 @@ void GeometryInstance::_bind_methods() {
//ADD_SIGNAL( MethodInfo("visibility_changed"));
- BIND_CONSTANT(FLAG_MAX);
+ BIND_ENUM_CONSTANT(SHADOW_CASTING_SETTING_OFF);
+ BIND_ENUM_CONSTANT(SHADOW_CASTING_SETTING_ON);
+ BIND_ENUM_CONSTANT(SHADOW_CASTING_SETTING_DOUBLE_SIDED);
+ BIND_ENUM_CONSTANT(SHADOW_CASTING_SETTING_SHADOWS_ONLY);
- BIND_CONSTANT(SHADOW_CASTING_SETTING_OFF);
- BIND_CONSTANT(SHADOW_CASTING_SETTING_ON);
- BIND_CONSTANT(SHADOW_CASTING_SETTING_DOUBLE_SIDED);
- BIND_CONSTANT(SHADOW_CASTING_SETTING_SHADOWS_ONLY);
+ BIND_ENUM_CONSTANT(FLAG_USE_BAKED_LIGHT);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
}
GeometryInstance::GeometryInstance() {
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index e2330eb0d4..38d0527288 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -1156,6 +1156,7 @@ void AnimationTreePlayer::transition_node_set_xfade_time(const StringName &p_nod
}
void AnimationTreePlayer::TransitionNode::set_current(int p_current) {
+
ERR_FAIL_INDEX(p_current, inputs.size());
if (current == p_current)
@@ -1807,6 +1808,9 @@ void AnimationTreePlayer::_bind_methods() {
BIND_ENUM_CONSTANT(NODE_TIMESCALE);
BIND_ENUM_CONSTANT(NODE_TIMESEEK);
BIND_ENUM_CONSTANT(NODE_TRANSITION);
+
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_IDLE);
}
AnimationTreePlayer::AnimationTreePlayer() {
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 8bd924e7ce..661d085dfd 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -66,29 +66,27 @@ void AudioStreamPlayer::_mix_audio() {
//set volume for next mix
mix_volume_db = volume_db;
- AudioFrame *targets[3] = { NULL, NULL, NULL };
+ AudioFrame *targets[4] = { NULL, NULL, NULL, NULL };
if (AudioServer::get_singleton()->get_speaker_mode() == AudioServer::SPEAKER_MODE_STEREO) {
targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 0);
} else {
switch (mix_target) {
case MIX_TARGET_STEREO: {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 1);
+ targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 0);
} break;
case MIX_TARGET_SURROUND: {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 1);
- targets[1] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 2);
- if (AudioServer::get_singleton()->get_speaker_mode() == AudioServer::SPEAKER_SURROUND_71) {
- targets[2] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 3);
+ for (int i = 0; i < AudioServer::get_singleton()->get_channel_count(); i++) {
+ targets[i] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, i);
}
} break;
case MIX_TARGET_CENTER: {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 0);
+ targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 1);
} break;
}
}
- for (int c = 0; c < 3; c++) {
+ for (int c = 0; c < 4; c++) {
if (!targets[c])
break;
for (int i = 0; i < buffer_size; i++) {
@@ -189,7 +187,7 @@ void AudioStreamPlayer::stop() {
bool AudioStreamPlayer::is_playing() const {
if (stream_playback.is_valid()) {
- return active && stream_playback->is_playing();
+ return active; //&& stream_playback->is_playing();
}
return false;
@@ -304,12 +302,16 @@ void AudioStreamPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "_is_active");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_SIGNAL(MethodInfo("finished"));
+
+ BIND_ENUM_CONSTANT(MIX_TARGET_STEREO);
+ BIND_ENUM_CONSTANT(MIX_TARGET_SURROUND);
+ BIND_ENUM_CONSTANT(MIX_TARGET_CENTER);
}
AudioStreamPlayer::AudioStreamPlayer() {
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 961fccc804..2d5b54257a 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -809,9 +809,9 @@ Ref<StyleBox> Control::get_stylebox(const StringName &p_name, const StringName &
// try with custom themes
Control *theme_owner = data.theme_owner;
- while (theme_owner) {
+ StringName class_name = type;
- StringName class_name = type;
+ while (theme_owner) {
while (class_name != StringName()) {
if (theme_owner->data.theme->has_stylebox(p_name, class_name)) {
@@ -829,6 +829,14 @@ Ref<StyleBox> Control::get_stylebox(const StringName &p_name, const StringName &
theme_owner = NULL;
}
+ class_name = type;
+
+ while (class_name != StringName()) {
+ if (Theme::get_default()->has_stylebox(p_name, class_name))
+ return Theme::get_default()->get_stylebox(p_name, class_name);
+
+ class_name = ClassDB::get_parent_class_nocheck(class_name);
+ }
return Theme::get_default()->get_stylebox(p_name, type);
}
Ref<Font> Control::get_font(const StringName &p_name, const StringName &p_type) const {
@@ -1249,6 +1257,10 @@ void Control::_size_changed() {
new_size_cache.height = MAX(minimum_size.height, new_size_cache.height);
}
+ if (get_viewport()->is_snap_controls_to_pixels_enabled()) {
+ new_size_cache = new_size_cache.floor();
+ new_pos_cache = new_pos_cache.floor();
+ }
bool pos_changed = new_pos_cache != data.pos_cache;
bool size_changed = new_size_cache != data.size_cache;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 140d002387..d4912339da 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -195,7 +195,7 @@ void WindowDialog::_notification(int p_what) {
RID canvas = get_canvas_item();
// Draw the background.
- Ref<StyleBox> panel = get_stylebox("panel", "WindowDialog");
+ Ref<StyleBox> panel = get_stylebox("panel");
Size2 size = get_size();
panel->draw(canvas, Rect2(0, 0, size.x, size.y));
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 990c0f3d96..87a232e766 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -183,8 +183,8 @@ void FileDialog::_action_pressed() {
String path = dir_access->get_current_dir();
path = path.replace("\\", "/");
-
- if (TreeItem *item = tree->get_selected()) {
+ TreeItem *item = tree->get_selected();
+ if (item) {
Dictionary d = item->get_metadata(0);
if (d["dir"]) {
path = path.plus_file(d["name"]);
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index ab2c2f445f..71b9c4ec72 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -540,14 +540,6 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int
it = _get_next_item(it);
- if (p_mode == PROCESS_POINTER && r_click_item && itp && !it && p_click_pos.y > p_ofs.y + y + lh) {
- //at the end of all, return this
- if (r_outside) *r_outside = true;
- *r_click_item = itp;
- *r_click_char = rchar;
- return;
- }
-
if (it && (p_line + 1 < p_frame->lines.size()) && p_frame->lines[p_line + 1].from == it) {
if (p_mode == PROCESS_POINTER && r_click_item && p_click_pos.y >= p_ofs.y + y && p_click_pos.y <= p_ofs.y + y + lh) {
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 4661f54526..8fda5df53c 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -162,18 +162,20 @@ void Slider::_notification(int p_what) {
Size2i size = get_size();
Ref<StyleBox> style = get_stylebox("slider");
Ref<StyleBox> focus = get_stylebox("focus");
+ Ref<StyleBox> grabber_area = get_stylebox("grabber_area");
Ref<Texture> grabber = get_icon(editable ? ((mouse_inside || has_focus()) ? "grabber_highlight" : "grabber") : "grabber_disabled");
Ref<Texture> tick = get_icon("tick");
if (orientation == VERTICAL) {
int widget_width = style->get_minimum_size().width + style->get_center_size().width;
+ float areasize = size.height - grabber->get_size().height;
style->draw(ci, Rect2i(Point2i(size.width / 2 - widget_width / 2, 0), Size2i(widget_width, size.height)));
+ grabber_area->draw(ci, Rect2i(Point2i((size.width - widget_width) / 2, size.height - areasize * get_as_ratio() - grabber->get_size().height / 2), Size2i(widget_width, areasize * get_as_ratio() + grabber->get_size().width / 2)));
/*
if (mouse_inside||has_focus())
focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height)));
*/
- float areasize = size.height - grabber->get_size().height;
if (ticks > 1) {
int tickarea = size.height - tick->get_height();
for (int i = 0; i < ticks; i++) {
@@ -186,13 +188,15 @@ void Slider::_notification(int p_what) {
} else {
int widget_height = style->get_minimum_size().height + style->get_center_size().height;
- style->draw(ci, Rect2i(Point2i(0, size.height / 2 - widget_height / 2), Size2i(size.width, widget_height)));
+ float areasize = size.width - grabber->get_size().width;
+
+ style->draw(ci, Rect2i(Point2i(0, (size.height - widget_height) / 2), Size2i(size.width, widget_height)));
+ grabber_area->draw(ci, Rect2i(Point2i(0, (size.height - widget_height) / 2), Size2i(areasize * get_as_ratio() + grabber->get_size().width / 2, widget_height)));
/*
if (mouse_inside||has_focus())
focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height)));
*/
- float areasize = size.width - grabber->get_size().width;
if (ticks > 1) {
int tickarea = size.width - tick->get_width();
for (int i = 0; i < ticks; i++) {
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 461ae3444b..98a8db336e 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -208,6 +208,9 @@ void TabContainer::_notification(int p_what) {
break;
}
+ // Draw the tab area.
+ panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
+
// Draw all visible tabs.
int x = 0;
for (int i = 0; i < tab_widths.size(); i++) {
@@ -280,9 +283,6 @@ void TabContainer::_notification(int p_what) {
Point2(x, y_center - (decrement->get_height() / 2)),
Color(1, 1, 1, first_tab_cache > 0 ? 1.0 : 0.5));
}
-
- // Draw the tab area.
- panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
} break;
case NOTIFICATION_THEME_CHANGED: {
if (get_tab_count() > 0) {
@@ -655,6 +655,10 @@ void TabContainer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_align", PROPERTY_HINT_ENUM, "Left,Center,Right"), "set_tab_align", "get_tab_align");
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tabs_visible"), "set_tabs_visible", "are_tabs_visible");
+
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
}
TabContainer::TabContainer() {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 4f930c5139..d30e0b9f25 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -36,6 +36,10 @@
#include "project_settings.h"
#include "scene/main/viewport.h"
+#ifdef TOOLS_ENABLED
+#include "editor/editor_scale.h"
+#endif
+
#define TAB_PIXELS
static bool _is_text_char(CharType c) {
@@ -729,15 +733,18 @@ void TextEdit::_notification(int p_what) {
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.mark_color);
}
- if (text.is_breakpoint(line)) {
-
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.breakpoint_color);
- }
-
if (line == cursor.line) {
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, xmargin_end, get_row_height()), cache.current_line_color);
}
+ if (text.is_breakpoint(line) && !draw_breakpoint_gutter) {
+#ifdef TOOLS_ENABLED
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y + get_row_height() - EDSCALE, xmargin_end - xmargin_beg, EDSCALE), cache.breakpoint_color);
+#else
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.breakpoint_color);
+#endif
+ }
+
// draw breakpoint marker
if (text.is_breakpoint(line)) {
if (draw_breakpoint_gutter) {
@@ -2793,12 +2800,16 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
int ini = selection.from_line;
int end = selection.to_line;
for (int i = ini; i <= end; i++) {
- if (text[i][0] == '#')
+ if (get_line(i).begins_with("#"))
_remove_text(i, 0, i, 1);
}
} else {
- if (text[cursor.line][0] == '#')
+ if (get_line(cursor.line).begins_with("#")) {
_remove_text(cursor.line, 0, cursor.line, 1);
+ if (cursor.column >= get_line(cursor.line).length()) {
+ cursor.column = MAX(0, get_line(cursor.line).length() - 1);
+ }
+ }
}
update();
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index de17416d8e..1aaea98798 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -333,6 +333,15 @@ bool TreeItem::is_collapsed() {
return collapsed;
}
+void TreeItem::set_custom_minimum_height(int p_height) {
+ custom_min_height = p_height;
+ _changed_notify();
+}
+
+int TreeItem::get_custom_minimum_height() const {
+ return custom_min_height;
+}
+
TreeItem *TreeItem::get_next() {
return next;
@@ -703,6 +712,9 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_collapsed", "enable"), &TreeItem::set_collapsed);
ClassDB::bind_method(D_METHOD("is_collapsed"), &TreeItem::is_collapsed);
+ ClassDB::bind_method(D_METHOD("set_custom_minimum_height", "height"), &TreeItem::set_custom_minimum_height);
+ ClassDB::bind_method(D_METHOD("get_custom_minimum_height"), &TreeItem::get_custom_minimum_height);
+
ClassDB::bind_method(D_METHOD("get_next"), &TreeItem::get_next);
ClassDB::bind_method(D_METHOD("get_prev"), &TreeItem::get_prev);
ClassDB::bind_method(D_METHOD("get_parent"), &TreeItem::get_parent);
@@ -759,6 +771,10 @@ void TreeItem::_bind_methods() {
BIND_ENUM_CONSTANT(CELL_MODE_RANGE_EXPRESSION);
BIND_ENUM_CONSTANT(CELL_MODE_ICON);
BIND_ENUM_CONSTANT(CELL_MODE_CUSTOM);
+
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
}
void TreeItem::clear_children() {
@@ -780,6 +796,7 @@ TreeItem::TreeItem(Tree *p_tree) {
tree = p_tree;
collapsed = false;
disable_folding = false;
+ custom_min_height = 0;
parent = 0; // parent item
next = 0; // next in list
@@ -921,6 +938,9 @@ int Tree::compute_item_height(TreeItem *p_item) const {
default: {}
}
}
+ int item_min_height = p_item->get_custom_minimum_height();
+ if (height < item_min_height)
+ height = item_min_height;
height += cache.vseparation;
@@ -1990,7 +2010,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
if (!k->is_pressed())
return;
- if (k->get_alt() || k->get_command() || (k->get_shift() && k->get_unicode() == 0) || k->get_metakey())
+ if (k->get_command() || (k->get_shift() && k->get_unicode() == 0) || k->get_metakey())
return;
if (!root)
return;
@@ -2005,48 +2025,47 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
break; \
}
case KEY_RIGHT: {
+ bool dobreak = true;
//TreeItem *next = NULL;
if (!selected_item)
break;
- if (select_mode == SELECT_ROW)
+ if (select_mode == SELECT_ROW) {
EXIT_BREAK;
- if (selected_col >= (columns.size() - 1))
+ }
+ if (selected_col > (columns.size() - 1)) {
EXIT_BREAK;
- if (select_mode == SELECT_MULTI) {
- selected_col++;
- emit_signal("cell_selected");
+ }
+ if (k->get_alt()) {
+ selected_item->set_collapsed(false);
+ TreeItem *next = selected_item->get_children();
+ while (next && next != selected_item->next) {
+ next->set_collapsed(false);
+ next = next->get_next_visible();
+ }
+ } else if (selected_col == (columns.size() - 1)) {
+ if (selected_item->get_children() != NULL && selected_item->is_collapsed()) {
+ selected_item->set_collapsed(false);
+ } else {
+ selected_col = 0;
+ dobreak = false; // fall through to key_down
+ }
} else {
+ if (select_mode == SELECT_MULTI) {
+ selected_col++;
+ emit_signal("cell_selected");
+ } else {
- selected_item->select(selected_col + 1);
+ selected_item->select(selected_col + 1);
+ }
}
-
update();
ensure_cursor_is_visible();
accept_event();
-
- } break;
- case KEY_LEFT: {
-
- //TreeItem *next = NULL;
- if (!selected_item)
+ if (dobreak) {
break;
- if (select_mode == SELECT_ROW)
- EXIT_BREAK;
- if (selected_col <= 0)
- EXIT_BREAK;
- if (select_mode == SELECT_MULTI) {
- selected_col--;
- emit_signal("cell_selected");
- } else {
-
- selected_item->select(selected_col - 1);
}
-
- update();
- accept_event();
-
- } break;
+ }
case KEY_DOWN: {
TreeItem *next = NULL;
@@ -2093,6 +2112,48 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
accept_event();
} break;
+ case KEY_LEFT: {
+ bool dobreak = true;
+
+ //TreeItem *next = NULL;
+ if (!selected_item)
+ break;
+ if (select_mode == SELECT_ROW) {
+ EXIT_BREAK;
+ }
+ if (selected_col < 0) {
+ EXIT_BREAK;
+ }
+ if (k->get_alt()) {
+ selected_item->set_collapsed(true);
+ TreeItem *next = selected_item->get_children();
+ while (next && next != selected_item->next) {
+ next->set_collapsed(true);
+ next = next->get_next_visible();
+ }
+ } else if (selected_col == 0) {
+ if (selected_item->get_children() != NULL && !selected_item->is_collapsed()) {
+ selected_item->set_collapsed(true);
+ } else {
+ selected_col = columns.size() - 1;
+ dobreak = false; // fall through to key_up
+ }
+ } else {
+ if (select_mode == SELECT_MULTI) {
+ selected_col--;
+ emit_signal("cell_selected");
+ } else {
+
+ selected_item->select(selected_col - 1);
+ }
+ }
+ update();
+ accept_event();
+
+ if (dobreak) {
+ break;
+ }
+ }
case KEY_UP: {
TreeItem *prev = NULL;
@@ -2304,7 +2365,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
int col, h, section;
TreeItem *it = _find_item_at_pos(root, mpos, col, h, section);
- if (drop_mode_flags && it != drop_mode_over || section != drop_mode_section) {
+ if ((drop_mode_flags && it != drop_mode_over) || section != drop_mode_section) {
drop_mode_over = it;
drop_mode_section = section;
update();
@@ -2478,7 +2539,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
pressing_for_editor = false;
blocked++;
- bool handled = propagate_mouse_event(pos + cache.offset, 0, 0, b->is_doubleclick(), root, b->get_button_index(), b);
+ propagate_mouse_event(pos + cache.offset, 0, 0, b->is_doubleclick(), root, b->get_button_index(), b);
blocked--;
if (pressing_for_editor) {
@@ -3593,6 +3654,7 @@ void Tree::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_area_rect", "item", "column"), &Tree::_get_item_rect, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_item_at_pos", "pos"), &Tree::get_item_at_pos);
ClassDB::bind_method(D_METHOD("get_column_at_pos", "pos"), &Tree::get_column_at_pos);
+ ClassDB::bind_method(D_METHOD("get_drop_section_at_pos", "pos"), &Tree::get_drop_section_at_pos);
ClassDB::bind_method(D_METHOD("ensure_cursor_is_visible"), &Tree::ensure_cursor_is_visible);
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 06d6d3ad5a..5f19558597 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -145,6 +145,7 @@ private:
bool collapsed; // wont show childs
bool disable_folding;
+ int custom_min_height;
TreeItem *parent; // parent item
TreeItem *next; // next in list
@@ -230,6 +231,9 @@ public:
void set_collapsed(bool p_collapsed);
bool is_collapsed();
+ void set_custom_minimum_height(int p_height);
+ int get_custom_minimum_height() const;
+
TreeItem *get_prev();
TreeItem *get_next();
TreeItem *get_parent();
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index c3d9d97c5a..a30fc03aa9 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -50,7 +50,6 @@ void Node::_notification(int p_notification) {
Variant time = get_process_delta_time();
const Variant *ptr[1] = { &time };
- Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_process, ptr, 1);
}
} break;
@@ -60,7 +59,6 @@ void Node::_notification(int p_notification) {
Variant time = get_fixed_process_delta_time();
const Variant *ptr[1] = { &time };
- Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_fixed_process, ptr, 1);
}
@@ -134,7 +132,6 @@ void Node::_notification(int p_notification) {
set_fixed_process(true);
}
- Variant::CallError err;
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_ready, NULL, 0);
}
//emit_signal(SceneStringNames::get_singleton()->enter_tree);
@@ -209,7 +206,6 @@ void Node::_propagate_enter_tree() {
if (get_script_instance()) {
- Variant::CallError err;
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_enter_tree, NULL, 0);
}
@@ -273,7 +269,6 @@ void Node::_propagate_exit_tree() {
if (get_script_instance()) {
- Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_tree, NULL, 0);
}
emit_signal(SceneStringNames::get_singleton()->tree_exited);
@@ -2117,7 +2112,15 @@ Node *Node::_duplicate(int p_flags) const {
if (!(p_flags & DUPLICATE_SCRIPTS) && name == "script/script")
continue;
- node->set(name, get(name));
+ Variant value = get(name);
+ // Duplicate dictionaries and arrays, mainly needed for __meta__
+ if (value.get_type() == Variant::DICTIONARY) {
+ value = Dictionary(value).copy();
+ } else if (value.get_type() == Variant::ARRAY) {
+ value = Array(value).duplicate();
+ }
+
+ node->set(name, value);
}
node->set_name(get_name());
@@ -2199,7 +2202,16 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p
if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
continue;
String name = E->get().name;
- node->set(name, get(name));
+
+ Variant value = get(name);
+ // Duplicate dictionaries and arrays, mainly needed for __meta__
+ if (value.get_type() == Variant::DICTIONARY) {
+ value = Dictionary(value).copy();
+ } else if (value.get_type() == Variant::ARRAY) {
+ value = Array(value).duplicate();
+ }
+
+ node->set(name, value);
}
node->set_name(get_name());
@@ -2657,7 +2669,7 @@ void Node::_bind_methods() {
GLOBAL_DEF("node/name_casing", NAME_CASING_PASCAL_CASE);
ProjectSettings::get_singleton()->set_custom_property_info("node/name_casing", PropertyInfo(Variant::INT, "node/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
- ClassDB::bind_method(D_METHOD("_add_child_below_node", "node", "child_node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_child_below_node", "node", "child_node", "legible_unique_name"), &Node::add_child_below_node, DEFVAL(false));
ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name);
ClassDB::bind_method(D_METHOD("get_name"), &Node::get_name);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index a71b491bae..4f62d88934 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -870,7 +870,6 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p
if (!n->can_process())
continue;
- Variant::CallError ce;
n->call_multilevel(p_method, (const Variant **)v, 1);
//ERR_FAIL_COND(node_count != g.nodes.size());
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index c71a280755..d27a1a5641 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2578,6 +2578,16 @@ int Viewport::get_render_info(RenderInfo p_info) {
return VS::get_singleton()->viewport_get_render_info(viewport, VS::ViewportRenderInfo(p_info));
}
+void Viewport::set_snap_controls_to_pixels(bool p_enable) {
+
+ snap_controls_to_pixels = p_enable;
+}
+
+bool Viewport::is_snap_controls_to_pixels_enabled() const {
+
+ return snap_controls_to_pixels;
+}
+
void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_arvr", "use"), &Viewport::set_use_arvr);
@@ -2680,6 +2690,9 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shadow_atlas_size", "size"), &Viewport::set_shadow_atlas_size);
ClassDB::bind_method(D_METHOD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
+ ClassDB::bind_method(D_METHOD("set_snap_controls_to_pixels", "enabled"), &Viewport::set_snap_controls_to_pixels);
+ ClassDB::bind_method(D_METHOD("is_snap_controls_to_pixels_enabled"), &Viewport::is_snap_controls_to_pixels_enabled);
+
ClassDB::bind_method(D_METHOD("set_shadow_atlas_quadrant_subdiv", "quadrant", "subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
ClassDB::bind_method(D_METHOD("get_shadow_atlas_quadrant_subdiv", "quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
@@ -2707,6 +2720,7 @@ void Viewport::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "physics_object_picking"), "set_physics_object_picking", "get_physics_object_picking");
ADD_GROUP("GUI", "gui_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_disable_input"), "set_disable_input", "is_input_disabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_snap_controls_to_pixels"), "set_snap_controls_to_pixels", "is_snap_controls_to_pixels_enabled");
ADD_GROUP("Shadow Atlas", "shadow_atlas_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_atlas_size"), "set_shadow_atlas_size", "get_shadow_atlas_size");
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_0", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 0);
@@ -2748,6 +2762,15 @@ void Viewport::_bind_methods() {
BIND_ENUM_CONSTANT(MSAA_4X);
BIND_ENUM_CONSTANT(MSAA_8X);
BIND_ENUM_CONSTANT(MSAA_16X);
+
+ BIND_ENUM_CONSTANT(USAGE_2D);
+ BIND_ENUM_CONSTANT(USAGE_2D_NO_SAMPLING);
+ BIND_ENUM_CONSTANT(USAGE_3D);
+ BIND_ENUM_CONSTANT(USAGE_3D_NO_EFFECTS);
+
+ BIND_ENUM_CONSTANT(CLEAR_MODE_ALWAYS);
+ BIND_ENUM_CONSTANT(CLEAR_MODE_NEVER);
+ BIND_ENUM_CONSTANT(CLEAR_MODE_ONLY_NEXT_FRAME);
}
Viewport::Viewport() {
@@ -2822,6 +2845,8 @@ Viewport::Viewport() {
usage = USAGE_3D;
debug_draw = DEBUG_DRAW_DISABLED;
clear_mode = CLEAR_MODE_ALWAYS;
+
+ snap_controls_to_pixels = true;
}
Viewport::~Viewport() {
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index ce2bc991f5..6bbd4b26b5 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -1,3 +1,4 @@
+
/*************************************************************************/
/* viewport.h */
/*************************************************************************/
@@ -193,6 +194,8 @@ private:
bool filter;
bool gen_mipmaps;
+ bool snap_controls_to_pixels;
+
bool physics_object_picking;
List<Ref<InputEvent> > physics_picking_events;
ObjectID physics_object_capture;
@@ -463,6 +466,9 @@ public:
int get_render_info(RenderInfo p_info);
+ void set_snap_controls_to_pixels(bool p_enable);
+ bool is_snap_controls_to_pixels_enabled() const;
+
Viewport();
~Viewport();
};
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 9ed3734a36..b9dfbd6bb0 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -430,6 +430,7 @@ void register_scene_types() {
ClassDB::register_class<StaticBody2D>();
ClassDB::register_class<RigidBody2D>();
ClassDB::register_class<KinematicBody2D>();
+ ClassDB::register_class<KinematicCollision2D>();
ClassDB::register_class<Area2D>();
ClassDB::register_class<CollisionShape2D>();
ClassDB::register_class<CollisionPolygon2D>();
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index 659322897a..dff0fb8588 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -536,6 +536,14 @@ void AudioStreamSample::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_rate"), "set_mix_rate", "get_mix_rate");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stereo"), "set_stereo", "is_stereo");
ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
+
+ BIND_ENUM_CONSTANT(FORMAT_8_BITS);
+ BIND_ENUM_CONSTANT(FORMAT_16_BITS);
+ BIND_ENUM_CONSTANT(FORMAT_IMA_ADPCM);
+
+ BIND_ENUM_CONSTANT(LOOP_DISABLED);
+ BIND_ENUM_CONSTANT(LOOP_FORWARD);
+ BIND_ENUM_CONSTANT(LOOP_PING_PONG);
}
AudioStreamSample::AudioStreamSample() {
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 7fbaa1f73c..1066848dd1 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -84,15 +84,6 @@ int Curve::add_point(Vector2 p_pos, real_t left_tangent, real_t right_tangent, T
int i = get_index(p_pos.x);
- int nearest_index = i;
- if (i + 1 < _points.size()) {
- real_t diff0 = p_pos.x - _points[i].pos.x;
- real_t diff1 = _points[i + 1].pos.x - p_pos.x;
-
- if (diff1 < diff0)
- nearest_index = i + 1;
- }
-
if (i == 0 && p_pos.x < _points[0].pos.x) {
// Insert before anything else
_points.insert(0, Point(p_pos, left_tangent, right_tangent, left_mode, right_mode));
@@ -331,18 +322,19 @@ real_t Curve::interpolate_local_nocheck(int index, real_t local_offset) const {
const Point a = _points[index];
const Point b = _points[index + 1];
- // Cubic bezier
-
- // ac-----bc
- // / \
- // / \ Here with a.right_tangent > 0
- // / \ and b.left_tangent < 0
- // / \
- // a b
- //
- // |-d1--|-d2--|-d3--|
- //
- // d1 == d2 == d3 == d / 3
+ /* Cubic bezier
+ *
+ * ac-----bc
+ * / \
+ * / \ Here with a.right_tangent > 0
+ * / \ and b.left_tangent < 0
+ * / \
+ * a b
+ *
+ * |-d1--|-d2--|-d3--|
+ *
+ * d1 == d2 == d3 == d / 3
+ */
// Control points are chosen at equal distances
real_t d = b.pos.x - a.pos.x;
@@ -522,6 +514,10 @@ void Curve::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data");
ADD_SIGNAL(MethodInfo(SIGNAL_RANGE_CHANGED));
+
+ BIND_ENUM_CONSTANT(TANGENT_FREE);
+ BIND_ENUM_CONSTANT(TANGENT_LINEAR);
+ BIND_ENUM_CONSTANT(TANGENT_MODE_COUNT);
}
int Curve2D::get_point_count() const {
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index fdea5960e5..1272e5a946 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -794,7 +794,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// RichTextLabel
theme->set_stylebox("focus", "RichTextLabel", focus);
- theme->set_stylebox("normal", "RichTextLabel", make_stylebox(tree_bg_png, 3, 3, 3, 3));
+ theme->set_stylebox("normal", "RichTextLabel", make_empty_stylebox(0, 0, 0, 0));
theme->set_font("normal_font", "RichTextLabel", default_font);
theme->set_font("bold_font", "RichTextLabel", default_font);
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 14225d945d..da3bc6a95b 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -269,13 +269,13 @@ Ref<Texture> Environment::get_adjustment_color_correction() const {
void Environment::_validate_property(PropertyInfo &property) const {
if (property.name == "background_sky" || property.name == "background_sky_scale" || property.name == "ambient_light/sky_contribution") {
- if (bg_mode != BG_SKY) {
+ if (bg_mode != BG_SKY && bg_mode != BG_COLOR_SKY) {
property.usage = PROPERTY_USAGE_NOEDITOR;
}
}
if (property.name == "background_color") {
- if (bg_mode != BG_COLOR) {
+ if (bg_mode != BG_COLOR && bg_mode != BG_COLOR_SKY) {
property.usage = PROPERTY_USAGE_NOEDITOR;
}
}
@@ -839,7 +839,7 @@ void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_ambient_light_sky_contribution"), &Environment::get_ambient_light_sky_contribution);
ADD_GROUP("Background", "background_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "background_mode", PROPERTY_HINT_ENUM, "Clear Color,Custom Color,Sky,Canvas,Keep"), "set_background", "get_background");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "background_mode", PROPERTY_HINT_ENUM, "Clear Color,Custom Color,Sky,Color+Sky,Canvas,Keep"), "set_background", "get_background");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "background_sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_sky_scale", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_sky_scale", "get_sky_scale");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color");
@@ -1118,6 +1118,7 @@ void Environment::_bind_methods() {
BIND_ENUM_CONSTANT(BG_CLEAR_COLOR);
BIND_ENUM_CONSTANT(BG_COLOR);
BIND_ENUM_CONSTANT(BG_SKY);
+ BIND_ENUM_CONSTANT(BG_COLOR_SKY);
BIND_ENUM_CONSTANT(BG_CANVAS);
BIND_ENUM_CONSTANT(BG_MAX);
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 6337981b95..9046ec1e49 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -45,6 +45,7 @@ public:
BG_CLEAR_COLOR,
BG_COLOR,
BG_SKY,
+ BG_COLOR_SKY,
BG_CANVAS,
BG_KEEP,
BG_MAX
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index a187692bcb..abe9a00c3f 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -67,8 +67,8 @@ RID Material::get_rid() const {
}
void Material::_validate_property(PropertyInfo &property) const {
- if (!_can_do_next_pass() && property.name=="next_pass") {
- property.usage=0;
+ if (!_can_do_next_pass() && property.name == "next_pass") {
+ property.usage = 0;
}
}
@@ -80,7 +80,7 @@ void Material::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_render_priority", "priority"), &Material::set_render_priority);
ClassDB::bind_method(D_METHOD("get_render_priority"), &Material::get_render_priority);
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "render_priority", PROPERTY_HINT_RANGE, itos(RENDER_PRIORITY_MIN) + "," + itos(RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "render_priority", PROPERTY_HINT_RANGE, itos(RENDER_PRIORITY_MIN) + "," + itos(RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "next_pass", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "set_next_pass", "get_next_pass");
BIND_CONSTANT(RENDER_PRIORITY_MAX);
@@ -212,7 +212,7 @@ void ShaderMaterial::get_argument_options(const StringName &p_function, int p_id
bool ShaderMaterial::_can_do_next_pass() const {
- return shader.is_valid() && shader->get_mode()==Shader::MODE_SPATIAL;
+ return shader.is_valid() && shader->get_mode() == Shader::MODE_SPATIAL;
}
ShaderMaterial::ShaderMaterial() {
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index aa7827a61a..db5d87d703 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -422,6 +422,46 @@ void Mesh::_bind_methods() {
BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLES);
BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_STRIP);
BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_FAN);
+
+ BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_NORMALIZED);
+ BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_RELATIVE);
+
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_VERTEX);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_NORMAL);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TANGENT);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_COLOR);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV2);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX);
+
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BASE);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_VERTEX);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_NORMAL);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TANGENT);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_COLOR);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV2);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BONES);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_WEIGHTS);
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_INDEX);
+
+ BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_2D_VERTICES);
+ BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_16_BIT_BONES);
+
+ BIND_ENUM_CONSTANT(ARRAY_COMPRESS_DEFAULT);
+
+ BIND_ENUM_CONSTANT(ARRAY_VERTEX);
+ BIND_ENUM_CONSTANT(ARRAY_NORMAL);
+ BIND_ENUM_CONSTANT(ARRAY_TANGENT);
+ BIND_ENUM_CONSTANT(ARRAY_COLOR);
+ BIND_ENUM_CONSTANT(ARRAY_TEX_UV);
+ BIND_ENUM_CONSTANT(ARRAY_TEX_UV2);
+ BIND_ENUM_CONSTANT(ARRAY_BONES);
+ BIND_ENUM_CONSTANT(ARRAY_WEIGHTS);
+ BIND_ENUM_CONSTANT(ARRAY_INDEX);
+ BIND_ENUM_CONSTANT(ARRAY_MAX);
}
Mesh::Mesh() {
@@ -761,7 +801,7 @@ Array ArrayMesh::surface_get_arrays(int p_surface) const {
Array ArrayMesh::surface_get_blend_shape_arrays(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array());
- return Array();
+ return VisualServer::get_singleton()->mesh_surface_get_blend_shape_arrays(mesh, p_surface);
}
int ArrayMesh::get_surface_count() const {
@@ -1010,6 +1050,8 @@ void ArrayMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("surface_get_material", "surf_idx"), &ArrayMesh::surface_get_material);
ClassDB::bind_method(D_METHOD("surface_set_name", "surf_idx", "name"), &ArrayMesh::surface_set_name);
ClassDB::bind_method(D_METHOD("surface_get_name", "surf_idx"), &ArrayMesh::surface_get_name);
+ ClassDB::bind_method(D_METHOD("surface_get_arrays", "surf_idx"), &ArrayMesh::surface_get_arrays);
+ ClassDB::bind_method(D_METHOD("surface_get_blend_shape_arrays", "surf_idx"), &ArrayMesh::surface_get_blend_shape_arrays);
ClassDB::bind_method(D_METHOD("create_trimesh_shape"), &ArrayMesh::create_trimesh_shape);
ClassDB::bind_method(D_METHOD("create_convex_shape"), &ArrayMesh::create_convex_shape);
ClassDB::bind_method(D_METHOD("create_outline", "margin"), &ArrayMesh::create_outline);
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 53c6eb2d89..f4edb258b6 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -120,6 +120,7 @@ public:
virtual int surface_get_array_len(int p_idx) const = 0;
virtual int surface_get_array_index_len(int p_idx) const = 0;
virtual Array surface_get_arrays(int p_surface) const = 0;
+ virtual Array surface_get_blend_shape_arrays(int p_surface) const = 0;
virtual uint32_t surface_get_format(int p_idx) const = 0;
virtual PrimitiveType surface_get_primitive_type(int p_idx) const = 0;
virtual Ref<Material> surface_get_material(int p_idx) const = 0;
@@ -174,7 +175,7 @@ public:
void add_surface(uint32_t p_format, PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const Rect3 &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<Rect3> &p_bone_aabbs = Vector<Rect3>());
Array surface_get_arrays(int p_surface) const;
- virtual Array surface_get_blend_shape_arrays(int p_surface) const;
+ Array surface_get_blend_shape_arrays(int p_surface) const;
void add_blend_shape(const StringName &p_name);
int get_blend_shape_count() const;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index c525ca600a..5d6f44dfef 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -92,7 +92,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
NODE_FROM_ID(nparent, n.parent);
#ifdef DEBUG_ENABLED
- if (!nparent && n.parent & FLAG_ID_IS_PATH) {
+ if (!nparent && (n.parent & FLAG_ID_IS_PATH)) {
WARN_PRINT(String("Parent path '" + String(node_paths[n.parent & FLAG_MASK]) + "' for node '" + String(snames[n.name]) + "' has vanished when instancing: '" + get_path() + "'.").ascii().get_data());
}
@@ -489,7 +489,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
// only save what has been changed
// only save changed properties in instance
- if (E->get().usage & PROPERTY_USAGE_NO_INSTANCE_STATE || E->get().name == "__meta__") {
+ if ((E->get().usage & PROPERTY_USAGE_NO_INSTANCE_STATE) || E->get().name == "__meta__") {
//property has requested that no instance state is saved, sorry
//also, meta won't be overridden or saved
continue;
@@ -1288,7 +1288,7 @@ bool SceneState::is_node_instance_placeholder(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), false);
- return nodes[p_idx].instance >= 0 && nodes[p_idx].instance & FLAG_INSTANCE_IS_PLACEHOLDER;
+ return nodes[p_idx].instance >= 0 && (nodes[p_idx].instance & FLAG_INSTANCE_IS_PLACEHOLDER);
}
Ref<PackedScene> SceneState::get_node_instance(int p_idx) const {
@@ -1313,7 +1313,7 @@ String SceneState::get_node_instance_placeholder(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, nodes.size(), String());
- if (nodes[p_idx].instance >= 0 && nodes[p_idx].instance & FLAG_INSTANCE_IS_PLACEHOLDER) {
+ if (nodes[p_idx].instance >= 0 && (nodes[p_idx].instance & FLAG_INSTANCE_IS_PLACEHOLDER)) {
return variants[nodes[p_idx].instance & FLAG_MASK];
}
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index cfc1468533..ba356d89b1 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -105,6 +105,15 @@ Array PrimitiveMesh::surface_get_arrays(int p_surface) const {
return VisualServer::get_singleton()->mesh_surface_get_arrays(mesh, 0);
}
+Array PrimitiveMesh::surface_get_blend_shape_arrays(int p_surface) const {
+ ERR_FAIL_INDEX_V(p_surface, 1, Array());
+ if (pending_request) {
+ _update();
+ }
+
+ return Array();
+}
+
uint32_t PrimitiveMesh::surface_get_format(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, 1, 0);
if (pending_request) {
@@ -119,6 +128,8 @@ Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const {
}
Ref<Material> PrimitiveMesh::surface_get_material(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, 1, NULL);
+
return material;
}
@@ -151,6 +162,8 @@ void PrimitiveMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material", "material"), &PrimitiveMesh::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &PrimitiveMesh::get_material);
+ ClassDB::bind_method(D_METHOD("get_mesh_arrays"), &PrimitiveMesh::get_mesh_arrays);
+
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "set_material", "get_material");
}
@@ -168,6 +181,10 @@ Ref<Material> PrimitiveMesh::get_material() const {
return material;
}
+Array PrimitiveMesh::get_mesh_arrays() const {
+ return surface_get_arrays(0);
+}
+
PrimitiveMesh::PrimitiveMesh() {
// defaults
mesh = VisualServer::get_singleton()->mesh_create();
@@ -213,7 +230,6 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
prevrow = 0;
for (j = 0; j <= (rings + 1); j++) {
v = j;
- w;
v /= (rings + 1);
w = sin(0.5 * Math_PI * v);
@@ -292,7 +308,6 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
prevrow = 0;
for (j = 0; j <= (rings + 1); j++) {
v = j;
- w;
v /= (rings + 1);
v += 1.0;
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index 34fb75a196..38a5695883 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -67,6 +67,7 @@ public:
virtual int surface_get_array_len(int p_idx) const;
virtual int surface_get_array_index_len(int p_idx) const;
virtual Array surface_get_arrays(int p_surface) const;
+ virtual Array surface_get_blend_shape_arrays(int p_surface) const;
virtual uint32_t surface_get_format(int p_idx) const;
virtual Mesh::PrimitiveType surface_get_primitive_type(int p_idx) const;
virtual Ref<Material> surface_get_material(int p_idx) const;
@@ -78,6 +79,8 @@ public:
void set_material(const Ref<Material> &p_material);
Ref<Material> get_material() const;
+ Array get_mesh_arrays() const;
+
PrimitiveMesh();
~PrimitiveMesh();
};
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index 9af8c42110..2ef20f67f5 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -419,10 +419,10 @@ void ProceduralSky::_queue_update() {
call_deferred("_update_sky");
}
-void ProceduralSky::_thread_done(const Ref<Image> &image) {
+void ProceduralSky::_thread_done(const Ref<Image> &p_image) {
- VS::get_singleton()->texture_allocate(texture, image->get_width(), image->get_height(), Image::FORMAT_RGBE9995, VS::TEXTURE_FLAG_FILTER | VS::TEXTURE_FLAG_REPEAT);
- VS::get_singleton()->texture_set_data(texture, image);
+ VS::get_singleton()->texture_allocate(texture, p_image->get_width(), p_image->get_height(), Image::FORMAT_RGBE9995, VS::TEXTURE_FLAG_FILTER | VS::TEXTURE_FLAG_REPEAT);
+ VS::get_singleton()->texture_set_data(texture, p_image);
_radiance_changed();
Thread::wait_to_finish(sky_thread);
memdelete(sky_thread);
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index 3d085f7166..4627c900ff 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -178,7 +178,7 @@ public:
void set_border_width_all(int p_size);
int get_border_width_min() const;
- void set_border_width(Margin p_margin, int p_size);
+ void set_border_width(Margin p_margin, int p_width);
int get_border_width(Margin p_margin) const;
//blend
@@ -214,7 +214,7 @@ public:
int get_shadow_size() const;
//ANTI_ALIASING
- void set_anti_aliased(const bool &p_anit_aliasing);
+ void set_anti_aliased(const bool &p_anti_aliased);
bool is_anti_aliased() const;
//tempAA
void set_aa_size(const int &p_aa_size);
diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp
index 539bac6703..4ecd7a3898 100644
--- a/servers/arvr/arvr_positional_tracker.cpp
+++ b/servers/arvr/arvr_positional_tracker.cpp
@@ -31,6 +31,10 @@
#include "core/os/input.h"
void ARVRPositionalTracker::_bind_methods() {
+ BIND_ENUM_CONSTANT(TRACKER_HAND_UNKNOWN);
+ BIND_ENUM_CONSTANT(TRACKER_LEFT_HAND);
+ BIND_ENUM_CONSTANT(TRACKER_RIGHT_HAND);
+
// this class is read only from GDScript, so we only have access to getters..
ClassDB::bind_method(D_METHOD("get_type"), &ARVRPositionalTracker::get_type);
ClassDB::bind_method(D_METHOD("get_name"), &ARVRPositionalTracker::get_name);
@@ -39,6 +43,7 @@ void ARVRPositionalTracker::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_orientation"), &ARVRPositionalTracker::get_orientation);
ClassDB::bind_method(D_METHOD("get_tracks_position"), &ARVRPositionalTracker::get_tracks_position);
ClassDB::bind_method(D_METHOD("get_position"), &ARVRPositionalTracker::get_position);
+ ClassDB::bind_method(D_METHOD("get_hand"), &ARVRPositionalTracker::get_hand);
ClassDB::bind_method(D_METHOD("get_transform", "adjust_by_reference_frame"), &ARVRPositionalTracker::get_transform);
// these functions we don't want to expose to normal users but do need to be callable from GDNative
@@ -141,6 +146,14 @@ Vector3 ARVRPositionalTracker::get_rw_position() const {
return rw_position;
};
+ARVRPositionalTracker::TrackerHand ARVRPositionalTracker::get_hand() const {
+ return hand;
+};
+
+void ARVRPositionalTracker::set_hand(const ARVRPositionalTracker::TrackerHand p_hand) {
+ hand = p_hand;
+};
+
Transform ARVRPositionalTracker::get_transform(bool p_adjust_by_reference_frame) const {
Transform new_transform;
@@ -164,6 +177,7 @@ ARVRPositionalTracker::ARVRPositionalTracker() {
tracker_id = 0;
tracks_orientation = false;
tracks_position = false;
+ hand = TRACKER_HAND_UNKNOWN;
};
ARVRPositionalTracker::~ARVRPositionalTracker(){
diff --git a/servers/arvr/arvr_positional_tracker.h b/servers/arvr/arvr_positional_tracker.h
index f91f862ba3..ff0c150f89 100644
--- a/servers/arvr/arvr_positional_tracker.h
+++ b/servers/arvr/arvr_positional_tracker.h
@@ -48,6 +48,13 @@ class ARVRPositionalTracker : public Object {
GDCLASS(ARVRPositionalTracker, Object);
_THREAD_SAFE_CLASS_
+public:
+ enum TrackerHand {
+ TRACKER_HAND_UNKNOWN, /* unknown or not applicable */
+ TRACKER_LEFT_HAND, /* controller is the left hand controller */
+ TRACKER_RIGHT_HAND /* controller is the right hand controller */
+ };
+
private:
ARVRServer::TrackerType type; // type of tracker
StringName name; // (unique) name of the tracker
@@ -57,6 +64,7 @@ private:
Basis orientation; // our orientation
bool tracks_position; // do we track position?
Vector3 rw_position; // our position "in the real world, so without world_scale applied"
+ TrackerHand hand; // if known, the hand this tracker is held in
protected:
static void _bind_methods();
@@ -77,6 +85,8 @@ public:
Vector3 get_position() const; // get position with world_scale applied
void set_rw_position(const Vector3 &p_rw_position);
Vector3 get_rw_position() const;
+ ARVRPositionalTracker::TrackerHand get_hand() const;
+ void set_hand(const ARVRPositionalTracker::TrackerHand p_hand);
Transform get_transform(bool p_adjust_by_reference_frame) const;
@@ -84,4 +94,6 @@ public:
~ARVRPositionalTracker();
};
+VARIANT_ENUM_CAST(ARVRPositionalTracker::TrackerHand);
+
#endif
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index bac24f6438..5d8cf20c92 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -68,8 +68,8 @@ void ARVRServer::_bind_methods() {
ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "name")));
ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING, "name")));
- ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::INT, "type")));
- ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING, "name")));
+ ADD_SIGNAL(MethodInfo("tracker_added", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
};
real_t ARVRServer::get_world_scale() const {
@@ -130,7 +130,6 @@ void ARVRServer::request_reference_frame(bool p_ignore_tilt, bool p_keep_height)
void ARVRServer::add_interface(const Ref<ARVRInterface> &p_interface) {
ERR_FAIL_COND(p_interface.is_null());
- int idx = -1;
for (int i = 0; i < interfaces.size(); i++) {
if (interfaces[i] == p_interface) {
@@ -232,7 +231,7 @@ void ARVRServer::add_tracker(ARVRPositionalTracker *p_tracker) {
ERR_FAIL_NULL(p_tracker);
trackers.push_back(p_tracker);
- emit_signal("tracker_added", p_tracker->get_name(), p_tracker->get_type());
+ emit_signal("tracker_added", p_tracker->get_name(), p_tracker->get_type(), p_tracker->get_tracker_id());
};
void ARVRServer::remove_tracker(ARVRPositionalTracker *p_tracker) {
@@ -250,7 +249,7 @@ void ARVRServer::remove_tracker(ARVRPositionalTracker *p_tracker) {
ERR_FAIL_COND(idx == -1);
- emit_signal("tracker_removed", p_tracker->get_name());
+ emit_signal("tracker_removed", p_tracker->get_name(), p_tracker->get_type(), p_tracker->get_tracker_id());
trackers.remove(idx);
};
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index f2bcabc3cb..3e6280f033 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -175,6 +175,12 @@ void AudioEffectDistortion::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20000,1"), "set_keep_hf_hz", "get_keep_hf_hz");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain");
+
+ BIND_ENUM_CONSTANT(MODE_CLIP);
+ BIND_ENUM_CONSTANT(MODE_ATAN);
+ BIND_ENUM_CONSTANT(MODE_LOFI);
+ BIND_ENUM_CONSTANT(MODE_OVERDRIVE);
+ BIND_ENUM_CONSTANT(MODE_WAVESHAPE);
}
AudioEffectDistortion::AudioEffectDistortion() {
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index 64a9db51a5..019494c74a 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -159,6 +159,11 @@ void AudioEffectFilter::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
ADD_PROPERTY(PropertyInfo(Variant::INT, "dB", PROPERTY_HINT_ENUM, "6db,12db,18db,24db"), "set_db", "get_db");
+
+ BIND_ENUM_CONSTANT(FILTER_6DB);
+ BIND_ENUM_CONSTANT(FILTER_12DB);
+ BIND_ENUM_CONSTANT(FILTER_18DB);
+ BIND_ENUM_CONSTANT(FILTER_24DB);
}
AudioEffectFilter::AudioEffectFilter(AudioFilterSW::Mode p_mode) {
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index 391e5db639..9787ba8109 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -31,18 +31,13 @@
void AudioEffectLimiterInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
- float thresh = Math::db2linear(base->threshold);
float threshdb = base->threshold;
float ceiling = Math::db2linear(base->ceiling);
float ceildb = base->ceiling;
float makeup = Math::db2linear(ceildb - threshdb);
- float makeupdb = ceildb - threshdb;
float sc = -base->soft_clip;
float scv = Math::db2linear(sc);
- float sccomp = Math::db2linear(-sc);
float peakdb = ceildb + 25;
- float peaklvl = Math::db2linear(peakdb);
- float scratio = base->soft_clip_ratio;
float scmult = Math::abs((ceildb - sc) / (peakdb - sc));
for (int i = 0; i < p_frame_count; i++) {
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 3139c6bb7a..78efe85e16 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -32,6 +32,7 @@
#include "os/file_access.h"
#include "os/os.h"
#include "project_settings.h"
+#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio/effects/audio_effect_compressor.h"
#ifdef TOOLS_ENABLED
@@ -77,6 +78,28 @@ double AudioDriver::get_mix_time() const {
return total;
}
+AudioDriver::SpeakerMode AudioDriver::get_speaker_mode_by_total_channels(int p_channels) const {
+ switch (p_channels) {
+ case 4: return SPEAKER_SURROUND_31;
+ case 6: return SPEAKER_SURROUND_51;
+ case 8: return SPEAKER_SURROUND_71;
+ }
+
+ // Default to STEREO
+ return SPEAKER_MODE_STEREO;
+}
+
+int AudioDriver::get_total_channels_by_speaker_mode(AudioDriver::SpeakerMode p_mode) const {
+ switch (p_mode) {
+ case SPEAKER_MODE_STEREO: return 2;
+ case SPEAKER_SURROUND_31: return 4;
+ case SPEAKER_SURROUND_51: return 6;
+ case SPEAKER_SURROUND_71: return 8;
+ }
+
+ ERR_FAIL_V(2);
+}
+
AudioDriver::AudioDriver() {
_last_mix_time = 0;
@@ -85,6 +108,7 @@ AudioDriver::AudioDriver() {
AudioDriver *AudioDriverManager::drivers[MAX_DRIVERS];
int AudioDriverManager::driver_count = 0;
+AudioDriverDummy AudioDriverManager::dummy_driver;
void AudioDriverManager::add_driver(AudioDriver *p_driver) {
@@ -96,6 +120,43 @@ int AudioDriverManager::get_driver_count() {
return driver_count;
}
+
+void AudioDriverManager::initialize(int p_driver) {
+ AudioDriver *driver;
+ int failed_driver = -1;
+
+ // Check if there is a selected driver
+ if (p_driver >= 0 && p_driver < driver_count) {
+ if (drivers[p_driver]->init() == OK) {
+ drivers[p_driver]->set_singleton();
+ return;
+ } else {
+ failed_driver = p_driver;
+ }
+ }
+
+ // No selected driver, try them all in order
+ for (int i = 0; i < driver_count; i++) {
+ // Don't re-init the driver if it failed above
+ if (i == failed_driver) {
+ continue;
+ }
+
+ if (drivers[i]->init() == OK) {
+ drivers[i]->set_singleton();
+ return;
+ }
+ }
+
+ // Fallback to our dummy driver
+ if (dummy_driver.init() == OK) {
+ ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver");
+ dummy_driver.set_singleton();
+ } else {
+ ERR_PRINT("AudioDriverManager: dummy driver faild to init()");
+ }
+}
+
AudioDriver *AudioDriverManager::get_driver(int p_driver) {
ERR_FAIL_INDEX_V(p_driver, driver_count, NULL);
@@ -203,8 +264,9 @@ void AudioServer::_mix_step() {
if (!bus_map.has(bus->send)) {
bus = buses[0]; //send to master
} else {
+ int prev_index_cache = bus->index_cache;
bus = bus_map[bus->send];
- if (bus->index_cache >= bus->index_cache) { //invalid, send to master
+ if (prev_index_cache >= bus->index_cache) { //invalid, send to master
bus = buses[0];
}
}
@@ -423,8 +485,8 @@ void AudioServer::set_bus_count(int p_count) {
}
buses[i] = memnew(Bus);
- buses[i]->channels.resize(_get_channel_count());
- for (int j = 0; j < _get_channel_count(); j++) {
+ buses[i]->channels.resize(get_channel_count());
+ for (int j = 0; j < get_channel_count(); j++) {
buses[i]->channels[j].buffer.resize(buffer_size);
}
buses[i]->name = attempt;
@@ -493,8 +555,8 @@ void AudioServer::add_bus(int p_at_pos) {
}
Bus *bus = memnew(Bus);
- bus->channels.resize(_get_channel_count());
- for (int j = 0; j < _get_channel_count(); j++) {
+ bus->channels.resize(get_channel_count());
+ for (int j = 0; j < get_channel_count(); j++) {
bus->channels[j].buffer.resize(buffer_size);
}
bus->name = attempt;
@@ -797,17 +859,8 @@ void AudioServer::init() {
channel_disable_threshold_db = GLOBAL_DEF("audio/channel_disable_threshold_db", -60.0);
channel_disable_frames = float(GLOBAL_DEF("audio/channel_disable_time", 2.0)) * get_mix_rate();
buffer_size = 1024; //harcoded for now
- switch (get_speaker_mode()) {
- case SPEAKER_MODE_STEREO: {
- temp_buffer.resize(1);
- } break;
- case SPEAKER_SURROUND_51: {
- temp_buffer.resize(3);
- } break;
- case SPEAKER_SURROUND_71: {
- temp_buffer.resize(4);
- } break;
- }
+
+ temp_buffer.resize(get_channel_count());
for (int i = 0; i < temp_buffer.size(); i++) {
temp_buffer[i].resize(buffer_size);
@@ -815,11 +868,11 @@ void AudioServer::init() {
mix_count = 0;
set_bus_count(1);
- ;
set_bus_name(0, "Master");
if (AudioDriver::get_singleton())
AudioDriver::get_singleton()->start();
+
#ifdef TOOLS_ENABLED
set_edited(false); //avoid editors from thinking this was edited
#endif
@@ -991,8 +1044,8 @@ void AudioServer::set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout) {
bus_map[bus->name] = bus;
buses[i] = bus;
- buses[i]->channels.resize(_get_channel_count());
- for (int j = 0; j < _get_channel_count(); j++) {
+ buses[i]->channels.resize(get_channel_count());
+ for (int j = 0; j < get_channel_count(); j++) {
buses[i]->channels[j].buffer.resize(buffer_size);
}
_update_bus_effects(i);
@@ -1080,6 +1133,10 @@ void AudioServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate_bus_layout"), &AudioServer::generate_bus_layout);
ADD_SIGNAL(MethodInfo("bus_layout_changed"));
+
+ BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO);
+ BIND_ENUM_CONSTANT(SPEAKER_SURROUND_51);
+ BIND_ENUM_CONSTANT(SPEAKER_SURROUND_71);
}
AudioServer::AudioServer() {
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 13a74856c8..55e9367308 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -35,6 +35,8 @@
#include "servers/audio/audio_effect.h"
#include "variant.h"
+class AudioDriverDummy;
+
class AudioDriver {
static AudioDriver *singleton;
@@ -50,6 +52,7 @@ public:
enum SpeakerMode {
SPEAKER_MODE_STEREO,
+ SPEAKER_SURROUND_31,
SPEAKER_SURROUND_51,
SPEAKER_SURROUND_71,
};
@@ -72,6 +75,9 @@ public:
virtual float get_latency() { return 0; }
+ SpeakerMode get_speaker_mode_by_total_channels(int p_channels) const;
+ int get_total_channels_by_speaker_mode(SpeakerMode) const;
+
AudioDriver();
virtual ~AudioDriver() {}
};
@@ -86,8 +92,11 @@ class AudioDriverManager {
static AudioDriver *drivers[MAX_DRIVERS];
static int driver_count;
+ static AudioDriverDummy dummy_driver;
+
public:
static void add_driver(AudioDriver *p_driver);
+ static void initialize(int p_driver);
static int get_driver_count();
static AudioDriver *get_driver(int p_driver);
};
@@ -101,6 +110,7 @@ public:
//re-expose this her, as AudioDriver is not exposed to script
enum SpeakerMode {
SPEAKER_MODE_STEREO,
+ SPEAKER_SURROUND_31,
SPEAKER_SURROUND_51,
SPEAKER_SURROUND_71,
};
@@ -163,15 +173,6 @@ private:
Vector<Bus *> buses;
Map<StringName, Bus *> bus_map;
- _FORCE_INLINE_ int _get_channel_count() const {
- switch (AudioDriver::get_singleton()->get_speaker_mode()) {
- case AudioDriver::SPEAKER_MODE_STEREO: return 1;
- case AudioDriver::SPEAKER_SURROUND_51: return 3;
- case AudioDriver::SPEAKER_SURROUND_71: return 4;
- }
- ERR_FAIL_V(1);
- }
-
void _update_bus_effects(int p_bus);
static AudioServer *singleton;
@@ -205,6 +206,16 @@ protected:
static void _bind_methods();
public:
+ _FORCE_INLINE_ int get_channel_count() const {
+ switch (get_speaker_mode()) {
+ case SPEAKER_MODE_STEREO: return 1;
+ case SPEAKER_SURROUND_31: return 2;
+ case SPEAKER_SURROUND_51: return 3;
+ case SPEAKER_SURROUND_71: return 4;
+ }
+ ERR_FAIL_V(1);
+ }
+
//do not use from outside audio thread
AudioFrame *thread_get_channel_mix_buffer(int p_bus, int p_buffer);
int thread_get_mix_buffer_size() const;
diff --git a/servers/physics/broad_phase_basic.cpp b/servers/physics/broad_phase_basic.cpp
index 959718a252..c6565ac2e9 100644
--- a/servers/physics/broad_phase_basic.cpp
+++ b/servers/physics/broad_phase_basic.cpp
@@ -30,9 +30,10 @@
#include "broad_phase_basic.h"
#include "list.h"
#include "print_string.h"
+
BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex) {
- ERR_FAIL_COND_V(p_object == NULL, NULL);
+ ERR_FAIL_COND_V(p_object == NULL, 0);
current++;
diff --git a/servers/physics/broad_phase_basic.h b/servers/physics/broad_phase_basic.h
index 51a24f4678..5c124c1792 100644
--- a/servers/physics/broad_phase_basic.h
+++ b/servers/physics/broad_phase_basic.h
@@ -82,7 +82,7 @@ class BroadPhaseBasic : public BroadPhaseSW {
public:
// 0 is an invalid ID
- virtual ID create(CollisionObjectSW *p_object_, int p_subindex = 0);
+ virtual ID create(CollisionObjectSW *p_object, int p_subindex = 0);
virtual void move(ID p_id, const Rect3 &p_aabb);
virtual void set_static(ID p_id, bool p_static);
virtual void remove(ID p_id);
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 1845188089..6dafaac115 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -954,6 +954,9 @@ Vector3 ConvexPolygonShapeSW::get_moment_of_inertia(real_t p_mass) const {
void ConvexPolygonShapeSW::_setup(const Vector<Vector3> &p_vertices) {
Error err = QuickHull::build(p_vertices, mesh);
+ if (err != OK)
+ ERR_PRINT("Failed to build QuickHull");
+
Rect3 _aabb;
for (int i = 0; i < mesh.vertices.size(); i++) {
@@ -1208,8 +1211,6 @@ void ConcavePolygonShapeSW::_cull_segment(int p_idx, _SegmentCullParams *p_param
p_params->min_d = d;
p_params->result = res;
p_params->normal = Plane(vertices[0], vertices[1], vertices[2]).normal;
- if (p_params->normal.dot(p_params->dir) > 0)
- p_params->normal = -p_params->normal;
p_params->collisions++;
}
}
diff --git a/servers/physics/step_sw.cpp b/servers/physics/step_sw.cpp
index 79a55e0af1..76b097dda6 100644
--- a/servers/physics/step_sw.cpp
+++ b/servers/physics/step_sw.cpp
@@ -62,7 +62,7 @@ void StepSW::_setup_island(ConstraintSW *p_island, real_t p_delta) {
ConstraintSW *ci = p_island;
while (ci) {
- bool process = ci->setup(p_delta);
+ ci->setup(p_delta);
//todo remove from island if process fails
ci = ci->get_island_next();
}
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 779f0d54ac..8f22d1cd44 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -518,7 +518,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
body_aabb = body_aabb.grow(p_margin);
static const int max_excluded_shape_pairs = 32;
- Pair<Shape2DSW *, Shape2DSW *> excluded_shape_pairs[max_excluded_shape_pairs];
+ ExcludedShapeSW excluded_shape_pairs[max_excluded_shape_pairs];
int excluded_shape_pair_count = 0;
Transform2D body_transform = p_from;
@@ -577,7 +577,11 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
if (!collided && cbk.invalid_by_dir > 0) {
//this shape must be excluded
if (excluded_shape_pair_count < max_excluded_shape_pairs) {
- excluded_shape_pairs[excluded_shape_pair_count++] = Pair<Shape2DSW *, Shape2DSW *>(body_shape, against_shape);
+ ExcludedShapeSW esp;
+ esp.local_shape = body_shape;
+ esp.against_object = col_obj;
+ esp.against_shape_index = shape_idx;
+ excluded_shape_pairs[excluded_shape_pair_count++] = esp;
}
}
}
@@ -645,7 +649,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
for (int k = 0; k < excluded_shape_pair_count; k++) {
- if (excluded_shape_pairs[k].first == body_shape && excluded_shape_pairs[k].second == against_shape) {
+ if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape_index == shape_idx) {
excluded = true;
break;
}
@@ -776,7 +780,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
bool excluded = false;
for (int k = 0; k < excluded_shape_pair_count; k++) {
- if (excluded_shape_pairs[k].first == body_shape && excluded_shape_pairs[k].second == against_shape) {
+ if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape_index == shape_idx) {
excluded = true;
break;
}
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index ed6136e372..c7e7497397 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -71,6 +71,12 @@ public:
};
private:
+ struct ExcludedShapeSW {
+ Shape2DSW *local_shape;
+ const CollisionObject2DSW *against_object;
+ int against_shape_index;
+ };
+
uint64_t elapsed_time[ELAPSED_TIME_MAX];
Physics2DDirectSpaceStateSW *direct_access;
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index d4e37be882..28ab31b8f6 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -704,6 +704,20 @@ void PhysicsServer::_bind_methods() {
BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS);
BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS);
BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT);
+
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
+
+ BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_DISABLED);
+ BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_X);
+ BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_Y);
+ BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_Z);
}
PhysicsServer::PhysicsServer() {
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 187a0b180b..344c10089a 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -335,6 +335,8 @@ public:
virtual void light_directional_set_shadow_mode(RID p_light, VS::LightDirectionalShadowMode p_mode) = 0;
virtual void light_directional_set_blend_splits(RID p_light, bool p_enable) = 0;
virtual bool light_directional_get_blend_splits(RID p_light) const = 0;
+ virtual void light_directional_set_shadow_depth_range_mode(RID p_light, VS::LightDirectionalShadowDepthRangeMode p_range_mode) = 0;
+ virtual VS::LightDirectionalShadowDepthRangeMode light_directional_get_shadow_depth_range_mode(RID p_light) const = 0;
virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) = 0;
virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) = 0;
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index c7b02c92f7..6ad433268f 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -3000,8 +3000,6 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
if (op->op == OP_CONSTRUCT) {
ERR_FAIL_COND_V(op->arguments[0]->type != Node::TYPE_VARIABLE, p_node);
- VariableNode *vn = static_cast<VariableNode *>(op->arguments[0]);
- //StringName name=vn->name;
DataType base = get_scalar_type(op->get_datatype());
@@ -3121,8 +3119,8 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
tk = _get_token();
VariableDeclarationNode *vardecl = alloc_node<VariableDeclarationNode>();
- vardecl->datatype=type;
- vardecl->precision=precision;
+ vardecl->datatype = type;
+ vardecl->precision = precision;
p_block->statements.push_back(vardecl);
@@ -3148,8 +3146,8 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
VariableDeclarationNode::Declaration decl;
- decl.name=name;
- decl.initializer=NULL;
+ decl.name = name;
+ decl.initializer = NULL;
tk = _get_token();
@@ -3161,13 +3159,11 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
decl.initializer = n;
- if (var.type!=n->get_datatype()) {
+ if (var.type != n->get_datatype()) {
_set_error("Invalid assignment of '" + get_datatype_name(n->get_datatype()) + "' to '" + get_datatype_name(var.type) + "'");
return ERR_PARSE_ERROR;
-
}
tk = _get_token();
-
}
vardecl->declarations.push_back(decl);
@@ -3272,9 +3268,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
BlockNode *init_block = alloc_node<BlockNode>();
init_block->parent_block = p_block;
- init_block->single_statement=true;
+ init_block->single_statement = true;
cf->blocks.push_back(init_block);
- if (_parse_block(init_block,p_builtin_types,true,false,false)!=OK) {
+ if (_parse_block(init_block, p_builtin_types, true, false, false) != OK) {
return ERR_PARSE_ERROR;
}
@@ -3282,10 +3278,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
if (!n)
return ERR_PARSE_ERROR;
- if (n->get_datatype()!=TYPE_BOOL) {
+ if (n->get_datatype() != TYPE_BOOL) {
_set_error("Middle expression is expected to be boolean.");
return ERR_PARSE_ERROR;
-
}
tk = _get_token();
@@ -3392,7 +3387,6 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
p_block->statements.push_back(flow);
} else if (tk.type == TK_CF_BREAK) {
-
if (!p_can_break) {
//all is good
_set_error("Breaking is not allowed here");
@@ -3411,7 +3405,6 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
p_block->statements.push_back(flow);
} else if (tk.type == TK_CF_CONTINUE) {
-
if (!p_can_break) {
//all is good
_set_error("Contiuning is not allowed here");
@@ -3980,6 +3973,8 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
shader = alloc_node<ShaderNode>();
Error err = _parse_shader(p_functions, p_render_modes, p_shader_types);
+ if (err != OK)
+ ERR_PRINT("Failed to parse shader");
switch (completion_type) {
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index 50f5cebeaa..7a7f6dd71c 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -371,7 +371,7 @@ public:
type = TYPE_BLOCK;
parent_block = NULL;
parent_function = NULL;
- single_statement=false;
+ single_statement = false;
}
};
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 3953bc5f48..7c7ce46268 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -795,6 +795,7 @@ public:
BIND2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
BIND2(light_directional_set_blend_splits, RID, bool)
+ BIND2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
/* PROBE API */
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 0d70b7fc0e..9fb4dc524d 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -101,7 +101,7 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
SWAP(A, B); //lesser always first
}
- if (B->base_type == VS::INSTANCE_LIGHT && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ if (B->base_type == VS::INSTANCE_LIGHT && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceLightData *light = static_cast<InstanceLightData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -119,7 +119,7 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
geom->lighting_dirty = true;
return E; //this element should make freeing faster
- } else if (B->base_type == VS::INSTANCE_REFLECTION_PROBE && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ } else if (B->base_type == VS::INSTANCE_REFLECTION_PROBE && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -133,7 +133,7 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
geom->reflection_dirty = true;
return E; //this element should make freeing faster
- } else if (B->base_type == VS::INSTANCE_GI_PROBE && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ } else if (B->base_type == VS::INSTANCE_GI_PROBE && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -151,8 +151,6 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
} else if (B->base_type == VS::INSTANCE_GI_PROBE && A->base_type == VS::INSTANCE_LIGHT) {
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
- InstanceLightData *light = static_cast<InstanceLightData *>(A->base_data);
-
return gi_probe->lights.insert(A);
}
@@ -169,7 +167,7 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
SWAP(A, B); //lesser always first
}
- if (B->base_type == VS::INSTANCE_LIGHT && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ if (B->base_type == VS::INSTANCE_LIGHT && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceLightData *light = static_cast<InstanceLightData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -184,7 +182,7 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
}
geom->lighting_dirty = true;
- } else if (B->base_type == VS::INSTANCE_REFLECTION_PROBE && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ } else if (B->base_type == VS::INSTANCE_REFLECTION_PROBE && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -196,7 +194,7 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
geom->reflection_dirty = true;
- } else if (B->base_type == VS::INSTANCE_GI_PROBE && (1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
+ } else if (B->base_type == VS::INSTANCE_GI_PROBE && ((1 << A->base_type) & VS::INSTANCE_GEOMETRY_MASK)) {
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(A->base_data);
@@ -211,8 +209,6 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
} else if (B->base_type == VS::INSTANCE_GI_PROBE && A->base_type == VS::INSTANCE_LIGHT) {
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
- InstanceLightData *light = static_cast<InstanceLightData *>(A->base_data);
-
Set<Instance *>::Element *E = reinterpret_cast<Set<Instance *>::Element *>(udata);
gi_probe->lights.erase(E);
@@ -886,12 +882,53 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
float max_distance = p_cam_projection.get_z_far();
float shadow_max = VSG::storage->light_get_param(p_instance->base, VS::LIGHT_PARAM_SHADOW_MAX_DISTANCE);
- if (shadow_max > 0) {
+ if (shadow_max > 0 && !p_cam_orthogonal) { //its impractical (and leads to unwanted behaviors) to set max distance in orthogonal camera
max_distance = MIN(shadow_max, max_distance);
}
max_distance = MAX(max_distance, p_cam_projection.get_z_near() + 0.001);
+ float min_distance = MIN(p_cam_projection.get_z_near(), max_distance);
+
+ VS::LightDirectionalShadowDepthRangeMode depth_range_mode = VSG::storage->light_directional_get_shadow_depth_range_mode(p_instance->base);
+
+ if (depth_range_mode == VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED) {
+ //optimize min/max
+ Vector<Plane> planes = p_cam_projection.get_projection_planes(p_cam_transform);
+ int cull_count = p_scenario->octree.cull_convex(planes, instance_shadow_cull_result, MAX_INSTANCE_CULL, VS::INSTANCE_GEOMETRY_MASK);
+ Plane base(p_cam_transform.origin, -p_cam_transform.basis.get_axis(2));
+ //check distance max and min
+
+ bool found_items = false;
+ float z_max = -1e20;
+ float z_min = 1e20;
+
+ for (int i = 0; i < cull_count; i++) {
+
+ Instance *instance = instance_shadow_cull_result[i];
+ if (!instance->visible || !((1 << instance->base_type) & VS::INSTANCE_GEOMETRY_MASK) || !static_cast<InstanceGeometryData *>(instance->base_data)->can_cast_shadows) {
+ continue;
+ }
+
+ float max, min;
+ instance->transformed_aabb.project_range_in_plane(base, min, max);
+
+ if (max > z_max) {
+ z_max = max;
+ }
+
+ if (min < z_min) {
+ z_min = min;
+ }
- float range = max_distance - p_cam_projection.get_z_near();
+ found_items = true;
+ }
+
+ if (found_items) {
+ min_distance = MAX(min_distance, z_min);
+ max_distance = MIN(max_distance, z_max);
+ }
+ }
+
+ float range = max_distance - min_distance;
int splits = 0;
switch (VSG::storage->light_directional_get_shadow_mode(p_instance->base)) {
@@ -902,9 +939,9 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
float distances[5];
- distances[0] = p_cam_projection.get_z_near();
+ distances[0] = min_distance;
for (int i = 0; i < splits; i++) {
- distances[i + 1] = p_cam_projection.get_z_near() + VSG::storage->light_get_param(p_instance->base, VS::LightParam(VS::LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET + i)) * range;
+ distances[i + 1] = min_distance + VSG::storage->light_get_param(p_instance->base, VS::LightParam(VS::LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET + i)) * range;
};
distances[splits] = max_distance;
@@ -984,8 +1021,6 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
{
//camera viewport stuff
- //this trick here is what stabilizes the shadow (make potential jaggies to not move)
- //at the cost of some wasted resolution. Still the quality increase is very well worth it
Vector3 center;
@@ -1006,7 +1041,7 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
radius = d;
}
- radius *= texture_size / (texture_size - 2.0); //add a texel by each side, so stepified texture will always fit
+ radius *= texture_size / (texture_size - 2.0); //add a texel by each side
if (i == 0) {
first_radius = radius;
@@ -1021,12 +1056,17 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
z_max_cam = z_vec.dot(center) + radius;
z_min_cam = z_vec.dot(center) - radius;
- float unit = radius * 2.0 / texture_size;
+ if (depth_range_mode == VS::LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE) {
+ //this trick here is what stabilizes the shadow (make potential jaggies to not move)
+ //at the cost of some wasted resolution. Still the quality increase is very well worth it
+
+ float unit = radius * 2.0 / texture_size;
- x_max_cam = Math::stepify(x_max_cam, unit);
- x_min_cam = Math::stepify(x_min_cam, unit);
- y_max_cam = Math::stepify(y_max_cam, unit);
- y_min_cam = Math::stepify(y_min_cam, unit);
+ x_max_cam = Math::stepify(x_max_cam, unit);
+ x_min_cam = Math::stepify(x_min_cam, unit);
+ y_max_cam = Math::stepify(y_max_cam, unit);
+ y_min_cam = Math::stepify(y_min_cam, unit);
+ }
}
//now that we now all ranges, we can proceed to make the light frustum planes, for culling octree
@@ -1069,6 +1109,7 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
}
{
+
CameraMatrix ortho_camera;
real_t half_x = (x_max_cam - x_min_cam) * 0.5;
real_t half_y = (y_max_cam - y_min_cam) * 0.5;
@@ -1375,7 +1416,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
gi_probe_update_list.add(&gi_probe->update_element);
}
- } else if ((1 << ins->base_type) & VS::INSTANCE_GEOMETRY_MASK && ins->visible && ins->cast_shadows != VS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
+ } else if (((1 << ins->base_type) & VS::INSTANCE_GEOMETRY_MASK) && ins->visible && ins->cast_shadows != VS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
keep = true;
@@ -2085,7 +2126,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
int success_count = 0;
- uint64_t us = OS::get_singleton()->get_ticks_usec();
+ // uint64_t us = OS::get_singleton()->get_ticks_usec();
for (int i = 0; i < p_leaf_count; i++) {
@@ -2138,14 +2179,15 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
success_count++;
}
}
- //print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
- //print_line("valid cells: " + itos(success_count));
+
+ // print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
+ // print_line("valid cells: " + itos(success_count));
} break;
case VS::LIGHT_OMNI:
case VS::LIGHT_SPOT: {
- uint64_t us = OS::get_singleton()->get_ticks_usec();
+ // uint64_t us = OS::get_singleton()->get_ticks_usec();
Vector3 light_pos = light_cache.transform.origin;
Vector3 spot_axis = -light_cache.transform.basis.get_axis(2).normalized();
@@ -2244,8 +2286,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
light->energy[2] += int32_t(light_b * att * ((cell->albedo) & 0xFF) / 255.0);
}
}
- //print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
-
+ // print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
} break;
}
}
@@ -2657,18 +2698,17 @@ void VisualServerScene::render_probes() {
} break;
case GI_UPDATE_STAGE_UPLOADING: {
- uint64_t us = OS::get_singleton()->get_ticks_usec();
+ // uint64_t us = OS::get_singleton()->get_ticks_usec();
for (int i = 0; i < (int)probe->dynamic.mipmaps_3d.size(); i++) {
- int mmsize = probe->dynamic.mipmaps_3d[i].size();
PoolVector<uint8_t>::Read r = probe->dynamic.mipmaps_3d[i].read();
VSG::storage->gi_probe_dynamic_data_update(probe->dynamic.probe_data, 0, probe->dynamic.grid_size[2] >> i, i, r.ptr());
}
probe->dynamic.updating_stage = GI_UPDATE_STAGE_CHECK;
- //print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0));
+ // print_line("UPLOAD TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
} break;
}
}
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index f24049be92..5cf941b93d 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -233,6 +233,7 @@ public:
FUNC2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
FUNC2(light_directional_set_blend_splits, RID, bool)
+ FUNC2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
/* PROBE API */
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 67b847d127..47a5f4c7f3 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1420,6 +1420,29 @@ Array VisualServer::mesh_surface_get_arrays(RID p_mesh, int p_surface) const {
return _get_array_from_surface(format, vertex_data, vertex_len, index_data, index_len);
}
+Array VisualServer::mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surface) const {
+
+ Vector<PoolVector<uint8_t> > blend_shape_data = mesh_surface_get_blend_shapes(p_mesh, p_surface);
+ if (blend_shape_data.size() > 0) {
+ int vertex_len = mesh_surface_get_array_len(p_mesh, p_surface);
+
+ PoolVector<uint8_t> index_data = mesh_surface_get_index_array(p_mesh, p_surface);
+ int index_len = mesh_surface_get_array_index_len(p_mesh, p_surface);
+
+ uint32_t format = mesh_surface_get_format(p_mesh, p_surface);
+
+ Array blend_shape_array;
+ blend_shape_array.resize(blend_shape_data.size());
+ for (int i = 0; i < blend_shape_data.size(); i++) {
+ blend_shape_array.set(i, _get_array_from_surface(format, blend_shape_data[i], vertex_len, index_data, index_len));
+ }
+
+ return blend_shape_array;
+ } else {
+ return Array();
+ }
+}
+
void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("force_draw"), &VisualServer::draw);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index d516013ee2..72f36f6b65 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -267,6 +267,7 @@ public:
virtual PoolVector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const = 0;
virtual Array mesh_surface_get_arrays(RID p_mesh, int p_surface) const;
+ virtual Array mesh_surface_get_blend_shape_arrays(RID p_mesh, int p_surface) const;
virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const = 0;
virtual PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const = 0;
@@ -406,6 +407,14 @@ public:
virtual void light_directional_set_shadow_mode(RID p_light, LightDirectionalShadowMode p_mode) = 0;
virtual void light_directional_set_blend_splits(RID p_light, bool p_enable) = 0;
+ enum LightDirectionalShadowDepthRangeMode {
+ LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE,
+ LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED,
+
+ };
+
+ virtual void light_directional_set_shadow_depth_range_mode(RID p_light, LightDirectionalShadowDepthRangeMode p_range_mode) = 0;
+
/* PROBE API */
virtual RID reflection_probe_create() = 0;
@@ -620,6 +629,7 @@ public:
ENV_BG_CLEAR_COLOR,
ENV_BG_COLOR,
ENV_BG_SKY,
+ ENV_BG_COLOR_SKY,
ENV_BG_CANVAS,
ENV_BG_KEEP,
ENV_BG_MAX
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 76d51d7066..80fab9442b 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -59,10 +59,10 @@ Files extracted from upstream source:
Use UI font if exists, because it has tight vertial metrix and good for UI.
-### Adobe Source Code Pro Regular
+### Mononoki Regular
-- Upstream: https://github.com/adobe-fonts/source-code-pro
-- Version: 2.030
+- Upstream: https://github.com/madmalik/mononoki
+- Version: 1.2
- License: OFL-1.1
### DroidSans*.ttf
@@ -359,6 +359,11 @@ Files extracted from upstream source:
- all .cpp and .h files apart from `main.cpp`
- LICENSE.TXT
+## recastnavigation
+
+- Upstream: https://github.com/recastnavigation/recastnavigation
+- version: git commit ef3ea40f - 2016-02-06
+- License: zlib
## rtaudio
diff --git a/thirdparty/fonts/LICENSE.SourceCodePro.txt b/thirdparty/fonts/LICENSE_Mononoki
index f430ee5dbe..6ef130c5ef 100644
--- a/thirdparty/fonts/LICENSE.SourceCodePro.txt
+++ b/thirdparty/fonts/LICENSE_Mononoki
@@ -1,8 +1,9 @@
-Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+Copyright (c) 2013, Matthias Tellen matthias.tellen@googlemail.com,
+with Reserved Font Name monoOne.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
-
-This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
-----------------------------------------------------------
@@ -91,4 +92,3 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
-
diff --git a/thirdparty/fonts/mononoki_Regular.ttf b/thirdparty/fonts/mononoki_Regular.ttf
new file mode 100644
index 0000000000..9510ac85d1
--- /dev/null
+++ b/thirdparty/fonts/mononoki_Regular.ttf
Binary files differ
diff --git a/thirdparty/fonts/source_code_pro.otf b/thirdparty/fonts/source_code_pro.otf
deleted file mode 100644
index 1bae0027ff..0000000000
--- a/thirdparty/fonts/source_code_pro.otf
+++ /dev/null
Binary files differ
diff --git a/thirdparty/recastnavigation/License.txt b/thirdparty/recastnavigation/License.txt
new file mode 100644
index 0000000000..95f4bfc965
--- /dev/null
+++ b/thirdparty/recastnavigation/License.txt
@@ -0,0 +1,18 @@
+Copyright (c) 2009 Mikko Mononen memon@inside.org
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
diff --git a/thirdparty/recastnavigation/Recast/Include/Recast.h b/thirdparty/recastnavigation/Recast/Include/Recast.h
new file mode 100644
index 0000000000..e85c0d2e29
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Include/Recast.h
@@ -0,0 +1,1200 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef RECAST_H
+#define RECAST_H
+
+/// The value of PI used by Recast.
+static const float RC_PI = 3.14159265f;
+
+/// Recast log categories.
+/// @see rcContext
+enum rcLogCategory
+{
+ RC_LOG_PROGRESS = 1, ///< A progress log entry.
+ RC_LOG_WARNING, ///< A warning log entry.
+ RC_LOG_ERROR, ///< An error log entry.
+};
+
+/// Recast performance timer categories.
+/// @see rcContext
+enum rcTimerLabel
+{
+ /// The user defined total time of the build.
+ RC_TIMER_TOTAL,
+ /// A user defined build time.
+ RC_TIMER_TEMP,
+ /// The time to rasterize the triangles. (See: #rcRasterizeTriangle)
+ RC_TIMER_RASTERIZE_TRIANGLES,
+ /// The time to build the compact heightfield. (See: #rcBuildCompactHeightfield)
+ RC_TIMER_BUILD_COMPACTHEIGHTFIELD,
+ /// The total time to build the contours. (See: #rcBuildContours)
+ RC_TIMER_BUILD_CONTOURS,
+ /// The time to trace the boundaries of the contours. (See: #rcBuildContours)
+ RC_TIMER_BUILD_CONTOURS_TRACE,
+ /// The time to simplify the contours. (See: #rcBuildContours)
+ RC_TIMER_BUILD_CONTOURS_SIMPLIFY,
+ /// The time to filter ledge spans. (See: #rcFilterLedgeSpans)
+ RC_TIMER_FILTER_BORDER,
+ /// The time to filter low height spans. (See: #rcFilterWalkableLowHeightSpans)
+ RC_TIMER_FILTER_WALKABLE,
+ /// The time to apply the median filter. (See: #rcMedianFilterWalkableArea)
+ RC_TIMER_MEDIAN_AREA,
+ /// The time to filter low obstacles. (See: #rcFilterLowHangingWalkableObstacles)
+ RC_TIMER_FILTER_LOW_OBSTACLES,
+ /// The time to build the polygon mesh. (See: #rcBuildPolyMesh)
+ RC_TIMER_BUILD_POLYMESH,
+ /// The time to merge polygon meshes. (See: #rcMergePolyMeshes)
+ RC_TIMER_MERGE_POLYMESH,
+ /// The time to erode the walkable area. (See: #rcErodeWalkableArea)
+ RC_TIMER_ERODE_AREA,
+ /// The time to mark a box area. (See: #rcMarkBoxArea)
+ RC_TIMER_MARK_BOX_AREA,
+ /// The time to mark a cylinder area. (See: #rcMarkCylinderArea)
+ RC_TIMER_MARK_CYLINDER_AREA,
+ /// The time to mark a convex polygon area. (See: #rcMarkConvexPolyArea)
+ RC_TIMER_MARK_CONVEXPOLY_AREA,
+ /// The total time to build the distance field. (See: #rcBuildDistanceField)
+ RC_TIMER_BUILD_DISTANCEFIELD,
+ /// The time to build the distances of the distance field. (See: #rcBuildDistanceField)
+ RC_TIMER_BUILD_DISTANCEFIELD_DIST,
+ /// The time to blur the distance field. (See: #rcBuildDistanceField)
+ RC_TIMER_BUILD_DISTANCEFIELD_BLUR,
+ /// The total time to build the regions. (See: #rcBuildRegions, #rcBuildRegionsMonotone)
+ RC_TIMER_BUILD_REGIONS,
+ /// The total time to apply the watershed algorithm. (See: #rcBuildRegions)
+ RC_TIMER_BUILD_REGIONS_WATERSHED,
+ /// The time to expand regions while applying the watershed algorithm. (See: #rcBuildRegions)
+ RC_TIMER_BUILD_REGIONS_EXPAND,
+ /// The time to flood regions while applying the watershed algorithm. (See: #rcBuildRegions)
+ RC_TIMER_BUILD_REGIONS_FLOOD,
+ /// The time to filter out small regions. (See: #rcBuildRegions, #rcBuildRegionsMonotone)
+ RC_TIMER_BUILD_REGIONS_FILTER,
+ /// The time to build heightfield layers. (See: #rcBuildHeightfieldLayers)
+ RC_TIMER_BUILD_LAYERS,
+ /// The time to build the polygon mesh detail. (See: #rcBuildPolyMeshDetail)
+ RC_TIMER_BUILD_POLYMESHDETAIL,
+ /// The time to merge polygon mesh details. (See: #rcMergePolyMeshDetails)
+ RC_TIMER_MERGE_POLYMESHDETAIL,
+ /// The maximum number of timers. (Used for iterating timers.)
+ RC_MAX_TIMERS
+};
+
+/// Provides an interface for optional logging and performance tracking of the Recast
+/// build process.
+/// @ingroup recast
+class rcContext
+{
+public:
+
+ /// Contructor.
+ /// @param[in] state TRUE if the logging and performance timers should be enabled. [Default: true]
+ inline rcContext(bool state = true) : m_logEnabled(state), m_timerEnabled(state) {}
+ virtual ~rcContext() {}
+
+ /// Enables or disables logging.
+ /// @param[in] state TRUE if logging should be enabled.
+ inline void enableLog(bool state) { m_logEnabled = state; }
+
+ /// Clears all log entries.
+ inline void resetLog() { if (m_logEnabled) doResetLog(); }
+
+ /// Logs a message.
+ /// @param[in] category The category of the message.
+ /// @param[in] format The message.
+ void log(const rcLogCategory category, const char* format, ...);
+
+ /// Enables or disables the performance timers.
+ /// @param[in] state TRUE if timers should be enabled.
+ inline void enableTimer(bool state) { m_timerEnabled = state; }
+
+ /// Clears all peformance timers. (Resets all to unused.)
+ inline void resetTimers() { if (m_timerEnabled) doResetTimers(); }
+
+ /// Starts the specified performance timer.
+ /// @param label The category of the timer.
+ inline void startTimer(const rcTimerLabel label) { if (m_timerEnabled) doStartTimer(label); }
+
+ /// Stops the specified performance timer.
+ /// @param label The category of the timer.
+ inline void stopTimer(const rcTimerLabel label) { if (m_timerEnabled) doStopTimer(label); }
+
+ /// Returns the total accumulated time of the specified performance timer.
+ /// @param label The category of the timer.
+ /// @return The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started.
+ inline int getAccumulatedTime(const rcTimerLabel label) const { return m_timerEnabled ? doGetAccumulatedTime(label) : -1; }
+
+protected:
+
+ /// Clears all log entries.
+ virtual void doResetLog() {}
+
+ /// Logs a message.
+ /// @param[in] category The category of the message.
+ /// @param[in] msg The formatted message.
+ /// @param[in] len The length of the formatted message.
+ virtual void doLog(const rcLogCategory /*category*/, const char* /*msg*/, const int /*len*/) {}
+
+ /// Clears all timers. (Resets all to unused.)
+ virtual void doResetTimers() {}
+
+ /// Starts the specified performance timer.
+ /// @param[in] label The category of timer.
+ virtual void doStartTimer(const rcTimerLabel /*label*/) {}
+
+ /// Stops the specified performance timer.
+ /// @param[in] label The category of the timer.
+ virtual void doStopTimer(const rcTimerLabel /*label*/) {}
+
+ /// Returns the total accumulated time of the specified performance timer.
+ /// @param[in] label The category of the timer.
+ /// @return The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started.
+ virtual int doGetAccumulatedTime(const rcTimerLabel /*label*/) const { return -1; }
+
+ /// True if logging is enabled.
+ bool m_logEnabled;
+
+ /// True if the performance timers are enabled.
+ bool m_timerEnabled;
+};
+
+/// A helper to first start a timer and then stop it when this helper goes out of scope.
+/// @see rcContext
+class rcScopedTimer
+{
+public:
+ /// Constructs an instance and starts the timer.
+ /// @param[in] ctx The context to use.
+ /// @param[in] label The category of the timer.
+ inline rcScopedTimer(rcContext* ctx, const rcTimerLabel label) : m_ctx(ctx), m_label(label) { m_ctx->startTimer(m_label); }
+ inline ~rcScopedTimer() { m_ctx->stopTimer(m_label); }
+
+private:
+ // Explicitly disabled copy constructor and copy assignment operator.
+ rcScopedTimer(const rcScopedTimer&);
+ rcScopedTimer& operator=(const rcScopedTimer&);
+
+ rcContext* const m_ctx;
+ const rcTimerLabel m_label;
+};
+
+/// Specifies a configuration to use when performing Recast builds.
+/// @ingroup recast
+struct rcConfig
+{
+ /// The width of the field along the x-axis. [Limit: >= 0] [Units: vx]
+ int width;
+
+ /// The height of the field along the z-axis. [Limit: >= 0] [Units: vx]
+ int height;
+
+ /// The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx]
+ int tileSize;
+
+ /// The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]
+ int borderSize;
+
+ /// The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu]
+ float cs;
+
+ /// The y-axis cell size to use for fields. [Limit: > 0] [Units: wu]
+ float ch;
+
+ /// The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu]
+ float bmin[3];
+
+ /// The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu]
+ float bmax[3];
+
+ /// The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees]
+ float walkableSlopeAngle;
+
+ /// Minimum floor to 'ceiling' height that will still allow the floor area to
+ /// be considered walkable. [Limit: >= 3] [Units: vx]
+ int walkableHeight;
+
+ /// Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]
+ int walkableClimb;
+
+ /// The distance to erode/shrink the walkable area of the heightfield away from
+ /// obstructions. [Limit: >=0] [Units: vx]
+ int walkableRadius;
+
+ /// The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]
+ int maxEdgeLen;
+
+ /// The maximum distance a simplfied contour's border edges should deviate
+ /// the original raw contour. [Limit: >=0] [Units: vx]
+ float maxSimplificationError;
+
+ /// The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx]
+ int minRegionArea;
+
+ /// Any regions with a span count smaller than this value will, if possible,
+ /// be merged with larger regions. [Limit: >=0] [Units: vx]
+ int mergeRegionArea;
+
+ /// The maximum number of vertices allowed for polygons generated during the
+ /// contour to polygon conversion process. [Limit: >= 3]
+ int maxVertsPerPoly;
+
+ /// Sets the sampling distance to use when generating the detail mesh.
+ /// (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu]
+ float detailSampleDist;
+
+ /// The maximum distance the detail mesh surface should deviate from heightfield
+ /// data. (For height detail only.) [Limit: >=0] [Units: wu]
+ float detailSampleMaxError;
+};
+
+/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax.
+static const int RC_SPAN_HEIGHT_BITS = 13;
+/// Defines the maximum value for rcSpan::smin and rcSpan::smax.
+static const int RC_SPAN_MAX_HEIGHT = (1 << RC_SPAN_HEIGHT_BITS) - 1;
+
+/// The number of spans allocated per span spool.
+/// @see rcSpanPool
+static const int RC_SPANS_PER_POOL = 2048;
+
+/// Represents a span in a heightfield.
+/// @see rcHeightfield
+struct rcSpan
+{
+ unsigned int smin : RC_SPAN_HEIGHT_BITS; ///< The lower limit of the span. [Limit: < #smax]
+ unsigned int smax : RC_SPAN_HEIGHT_BITS; ///< The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT]
+ unsigned int area : 6; ///< The area id assigned to the span.
+ rcSpan* next; ///< The next span higher up in column.
+};
+
+/// A memory pool used for quick allocation of spans within a heightfield.
+/// @see rcHeightfield
+struct rcSpanPool
+{
+ rcSpanPool* next; ///< The next span pool.
+ rcSpan items[RC_SPANS_PER_POOL]; ///< Array of spans in the pool.
+};
+
+/// A dynamic heightfield representing obstructed space.
+/// @ingroup recast
+struct rcHeightfield
+{
+ rcHeightfield();
+ ~rcHeightfield();
+
+ int width; ///< The width of the heightfield. (Along the x-axis in cell units.)
+ int height; ///< The height of the heightfield. (Along the z-axis in cell units.)
+ float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)]
+ float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)]
+ float cs; ///< The size of each cell. (On the xz-plane.)
+ float ch; ///< The height of each cell. (The minimum increment along the y-axis.)
+ rcSpan** spans; ///< Heightfield of spans (width*height).
+ rcSpanPool* pools; ///< Linked list of span pools.
+ rcSpan* freelist; ///< The next free span.
+
+private:
+ // Explicitly-disabled copy constructor and copy assignment operator.
+ rcHeightfield(const rcHeightfield&);
+ rcHeightfield& operator=(const rcHeightfield&);
+};
+
+/// Provides information on the content of a cell column in a compact heightfield.
+struct rcCompactCell
+{
+ unsigned int index : 24; ///< Index to the first span in the column.
+ unsigned int count : 8; ///< Number of spans in the column.
+};
+
+/// Represents a span of unobstructed space within a compact heightfield.
+struct rcCompactSpan
+{
+ unsigned short y; ///< The lower extent of the span. (Measured from the heightfield's base.)
+ unsigned short reg; ///< The id of the region the span belongs to. (Or zero if not in a region.)
+ unsigned int con : 24; ///< Packed neighbor connection data.
+ unsigned int h : 8; ///< The height of the span. (Measured from #y.)
+};
+
+/// A compact, static heightfield representing unobstructed space.
+/// @ingroup recast
+struct rcCompactHeightfield
+{
+ int width; ///< The width of the heightfield. (Along the x-axis in cell units.)
+ int height; ///< The height of the heightfield. (Along the z-axis in cell units.)
+ int spanCount; ///< The number of spans in the heightfield.
+ int walkableHeight; ///< The walkable height used during the build of the field. (See: rcConfig::walkableHeight)
+ int walkableClimb; ///< The walkable climb used during the build of the field. (See: rcConfig::walkableClimb)
+ int borderSize; ///< The AABB border size used during the build of the field. (See: rcConfig::borderSize)
+ unsigned short maxDistance; ///< The maximum distance value of any span within the field.
+ unsigned short maxRegions; ///< The maximum region id of any span within the field.
+ float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)]
+ float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)]
+ float cs; ///< The size of each cell. (On the xz-plane.)
+ float ch; ///< The height of each cell. (The minimum increment along the y-axis.)
+ rcCompactCell* cells; ///< Array of cells. [Size: #width*#height]
+ rcCompactSpan* spans; ///< Array of spans. [Size: #spanCount]
+ unsigned short* dist; ///< Array containing border distance data. [Size: #spanCount]
+ unsigned char* areas; ///< Array containing area id data. [Size: #spanCount]
+};
+
+/// Represents a heightfield layer within a layer set.
+/// @see rcHeightfieldLayerSet
+struct rcHeightfieldLayer
+{
+ float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)]
+ float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)]
+ float cs; ///< The size of each cell. (On the xz-plane.)
+ float ch; ///< The height of each cell. (The minimum increment along the y-axis.)
+ int width; ///< The width of the heightfield. (Along the x-axis in cell units.)
+ int height; ///< The height of the heightfield. (Along the z-axis in cell units.)
+ int minx; ///< The minimum x-bounds of usable data.
+ int maxx; ///< The maximum x-bounds of usable data.
+ int miny; ///< The minimum y-bounds of usable data. (Along the z-axis.)
+ int maxy; ///< The maximum y-bounds of usable data. (Along the z-axis.)
+ int hmin; ///< The minimum height bounds of usable data. (Along the y-axis.)
+ int hmax; ///< The maximum height bounds of usable data. (Along the y-axis.)
+ unsigned char* heights; ///< The heightfield. [Size: width * height]
+ unsigned char* areas; ///< Area ids. [Size: Same as #heights]
+ unsigned char* cons; ///< Packed neighbor connection information. [Size: Same as #heights]
+};
+
+/// Represents a set of heightfield layers.
+/// @ingroup recast
+/// @see rcAllocHeightfieldLayerSet, rcFreeHeightfieldLayerSet
+struct rcHeightfieldLayerSet
+{
+ rcHeightfieldLayer* layers; ///< The layers in the set. [Size: #nlayers]
+ int nlayers; ///< The number of layers in the set.
+};
+
+/// Represents a simple, non-overlapping contour in field space.
+struct rcContour
+{
+ int* verts; ///< Simplified contour vertex and connection data. [Size: 4 * #nverts]
+ int nverts; ///< The number of vertices in the simplified contour.
+ int* rverts; ///< Raw contour vertex and connection data. [Size: 4 * #nrverts]
+ int nrverts; ///< The number of vertices in the raw contour.
+ unsigned short reg; ///< The region id of the contour.
+ unsigned char area; ///< The area id of the contour.
+};
+
+/// Represents a group of related contours.
+/// @ingroup recast
+struct rcContourSet
+{
+ rcContour* conts; ///< An array of the contours in the set. [Size: #nconts]
+ int nconts; ///< The number of contours in the set.
+ float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)]
+ float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)]
+ float cs; ///< The size of each cell. (On the xz-plane.)
+ float ch; ///< The height of each cell. (The minimum increment along the y-axis.)
+ int width; ///< The width of the set. (Along the x-axis in cell units.)
+ int height; ///< The height of the set. (Along the z-axis in cell units.)
+ int borderSize; ///< The AABB border size used to generate the source data from which the contours were derived.
+ float maxError; ///< The max edge error that this contour set was simplified with.
+};
+
+/// Represents a polygon mesh suitable for use in building a navigation mesh.
+/// @ingroup recast
+struct rcPolyMesh
+{
+ unsigned short* verts; ///< The mesh vertices. [Form: (x, y, z) * #nverts]
+ unsigned short* polys; ///< Polygon and neighbor data. [Length: #maxpolys * 2 * #nvp]
+ unsigned short* regs; ///< The region id assigned to each polygon. [Length: #maxpolys]
+ unsigned short* flags; ///< The user defined flags for each polygon. [Length: #maxpolys]
+ unsigned char* areas; ///< The area id assigned to each polygon. [Length: #maxpolys]
+ int nverts; ///< The number of vertices.
+ int npolys; ///< The number of polygons.
+ int maxpolys; ///< The number of allocated polygons.
+ int nvp; ///< The maximum number of vertices per polygon.
+ float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)]
+ float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)]
+ float cs; ///< The size of each cell. (On the xz-plane.)
+ float ch; ///< The height of each cell. (The minimum increment along the y-axis.)
+ int borderSize; ///< The AABB border size used to generate the source data from which the mesh was derived.
+ float maxEdgeError; ///< The max error of the polygon edges in the mesh.
+};
+
+/// Contains triangle meshes that represent detailed height data associated
+/// with the polygons in its associated polygon mesh object.
+/// @ingroup recast
+struct rcPolyMeshDetail
+{
+ unsigned int* meshes; ///< The sub-mesh data. [Size: 4*#nmeshes]
+ float* verts; ///< The mesh vertices. [Size: 3*#nverts]
+ unsigned char* tris; ///< The mesh triangles. [Size: 4*#ntris]
+ int nmeshes; ///< The number of sub-meshes defined by #meshes.
+ int nverts; ///< The number of vertices in #verts.
+ int ntris; ///< The number of triangles in #tris.
+};
+
+/// @name Allocation Functions
+/// Functions used to allocate and de-allocate Recast objects.
+/// @see rcAllocSetCustom
+/// @{
+
+/// Allocates a heightfield object using the Recast allocator.
+/// @return A heightfield that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcCreateHeightfield, rcFreeHeightField
+rcHeightfield* rcAllocHeightfield();
+
+/// Frees the specified heightfield object using the Recast allocator.
+/// @param[in] hf A heightfield allocated using #rcAllocHeightfield
+/// @ingroup recast
+/// @see rcAllocHeightfield
+void rcFreeHeightField(rcHeightfield* hf);
+
+/// Allocates a compact heightfield object using the Recast allocator.
+/// @return A compact heightfield that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcBuildCompactHeightfield, rcFreeCompactHeightfield
+rcCompactHeightfield* rcAllocCompactHeightfield();
+
+/// Frees the specified compact heightfield object using the Recast allocator.
+/// @param[in] chf A compact heightfield allocated using #rcAllocCompactHeightfield
+/// @ingroup recast
+/// @see rcAllocCompactHeightfield
+void rcFreeCompactHeightfield(rcCompactHeightfield* chf);
+
+/// Allocates a heightfield layer set using the Recast allocator.
+/// @return A heightfield layer set that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcBuildHeightfieldLayers, rcFreeHeightfieldLayerSet
+rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet();
+
+/// Frees the specified heightfield layer set using the Recast allocator.
+/// @param[in] lset A heightfield layer set allocated using #rcAllocHeightfieldLayerSet
+/// @ingroup recast
+/// @see rcAllocHeightfieldLayerSet
+void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset);
+
+/// Allocates a contour set object using the Recast allocator.
+/// @return A contour set that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcBuildContours, rcFreeContourSet
+rcContourSet* rcAllocContourSet();
+
+/// Frees the specified contour set using the Recast allocator.
+/// @param[in] cset A contour set allocated using #rcAllocContourSet
+/// @ingroup recast
+/// @see rcAllocContourSet
+void rcFreeContourSet(rcContourSet* cset);
+
+/// Allocates a polygon mesh object using the Recast allocator.
+/// @return A polygon mesh that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcBuildPolyMesh, rcFreePolyMesh
+rcPolyMesh* rcAllocPolyMesh();
+
+/// Frees the specified polygon mesh using the Recast allocator.
+/// @param[in] pmesh A polygon mesh allocated using #rcAllocPolyMesh
+/// @ingroup recast
+/// @see rcAllocPolyMesh
+void rcFreePolyMesh(rcPolyMesh* pmesh);
+
+/// Allocates a detail mesh object using the Recast allocator.
+/// @return A detail mesh that is ready for initialization, or null on failure.
+/// @ingroup recast
+/// @see rcBuildPolyMeshDetail, rcFreePolyMeshDetail
+rcPolyMeshDetail* rcAllocPolyMeshDetail();
+
+/// Frees the specified detail mesh using the Recast allocator.
+/// @param[in] dmesh A detail mesh allocated using #rcAllocPolyMeshDetail
+/// @ingroup recast
+/// @see rcAllocPolyMeshDetail
+void rcFreePolyMeshDetail(rcPolyMeshDetail* dmesh);
+
+/// @}
+
+/// Heighfield border flag.
+/// If a heightfield region ID has this bit set, then the region is a border
+/// region and its spans are considered unwalkable.
+/// (Used during the region and contour build process.)
+/// @see rcCompactSpan::reg
+static const unsigned short RC_BORDER_REG = 0x8000;
+
+/// Polygon touches multiple regions.
+/// If a polygon has this region ID it was merged with or created
+/// from polygons of different regions during the polymesh
+/// build step that removes redundant border vertices.
+/// (Used during the polymesh and detail polymesh build processes)
+/// @see rcPolyMesh::regs
+static const unsigned short RC_MULTIPLE_REGS = 0;
+
+/// Border vertex flag.
+/// If a region ID has this bit set, then the associated element lies on
+/// a tile border. If a contour vertex's region ID has this bit set, the
+/// vertex will later be removed in order to match the segments and vertices
+/// at tile boundaries.
+/// (Used during the build process.)
+/// @see rcCompactSpan::reg, #rcContour::verts, #rcContour::rverts
+static const int RC_BORDER_VERTEX = 0x10000;
+
+/// Area border flag.
+/// If a region ID has this bit set, then the associated element lies on
+/// the border of an area.
+/// (Used during the region and contour build process.)
+/// @see rcCompactSpan::reg, #rcContour::verts, #rcContour::rverts
+static const int RC_AREA_BORDER = 0x20000;
+
+/// Contour build flags.
+/// @see rcBuildContours
+enum rcBuildContoursFlags
+{
+ RC_CONTOUR_TESS_WALL_EDGES = 0x01, ///< Tessellate solid (impassable) edges during contour simplification.
+ RC_CONTOUR_TESS_AREA_EDGES = 0x02, ///< Tessellate edges between areas during contour simplification.
+};
+
+/// Applied to the region id field of contour vertices in order to extract the region id.
+/// The region id field of a vertex may have several flags applied to it. So the
+/// fields value can't be used directly.
+/// @see rcContour::verts, rcContour::rverts
+static const int RC_CONTOUR_REG_MASK = 0xffff;
+
+/// An value which indicates an invalid index within a mesh.
+/// @note This does not necessarily indicate an error.
+/// @see rcPolyMesh::polys
+static const unsigned short RC_MESH_NULL_IDX = 0xffff;
+
+/// Represents the null area.
+/// When a data element is given this value it is considered to no longer be
+/// assigned to a usable area. (E.g. It is unwalkable.)
+static const unsigned char RC_NULL_AREA = 0;
+
+/// The default area id used to indicate a walkable polygon.
+/// This is also the maximum allowed area id, and the only non-null area id
+/// recognized by some steps in the build process.
+static const unsigned char RC_WALKABLE_AREA = 63;
+
+/// The value returned by #rcGetCon if the specified direction is not connected
+/// to another span. (Has no neighbor.)
+static const int RC_NOT_CONNECTED = 0x3f;
+
+/// @name General helper functions
+/// @{
+
+/// Used to ignore a function parameter. VS complains about unused parameters
+/// and this silences the warning.
+/// @param [in] _ Unused parameter
+template<class T> void rcIgnoreUnused(const T&) { }
+
+/// Swaps the values of the two parameters.
+/// @param[in,out] a Value A
+/// @param[in,out] b Value B
+template<class T> inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; }
+
+/// Returns the minimum of two values.
+/// @param[in] a Value A
+/// @param[in] b Value B
+/// @return The minimum of the two values.
+template<class T> inline T rcMin(T a, T b) { return a < b ? a : b; }
+
+/// Returns the maximum of two values.
+/// @param[in] a Value A
+/// @param[in] b Value B
+/// @return The maximum of the two values.
+template<class T> inline T rcMax(T a, T b) { return a > b ? a : b; }
+
+/// Returns the absolute value.
+/// @param[in] a The value.
+/// @return The absolute value of the specified value.
+template<class T> inline T rcAbs(T a) { return a < 0 ? -a : a; }
+
+/// Returns the square of the value.
+/// @param[in] a The value.
+/// @return The square of the value.
+template<class T> inline T rcSqr(T a) { return a*a; }
+
+/// Clamps the value to the specified range.
+/// @param[in] v The value to clamp.
+/// @param[in] mn The minimum permitted return value.
+/// @param[in] mx The maximum permitted return value.
+/// @return The value, clamped to the specified range.
+template<class T> inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
+
+/// Returns the square root of the value.
+/// @param[in] x The value.
+/// @return The square root of the vlaue.
+float rcSqrt(float x);
+
+/// @}
+/// @name Vector helper functions.
+/// @{
+
+/// Derives the cross product of two vectors. (@p v1 x @p v2)
+/// @param[out] dest The cross product. [(x, y, z)]
+/// @param[in] v1 A Vector [(x, y, z)]
+/// @param[in] v2 A vector [(x, y, z)]
+inline void rcVcross(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
+ dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
+ dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
+}
+
+/// Derives the dot product of two vectors. (@p v1 . @p v2)
+/// @param[in] v1 A Vector [(x, y, z)]
+/// @param[in] v2 A vector [(x, y, z)]
+/// @return The dot product.
+inline float rcVdot(const float* v1, const float* v2)
+{
+ return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
+}
+
+/// Performs a scaled vector addition. (@p v1 + (@p v2 * @p s))
+/// @param[out] dest The result vector. [(x, y, z)]
+/// @param[in] v1 The base vector. [(x, y, z)]
+/// @param[in] v2 The vector to scale and add to @p v1. [(x, y, z)]
+/// @param[in] s The amount to scale @p v2 by before adding to @p v1.
+inline void rcVmad(float* dest, const float* v1, const float* v2, const float s)
+{
+ dest[0] = v1[0]+v2[0]*s;
+ dest[1] = v1[1]+v2[1]*s;
+ dest[2] = v1[2]+v2[2]*s;
+}
+
+/// Performs a vector addition. (@p v1 + @p v2)
+/// @param[out] dest The result vector. [(x, y, z)]
+/// @param[in] v1 The base vector. [(x, y, z)]
+/// @param[in] v2 The vector to add to @p v1. [(x, y, z)]
+inline void rcVadd(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]+v2[0];
+ dest[1] = v1[1]+v2[1];
+ dest[2] = v1[2]+v2[2];
+}
+
+/// Performs a vector subtraction. (@p v1 - @p v2)
+/// @param[out] dest The result vector. [(x, y, z)]
+/// @param[in] v1 The base vector. [(x, y, z)]
+/// @param[in] v2 The vector to subtract from @p v1. [(x, y, z)]
+inline void rcVsub(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]-v2[0];
+ dest[1] = v1[1]-v2[1];
+ dest[2] = v1[2]-v2[2];
+}
+
+/// Selects the minimum value of each element from the specified vectors.
+/// @param[in,out] mn A vector. (Will be updated with the result.) [(x, y, z)]
+/// @param[in] v A vector. [(x, y, z)]
+inline void rcVmin(float* mn, const float* v)
+{
+ mn[0] = rcMin(mn[0], v[0]);
+ mn[1] = rcMin(mn[1], v[1]);
+ mn[2] = rcMin(mn[2], v[2]);
+}
+
+/// Selects the maximum value of each element from the specified vectors.
+/// @param[in,out] mx A vector. (Will be updated with the result.) [(x, y, z)]
+/// @param[in] v A vector. [(x, y, z)]
+inline void rcVmax(float* mx, const float* v)
+{
+ mx[0] = rcMax(mx[0], v[0]);
+ mx[1] = rcMax(mx[1], v[1]);
+ mx[2] = rcMax(mx[2], v[2]);
+}
+
+/// Performs a vector copy.
+/// @param[out] dest The result. [(x, y, z)]
+/// @param[in] v The vector to copy. [(x, y, z)]
+inline void rcVcopy(float* dest, const float* v)
+{
+ dest[0] = v[0];
+ dest[1] = v[1];
+ dest[2] = v[2];
+}
+
+/// Returns the distance between two points.
+/// @param[in] v1 A point. [(x, y, z)]
+/// @param[in] v2 A point. [(x, y, z)]
+/// @return The distance between the two points.
+inline float rcVdist(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return rcSqrt(dx*dx + dy*dy + dz*dz);
+}
+
+/// Returns the square of the distance between two points.
+/// @param[in] v1 A point. [(x, y, z)]
+/// @param[in] v2 A point. [(x, y, z)]
+/// @return The square of the distance between the two points.
+inline float rcVdistSqr(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return dx*dx + dy*dy + dz*dz;
+}
+
+/// Normalizes the vector.
+/// @param[in,out] v The vector to normalize. [(x, y, z)]
+inline void rcVnormalize(float* v)
+{
+ float d = 1.0f / rcSqrt(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2]));
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+}
+
+/// @}
+/// @name Heightfield Functions
+/// @see rcHeightfield
+/// @{
+
+/// Calculates the bounding box of an array of vertices.
+/// @ingroup recast
+/// @param[in] verts An array of vertices. [(x, y, z) * @p nv]
+/// @param[in] nv The number of vertices in the @p verts array.
+/// @param[out] bmin The minimum bounds of the AABB. [(x, y, z)] [Units: wu]
+/// @param[out] bmax The maximum bounds of the AABB. [(x, y, z)] [Units: wu]
+void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax);
+
+/// Calculates the grid size based on the bounding box and grid cell size.
+/// @ingroup recast
+/// @param[in] bmin The minimum bounds of the AABB. [(x, y, z)] [Units: wu]
+/// @param[in] bmax The maximum bounds of the AABB. [(x, y, z)] [Units: wu]
+/// @param[in] cs The xz-plane cell size. [Limit: > 0] [Units: wu]
+/// @param[out] w The width along the x-axis. [Limit: >= 0] [Units: vx]
+/// @param[out] h The height along the z-axis. [Limit: >= 0] [Units: vx]
+void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h);
+
+/// Initializes a new heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] hf The allocated heightfield to initialize.
+/// @param[in] width The width of the field along the x-axis. [Limit: >= 0] [Units: vx]
+/// @param[in] height The height of the field along the z-axis. [Limit: >= 0] [Units: vx]
+/// @param[in] bmin The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu]
+/// @param[in] bmax The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu]
+/// @param[in] cs The xz-plane cell size to use for the field. [Limit: > 0] [Units: wu]
+/// @param[in] ch The y-axis cell size to use for field. [Limit: > 0] [Units: wu]
+/// @returns True if the operation completed successfully.
+bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height,
+ const float* bmin, const float* bmax,
+ float cs, float ch);
+
+/// Sets the area id of all triangles with a slope below the specified value
+/// to #RC_WALKABLE_AREA.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableSlopeAngle The maximum slope that is considered walkable.
+/// [Limits: 0 <= value < 90] [Units: Degrees]
+/// @param[in] verts The vertices. [(x, y, z) * @p nv]
+/// @param[in] nv The number of vertices.
+/// @param[in] tris The triangle vertex indices. [(vertA, vertB, vertC) * @p nt]
+/// @param[in] nt The number of triangles.
+/// @param[out] areas The triangle area ids. [Length: >= @p nt]
+void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv,
+ const int* tris, int nt, unsigned char* areas);
+
+/// Sets the area id of all triangles with a slope greater than or equal to the specified value to #RC_NULL_AREA.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableSlopeAngle The maximum slope that is considered walkable.
+/// [Limits: 0 <= value < 90] [Units: Degrees]
+/// @param[in] verts The vertices. [(x, y, z) * @p nv]
+/// @param[in] nv The number of vertices.
+/// @param[in] tris The triangle vertex indices. [(vertA, vertB, vertC) * @p nt]
+/// @param[in] nt The number of triangles.
+/// @param[out] areas The triangle area ids. [Length: >= @p nt]
+void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv,
+ const int* tris, int nt, unsigned char* areas);
+
+/// Adds a span to the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] hf An initialized heightfield.
+/// @param[in] x The width index where the span is to be added.
+/// [Limits: 0 <= value < rcHeightfield::width]
+/// @param[in] y The height index where the span is to be added.
+/// [Limits: 0 <= value < rcHeightfield::height]
+/// @param[in] smin The minimum height of the span. [Limit: < @p smax] [Units: vx]
+/// @param[in] smax The maximum height of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT] [Units: vx]
+/// @param[in] area The area id of the span. [Limit: <= #RC_WALKABLE_AREA)
+/// @param[in] flagMergeThr The merge theshold. [Limit: >= 0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y,
+ const unsigned short smin, const unsigned short smax,
+ const unsigned char area, const int flagMergeThr);
+
+/// Rasterizes a triangle into the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] v0 Triangle vertex 0 [(x, y, z)]
+/// @param[in] v1 Triangle vertex 1 [(x, y, z)]
+/// @param[in] v2 Triangle vertex 2 [(x, y, z)]
+/// @param[in] area The area id of the triangle. [Limit: <= #RC_WALKABLE_AREA]
+/// @param[in,out] solid An initialized heightfield.
+/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag.
+/// [Limit: >= 0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2,
+ const unsigned char area, rcHeightfield& solid,
+ const int flagMergeThr = 1);
+
+/// Rasterizes an indexed triangle mesh into the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] verts The vertices. [(x, y, z) * @p nv]
+/// @param[in] nv The number of vertices.
+/// @param[in] tris The triangle indices. [(vertA, vertB, vertC) * @p nt]
+/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt]
+/// @param[in] nt The number of triangles.
+/// @param[in,out] solid An initialized heightfield.
+/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag.
+/// [Limit: >= 0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv,
+ const int* tris, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr = 1);
+
+/// Rasterizes an indexed triangle mesh into the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] verts The vertices. [(x, y, z) * @p nv]
+/// @param[in] nv The number of vertices.
+/// @param[in] tris The triangle indices. [(vertA, vertB, vertC) * @p nt]
+/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt]
+/// @param[in] nt The number of triangles.
+/// @param[in,out] solid An initialized heightfield.
+/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag.
+/// [Limit: >= 0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv,
+ const unsigned short* tris, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr = 1);
+
+/// Rasterizes triangles into the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] verts The triangle vertices. [(ax, ay, az, bx, by, bz, cx, by, cx) * @p nt]
+/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt]
+/// @param[in] nt The number of triangles.
+/// @param[in,out] solid An initialized heightfield.
+/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag.
+/// [Limit: >= 0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr = 1);
+
+/// Marks non-walkable spans as walkable if their maximum is within @p walkableClimp of a walkable neighbor.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable.
+/// [Limit: >=0] [Units: vx]
+/// @param[in,out] solid A fully built heightfield. (All spans have been added.)
+void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid);
+
+/// Marks spans that are ledges as not-walkable.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area to
+/// be considered walkable. [Limit: >= 3] [Units: vx]
+/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable.
+/// [Limit: >=0] [Units: vx]
+/// @param[in,out] solid A fully built heightfield. (All spans have been added.)
+void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight,
+ const int walkableClimb, rcHeightfield& solid);
+
+/// Marks walkable spans as not walkable if the clearence above the span is less than the specified height.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area to
+/// be considered walkable. [Limit: >= 3] [Units: vx]
+/// @param[in,out] solid A fully built heightfield. (All spans have been added.)
+void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid);
+
+/// Returns the number of spans contained in the specified heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] hf An initialized heightfield.
+/// @returns The number of spans in the heightfield.
+int rcGetHeightFieldSpanCount(rcContext* ctx, rcHeightfield& hf);
+
+/// @}
+/// @name Compact Heightfield Functions
+/// @see rcCompactHeightfield
+/// @{
+
+/// Builds a compact heightfield representing open space, from a heightfield representing solid space.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area
+/// to be considered walkable. [Limit: >= 3] [Units: vx]
+/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable.
+/// [Limit: >=0] [Units: vx]
+/// @param[in] hf The heightfield to be compacted.
+/// @param[out] chf The resulting compact heightfield. (Must be pre-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb,
+ rcHeightfield& hf, rcCompactHeightfield& chf);
+
+/// Erodes the walkable area within the heightfield by the specified radius.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] radius The radius of erosion. [Limits: 0 < value < 255] [Units: vx]
+/// @param[in,out] chf The populated compact heightfield to erode.
+/// @returns True if the operation completed successfully.
+bool rcErodeWalkableArea(rcContext* ctx, int radius, rcCompactHeightfield& chf);
+
+/// Applies a median filter to walkable area types (based on area id), removing noise.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] chf A populated compact heightfield.
+/// @returns True if the operation completed successfully.
+bool rcMedianFilterWalkableArea(rcContext* ctx, rcCompactHeightfield& chf);
+
+/// Applies an area id to all spans within the specified bounding box. (AABB)
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] bmin The minimum of the bounding box. [(x, y, z)]
+/// @param[in] bmax The maximum of the bounding box. [(x, y, z)]
+/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA]
+/// @param[in,out] chf A populated compact heightfield.
+void rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId,
+ rcCompactHeightfield& chf);
+
+/// Applies the area id to the all spans within the specified convex polygon.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] verts The vertices of the polygon [Fomr: (x, y, z) * @p nverts]
+/// @param[in] nverts The number of vertices in the polygon.
+/// @param[in] hmin The height of the base of the polygon.
+/// @param[in] hmax The height of the top of the polygon.
+/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA]
+/// @param[in,out] chf A populated compact heightfield.
+void rcMarkConvexPolyArea(rcContext* ctx, const float* verts, const int nverts,
+ const float hmin, const float hmax, unsigned char areaId,
+ rcCompactHeightfield& chf);
+
+/// Helper function to offset voncex polygons for rcMarkConvexPolyArea.
+/// @ingroup recast
+/// @param[in] verts The vertices of the polygon [Form: (x, y, z) * @p nverts]
+/// @param[in] nverts The number of vertices in the polygon.
+/// @param[out] outVerts The offset vertices (should hold up to 2 * @p nverts) [Form: (x, y, z) * return value]
+/// @param[in] maxOutVerts The max number of vertices that can be stored to @p outVerts.
+/// @returns Number of vertices in the offset polygon or 0 if too few vertices in @p outVerts.
+int rcOffsetPoly(const float* verts, const int nverts, const float offset,
+ float* outVerts, const int maxOutVerts);
+
+/// Applies the area id to all spans within the specified cylinder.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] pos The center of the base of the cylinder. [Form: (x, y, z)]
+/// @param[in] r The radius of the cylinder.
+/// @param[in] h The height of the cylinder.
+/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA]
+/// @param[in,out] chf A populated compact heightfield.
+void rcMarkCylinderArea(rcContext* ctx, const float* pos,
+ const float r, const float h, unsigned char areaId,
+ rcCompactHeightfield& chf);
+
+/// Builds the distance field for the specified compact heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] chf A populated compact heightfield.
+/// @returns True if the operation completed successfully.
+bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf);
+
+/// Builds region data for the heightfield using watershed partitioning.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] chf A populated compact heightfield.
+/// @param[in] borderSize The size of the non-navigable border around the heightfield.
+/// [Limit: >=0] [Units: vx]
+/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas.
+/// [Limit: >=0] [Units: vx].
+/// @param[in] mergeRegionArea Any regions with a span count smaller than this value will, if possible,
+/// be merged with larger regions. [Limit: >=0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea);
+
+/// Builds region data for the heightfield by partitioning the heightfield in non-overlapping layers.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] chf A populated compact heightfield.
+/// @param[in] borderSize The size of the non-navigable border around the heightfield.
+/// [Limit: >=0] [Units: vx]
+/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas.
+/// [Limit: >=0] [Units: vx].
+/// @returns True if the operation completed successfully.
+bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea);
+
+/// Builds region data for the heightfield using simple monotone partitioning.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in,out] chf A populated compact heightfield.
+/// @param[in] borderSize The size of the non-navigable border around the heightfield.
+/// [Limit: >=0] [Units: vx]
+/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas.
+/// [Limit: >=0] [Units: vx].
+/// @param[in] mergeRegionArea Any regions with a span count smaller than this value will, if possible,
+/// be merged with larger regions. [Limit: >=0] [Units: vx]
+/// @returns True if the operation completed successfully.
+bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea);
+
+/// Sets the neighbor connection data for the specified direction.
+/// @param[in] s The span to update.
+/// @param[in] dir The direction to set. [Limits: 0 <= value < 4]
+/// @param[in] i The index of the neighbor span.
+inline void rcSetCon(rcCompactSpan& s, int dir, int i)
+{
+ const unsigned int shift = (unsigned int)dir*6;
+ unsigned int con = s.con;
+ s.con = (con & ~(0x3f << shift)) | (((unsigned int)i & 0x3f) << shift);
+}
+
+/// Gets neighbor connection data for the specified direction.
+/// @param[in] s The span to check.
+/// @param[in] dir The direction to check. [Limits: 0 <= value < 4]
+/// @return The neighbor connection data for the specified direction,
+/// or #RC_NOT_CONNECTED if there is no connection.
+inline int rcGetCon(const rcCompactSpan& s, int dir)
+{
+ const unsigned int shift = (unsigned int)dir*6;
+ return (s.con >> shift) & 0x3f;
+}
+
+/// Gets the standard width (x-axis) offset for the specified direction.
+/// @param[in] dir The direction. [Limits: 0 <= value < 4]
+/// @return The width offset to apply to the current cell position to move
+/// in the direction.
+inline int rcGetDirOffsetX(int dir)
+{
+ static const int offset[4] = { -1, 0, 1, 0, };
+ return offset[dir&0x03];
+}
+
+/// Gets the standard height (z-axis) offset for the specified direction.
+/// @param[in] dir The direction. [Limits: 0 <= value < 4]
+/// @return The height offset to apply to the current cell position to move
+/// in the direction.
+inline int rcGetDirOffsetY(int dir)
+{
+ static const int offset[4] = { 0, 1, 0, -1 };
+ return offset[dir&0x03];
+}
+
+/// Gets the direction for the specified offset. One of x and y should be 0.
+/// @param[in] x The x offset. [Limits: -1 <= value <= 1]
+/// @param[in] y The y offset. [Limits: -1 <= value <= 1]
+/// @return The direction that represents the offset.
+inline int rcGetDirForOffset(int x, int y)
+{
+ static const int dirs[5] = { 3, 0, -1, 2, 1 };
+ return dirs[((y+1)<<1)+x];
+}
+
+/// @}
+/// @name Layer, Contour, Polymesh, and Detail Mesh Functions
+/// @see rcHeightfieldLayer, rcContourSet, rcPolyMesh, rcPolyMeshDetail
+/// @{
+
+/// Builds a layer set from the specified compact heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] chf A fully built compact heightfield.
+/// @param[in] borderSize The size of the non-navigable border around the heightfield. [Limit: >=0]
+/// [Units: vx]
+/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area
+/// to be considered walkable. [Limit: >= 3] [Units: vx]
+/// @param[out] lset The resulting layer set. (Must be pre-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int walkableHeight,
+ rcHeightfieldLayerSet& lset);
+
+/// Builds a contour set from the region outlines in the provided compact heightfield.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] chf A fully built compact heightfield.
+/// @param[in] maxError The maximum distance a simplfied contour's border edges should deviate
+/// the original raw contour. [Limit: >=0] [Units: wu]
+/// @param[in] maxEdgeLen The maximum allowed length for contour edges along the border of the mesh.
+/// [Limit: >=0] [Units: vx]
+/// @param[out] cset The resulting contour set. (Must be pre-allocated.)
+/// @param[in] buildFlags The build flags. (See: #rcBuildContoursFlags)
+/// @returns True if the operation completed successfully.
+bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf,
+ const float maxError, const int maxEdgeLen,
+ rcContourSet& cset, const int buildFlags = RC_CONTOUR_TESS_WALL_EDGES);
+
+/// Builds a polygon mesh from the provided contours.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] cset A fully built contour set.
+/// @param[in] nvp The maximum number of vertices allowed for polygons generated during the
+/// contour to polygon conversion process. [Limit: >= 3]
+/// @param[out] mesh The resulting polygon mesh. (Must be re-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh);
+
+/// Merges multiple polygon meshes into a single mesh.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] meshes An array of polygon meshes to merge. [Size: @p nmeshes]
+/// @param[in] nmeshes The number of polygon meshes in the meshes array.
+/// @param[in] mesh The resulting polygon mesh. (Must be pre-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
+
+/// Builds a detail mesh from the provided polygon mesh.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] mesh A fully built polygon mesh.
+/// @param[in] chf The compact heightfield used to build the polygon mesh.
+/// @param[in] sampleDist Sets the distance to use when samping the heightfield. [Limit: >=0] [Units: wu]
+/// @param[in] sampleMaxError The maximum distance the detail mesh surface should deviate from
+/// heightfield data. [Limit: >=0] [Units: wu]
+/// @param[out] dmesh The resulting detail mesh. (Must be pre-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
+ const float sampleDist, const float sampleMaxError,
+ rcPolyMeshDetail& dmesh);
+
+/// Copies the poly mesh data from src to dst.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] src The source mesh to copy from.
+/// @param[out] dst The resulting detail mesh. (Must be pre-allocated, must be empty mesh.)
+/// @returns True if the operation completed successfully.
+bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst);
+
+/// Merges multiple detail meshes into a single detail mesh.
+/// @ingroup recast
+/// @param[in,out] ctx The build context to use during the operation.
+/// @param[in] meshes An array of detail meshes to merge. [Size: @p nmeshes]
+/// @param[in] nmeshes The number of detail meshes in the meshes array.
+/// @param[out] mesh The resulting detail mesh. (Must be pre-allocated.)
+/// @returns True if the operation completed successfully.
+bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
+
+/// @}
+
+#endif // RECAST_H
+
+///////////////////////////////////////////////////////////////////////////
+
+// Due to the large amount of detail documentation for this file,
+// the content normally located at the end of the header file has been separated
+// out to a file in /Docs/Extern.
diff --git a/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h b/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h
new file mode 100644
index 0000000000..3cdd450d42
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h
@@ -0,0 +1,146 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef RECASTALLOC_H
+#define RECASTALLOC_H
+
+#include <stddef.h>
+
+/// Provides hint values to the memory allocator on how long the
+/// memory is expected to be used.
+enum rcAllocHint
+{
+ RC_ALLOC_PERM, ///< Memory will persist after a function call.
+ RC_ALLOC_TEMP ///< Memory used temporarily within a function.
+};
+
+/// A memory allocation function.
+// @param[in] size The size, in bytes of memory, to allocate.
+// @param[in] rcAllocHint A hint to the allocator on how long the memory is expected to be in use.
+// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed.
+/// @see rcAllocSetCustom
+typedef void* (rcAllocFunc)(size_t size, rcAllocHint hint);
+
+/// A memory deallocation function.
+/// @param[in] ptr A pointer to a memory block previously allocated using #rcAllocFunc.
+/// @see rcAllocSetCustom
+typedef void (rcFreeFunc)(void* ptr);
+
+/// Sets the base custom allocation functions to be used by Recast.
+/// @param[in] allocFunc The memory allocation function to be used by #rcAlloc
+/// @param[in] freeFunc The memory de-allocation function to be used by #rcFree
+void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc);
+
+/// Allocates a memory block.
+/// @param[in] size The size, in bytes of memory, to allocate.
+/// @param[in] hint A hint to the allocator on how long the memory is expected to be in use.
+/// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed.
+/// @see rcFree
+void* rcAlloc(size_t size, rcAllocHint hint);
+
+/// Deallocates a memory block.
+/// @param[in] ptr A pointer to a memory block previously allocated using #rcAlloc.
+/// @see rcAlloc
+void rcFree(void* ptr);
+
+
+/// A simple dynamic array of integers.
+class rcIntArray
+{
+ int* m_data;
+ int m_size, m_cap;
+
+ void doResize(int n);
+
+ // Explicitly disabled copy constructor and copy assignment operator.
+ rcIntArray(const rcIntArray&);
+ rcIntArray& operator=(const rcIntArray&);
+
+public:
+ /// Constructs an instance with an initial array size of zero.
+ rcIntArray() : m_data(0), m_size(0), m_cap(0) {}
+
+ /// Constructs an instance initialized to the specified size.
+ /// @param[in] n The initial size of the integer array.
+ rcIntArray(int n) : m_data(0), m_size(0), m_cap(0) { resize(n); }
+ ~rcIntArray() { rcFree(m_data); }
+
+ /// Specifies the new size of the integer array.
+ /// @param[in] n The new size of the integer array.
+ void resize(int n)
+ {
+ if (n > m_cap)
+ doResize(n);
+
+ m_size = n;
+ }
+
+ /// Push the specified integer onto the end of the array and increases the size by one.
+ /// @param[in] item The new value.
+ void push(int item) { resize(m_size+1); m_data[m_size-1] = item; }
+
+ /// Returns the value at the end of the array and reduces the size by one.
+ /// @return The value at the end of the array.
+ int pop()
+ {
+ if (m_size > 0)
+ m_size--;
+
+ return m_data[m_size];
+ }
+
+ /// The value at the specified array index.
+ /// @warning Does not provide overflow protection.
+ /// @param[in] i The index of the value.
+ const int& operator[](int i) const { return m_data[i]; }
+
+ /// The value at the specified array index.
+ /// @warning Does not provide overflow protection.
+ /// @param[in] i The index of the value.
+ int& operator[](int i) { return m_data[i]; }
+
+ /// The current size of the integer array.
+ int size() const { return m_size; }
+};
+
+/// A simple helper class used to delete an array when it goes out of scope.
+/// @note This class is rarely if ever used by the end user.
+template<class T> class rcScopedDelete
+{
+ T* ptr;
+public:
+
+ /// Constructs an instance with a null pointer.
+ inline rcScopedDelete() : ptr(0) {}
+
+ /// Constructs an instance with the specified pointer.
+ /// @param[in] p An pointer to an allocated array.
+ inline rcScopedDelete(T* p) : ptr(p) {}
+ inline ~rcScopedDelete() { rcFree(ptr); }
+
+ /// The root array pointer.
+ /// @return The root array pointer.
+ inline operator T*() { return ptr; }
+
+private:
+ // Explicitly disabled copy constructor and copy assignment operator.
+ rcScopedDelete(const rcScopedDelete&);
+ rcScopedDelete& operator=(const rcScopedDelete&);
+};
+
+#endif
diff --git a/thirdparty/recastnavigation/Recast/Include/RecastAssert.h b/thirdparty/recastnavigation/Recast/Include/RecastAssert.h
new file mode 100644
index 0000000000..e7cc10e496
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Include/RecastAssert.h
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef RECASTASSERT_H
+#define RECASTASSERT_H
+
+// Note: This header file's only purpose is to include define assert.
+// Feel free to change the file and include your own implementation instead.
+
+#ifdef NDEBUG
+
+// From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
+# define rcAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false)
+
+#else
+
+/// An assertion failure function.
+// @param[in] expression asserted expression.
+// @param[in] file Filename of the failed assertion.
+// @param[in] line Line number of the failed assertion.
+/// @see rcAssertFailSetCustom
+typedef void (rcAssertFailFunc)(const char* expression, const char* file, int line);
+
+/// Sets the base custom assertion failure function to be used by Recast.
+/// @param[in] assertFailFunc The function to be used in case of failure of #dtAssert
+void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc);
+
+/// Gets the base custom assertion failure function to be used by Recast.
+rcAssertFailFunc* rcAssertFailGetCustom();
+
+# include <assert.h>
+# define rcAssert(expression) \
+ { \
+ rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \
+ if(failFunc == NULL) { assert(expression); } \
+ else if(!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
+ }
+
+#endif
+
+#endif // RECASTASSERT_H
diff --git a/thirdparty/recastnavigation/Recast/Source/Recast.cpp b/thirdparty/recastnavigation/Recast/Source/Recast.cpp
new file mode 100644
index 0000000000..8308d1973e
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/Recast.cpp
@@ -0,0 +1,504 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <new>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+float rcSqrt(float x)
+{
+ return sqrtf(x);
+}
+
+/// @class rcContext
+/// @par
+///
+/// This class does not provide logging or timer functionality on its
+/// own. Both must be provided by a concrete implementation
+/// by overriding the protected member functions. Also, this class does not
+/// provide an interface for extracting log messages. (Only adding them.)
+/// So concrete implementations must provide one.
+///
+/// If no logging or timers are required, just pass an instance of this
+/// class through the Recast build process.
+///
+
+/// @par
+///
+/// Example:
+/// @code
+/// // Where ctx is an instance of rcContext and filepath is a char array.
+/// ctx->log(RC_LOG_ERROR, "buildTiledNavigation: Could not load '%s'", filepath);
+/// @endcode
+void rcContext::log(const rcLogCategory category, const char* format, ...)
+{
+ if (!m_logEnabled)
+ return;
+ static const int MSG_SIZE = 512;
+ char msg[MSG_SIZE];
+ va_list ap;
+ va_start(ap, format);
+ int len = vsnprintf(msg, MSG_SIZE, format, ap);
+ if (len >= MSG_SIZE)
+ {
+ len = MSG_SIZE-1;
+ msg[MSG_SIZE-1] = '\0';
+ }
+ va_end(ap);
+ doLog(category, msg, len);
+}
+
+rcHeightfield* rcAllocHeightfield()
+{
+ return new (rcAlloc(sizeof(rcHeightfield), RC_ALLOC_PERM)) rcHeightfield;
+}
+
+rcHeightfield::rcHeightfield()
+ : width()
+ , height()
+ , bmin()
+ , bmax()
+ , cs()
+ , ch()
+ , spans()
+ , pools()
+ , freelist()
+{
+}
+
+rcHeightfield::~rcHeightfield()
+{
+ // Delete span array.
+ rcFree(spans);
+ // Delete span pools.
+ while (pools)
+ {
+ rcSpanPool* next = pools->next;
+ rcFree(pools);
+ pools = next;
+ }
+}
+
+void rcFreeHeightField(rcHeightfield* hf)
+{
+ if (!hf) return;
+ hf->~rcHeightfield();
+ rcFree(hf);
+}
+
+rcCompactHeightfield* rcAllocCompactHeightfield()
+{
+ rcCompactHeightfield* chf = (rcCompactHeightfield*)rcAlloc(sizeof(rcCompactHeightfield), RC_ALLOC_PERM);
+ memset(chf, 0, sizeof(rcCompactHeightfield));
+ return chf;
+}
+
+void rcFreeCompactHeightfield(rcCompactHeightfield* chf)
+{
+ if (!chf) return;
+ rcFree(chf->cells);
+ rcFree(chf->spans);
+ rcFree(chf->dist);
+ rcFree(chf->areas);
+ rcFree(chf);
+}
+
+rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet()
+{
+ rcHeightfieldLayerSet* lset = (rcHeightfieldLayerSet*)rcAlloc(sizeof(rcHeightfieldLayerSet), RC_ALLOC_PERM);
+ memset(lset, 0, sizeof(rcHeightfieldLayerSet));
+ return lset;
+}
+
+void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset)
+{
+ if (!lset) return;
+ for (int i = 0; i < lset->nlayers; ++i)
+ {
+ rcFree(lset->layers[i].heights);
+ rcFree(lset->layers[i].areas);
+ rcFree(lset->layers[i].cons);
+ }
+ rcFree(lset->layers);
+ rcFree(lset);
+}
+
+
+rcContourSet* rcAllocContourSet()
+{
+ rcContourSet* cset = (rcContourSet*)rcAlloc(sizeof(rcContourSet), RC_ALLOC_PERM);
+ memset(cset, 0, sizeof(rcContourSet));
+ return cset;
+}
+
+void rcFreeContourSet(rcContourSet* cset)
+{
+ if (!cset) return;
+ for (int i = 0; i < cset->nconts; ++i)
+ {
+ rcFree(cset->conts[i].verts);
+ rcFree(cset->conts[i].rverts);
+ }
+ rcFree(cset->conts);
+ rcFree(cset);
+}
+
+rcPolyMesh* rcAllocPolyMesh()
+{
+ rcPolyMesh* pmesh = (rcPolyMesh*)rcAlloc(sizeof(rcPolyMesh), RC_ALLOC_PERM);
+ memset(pmesh, 0, sizeof(rcPolyMesh));
+ return pmesh;
+}
+
+void rcFreePolyMesh(rcPolyMesh* pmesh)
+{
+ if (!pmesh) return;
+ rcFree(pmesh->verts);
+ rcFree(pmesh->polys);
+ rcFree(pmesh->regs);
+ rcFree(pmesh->flags);
+ rcFree(pmesh->areas);
+ rcFree(pmesh);
+}
+
+rcPolyMeshDetail* rcAllocPolyMeshDetail()
+{
+ rcPolyMeshDetail* dmesh = (rcPolyMeshDetail*)rcAlloc(sizeof(rcPolyMeshDetail), RC_ALLOC_PERM);
+ memset(dmesh, 0, sizeof(rcPolyMeshDetail));
+ return dmesh;
+}
+
+void rcFreePolyMeshDetail(rcPolyMeshDetail* dmesh)
+{
+ if (!dmesh) return;
+ rcFree(dmesh->meshes);
+ rcFree(dmesh->verts);
+ rcFree(dmesh->tris);
+ rcFree(dmesh);
+}
+
+void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax)
+{
+ // Calculate bounding box.
+ rcVcopy(bmin, verts);
+ rcVcopy(bmax, verts);
+ for (int i = 1; i < nv; ++i)
+ {
+ const float* v = &verts[i*3];
+ rcVmin(bmin, v);
+ rcVmax(bmax, v);
+ }
+}
+
+void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h)
+{
+ *w = (int)((bmax[0] - bmin[0])/cs+0.5f);
+ *h = (int)((bmax[2] - bmin[2])/cs+0.5f);
+}
+
+/// @par
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcAllocHeightfield, rcHeightfield
+bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height,
+ const float* bmin, const float* bmax,
+ float cs, float ch)
+{
+ rcIgnoreUnused(ctx);
+
+ hf.width = width;
+ hf.height = height;
+ rcVcopy(hf.bmin, bmin);
+ rcVcopy(hf.bmax, bmax);
+ hf.cs = cs;
+ hf.ch = ch;
+ hf.spans = (rcSpan**)rcAlloc(sizeof(rcSpan*)*hf.width*hf.height, RC_ALLOC_PERM);
+ if (!hf.spans)
+ return false;
+ memset(hf.spans, 0, sizeof(rcSpan*)*hf.width*hf.height);
+ return true;
+}
+
+static void calcTriNormal(const float* v0, const float* v1, const float* v2, float* norm)
+{
+ float e0[3], e1[3];
+ rcVsub(e0, v1, v0);
+ rcVsub(e1, v2, v0);
+ rcVcross(norm, e0, e1);
+ rcVnormalize(norm);
+}
+
+/// @par
+///
+/// Only sets the area id's for the walkable triangles. Does not alter the
+/// area id's for unwalkable triangles.
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles
+void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle,
+ const float* verts, int nv,
+ const int* tris, int nt,
+ unsigned char* areas)
+{
+ rcIgnoreUnused(ctx);
+ rcIgnoreUnused(nv);
+
+ const float walkableThr = cosf(walkableSlopeAngle/180.0f*RC_PI);
+
+ float norm[3];
+
+ for (int i = 0; i < nt; ++i)
+ {
+ const int* tri = &tris[i*3];
+ calcTriNormal(&verts[tri[0]*3], &verts[tri[1]*3], &verts[tri[2]*3], norm);
+ // Check if the face is walkable.
+ if (norm[1] > walkableThr)
+ areas[i] = RC_WALKABLE_AREA;
+ }
+}
+
+/// @par
+///
+/// Only sets the area id's for the unwalkable triangles. Does not alter the
+/// area id's for walkable triangles.
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles
+void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle,
+ const float* verts, int /*nv*/,
+ const int* tris, int nt,
+ unsigned char* areas)
+{
+ rcIgnoreUnused(ctx);
+
+ const float walkableThr = cosf(walkableSlopeAngle/180.0f*RC_PI);
+
+ float norm[3];
+
+ for (int i = 0; i < nt; ++i)
+ {
+ const int* tri = &tris[i*3];
+ calcTriNormal(&verts[tri[0]*3], &verts[tri[1]*3], &verts[tri[2]*3], norm);
+ // Check if the face is walkable.
+ if (norm[1] <= walkableThr)
+ areas[i] = RC_NULL_AREA;
+ }
+}
+
+int rcGetHeightFieldSpanCount(rcContext* ctx, rcHeightfield& hf)
+{
+ rcIgnoreUnused(ctx);
+
+ const int w = hf.width;
+ const int h = hf.height;
+ int spanCount = 0;
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = hf.spans[x + y*w]; s; s = s->next)
+ {
+ if (s->area != RC_NULL_AREA)
+ spanCount++;
+ }
+ }
+ }
+ return spanCount;
+}
+
+/// @par
+///
+/// This is just the beginning of the process of fully building a compact heightfield.
+/// Various filters may be applied, then the distance field and regions built.
+/// E.g: #rcBuildDistanceField and #rcBuildRegions
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcAllocCompactHeightfield, rcHeightfield, rcCompactHeightfield, rcConfig
+bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb,
+ rcHeightfield& hf, rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_COMPACTHEIGHTFIELD);
+
+ const int w = hf.width;
+ const int h = hf.height;
+ const int spanCount = rcGetHeightFieldSpanCount(ctx, hf);
+
+ // Fill in header.
+ chf.width = w;
+ chf.height = h;
+ chf.spanCount = spanCount;
+ chf.walkableHeight = walkableHeight;
+ chf.walkableClimb = walkableClimb;
+ chf.maxRegions = 0;
+ rcVcopy(chf.bmin, hf.bmin);
+ rcVcopy(chf.bmax, hf.bmax);
+ chf.bmax[1] += walkableHeight*hf.ch;
+ chf.cs = hf.cs;
+ chf.ch = hf.ch;
+ chf.cells = (rcCompactCell*)rcAlloc(sizeof(rcCompactCell)*w*h, RC_ALLOC_PERM);
+ if (!chf.cells)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.cells' (%d)", w*h);
+ return false;
+ }
+ memset(chf.cells, 0, sizeof(rcCompactCell)*w*h);
+ chf.spans = (rcCompactSpan*)rcAlloc(sizeof(rcCompactSpan)*spanCount, RC_ALLOC_PERM);
+ if (!chf.spans)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.spans' (%d)", spanCount);
+ return false;
+ }
+ memset(chf.spans, 0, sizeof(rcCompactSpan)*spanCount);
+ chf.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*spanCount, RC_ALLOC_PERM);
+ if (!chf.areas)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.areas' (%d)", spanCount);
+ return false;
+ }
+ memset(chf.areas, RC_NULL_AREA, sizeof(unsigned char)*spanCount);
+
+ const int MAX_HEIGHT = 0xffff;
+
+ // Fill in cells and spans.
+ int idx = 0;
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcSpan* s = hf.spans[x + y*w];
+ // If there are no spans at this cell, just leave the data to index=0, count=0.
+ if (!s) continue;
+ rcCompactCell& c = chf.cells[x+y*w];
+ c.index = idx;
+ c.count = 0;
+ while (s)
+ {
+ if (s->area != RC_NULL_AREA)
+ {
+ const int bot = (int)s->smax;
+ const int top = s->next ? (int)s->next->smin : MAX_HEIGHT;
+ chf.spans[idx].y = (unsigned short)rcClamp(bot, 0, 0xffff);
+ chf.spans[idx].h = (unsigned char)rcClamp(top - bot, 0, 0xff);
+ chf.areas[idx] = s->area;
+ idx++;
+ c.count++;
+ }
+ s = s->next;
+ }
+ }
+ }
+
+ // Find neighbour connections.
+ const int MAX_LAYERS = RC_NOT_CONNECTED-1;
+ int tooHighNeighbour = 0;
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ rcCompactSpan& s = chf.spans[i];
+
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ rcSetCon(s, dir, RC_NOT_CONNECTED);
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ // First check that the neighbour cell is in bounds.
+ if (nx < 0 || ny < 0 || nx >= w || ny >= h)
+ continue;
+
+ // Iterate over all neighbour spans and check if any of the is
+ // accessible from current cell.
+ const rcCompactCell& nc = chf.cells[nx+ny*w];
+ for (int k = (int)nc.index, nk = (int)(nc.index+nc.count); k < nk; ++k)
+ {
+ const rcCompactSpan& ns = chf.spans[k];
+ const int bot = rcMax(s.y, ns.y);
+ const int top = rcMin(s.y+s.h, ns.y+ns.h);
+
+ // Check that the gap between the spans is walkable,
+ // and that the climb height between the gaps is not too high.
+ if ((top - bot) >= walkableHeight && rcAbs((int)ns.y - (int)s.y) <= walkableClimb)
+ {
+ // Mark direction as walkable.
+ const int lidx = k - (int)nc.index;
+ if (lidx < 0 || lidx > MAX_LAYERS)
+ {
+ tooHighNeighbour = rcMax(tooHighNeighbour, lidx);
+ continue;
+ }
+ rcSetCon(s, dir, lidx);
+ break;
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+ if (tooHighNeighbour > MAX_LAYERS)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Heightfield has too many layers %d (max: %d)",
+ tooHighNeighbour, MAX_LAYERS);
+ }
+
+ return true;
+}
+
+/*
+static int getHeightfieldMemoryUsage(const rcHeightfield& hf)
+{
+ int size = 0;
+ size += sizeof(hf);
+ size += hf.width * hf.height * sizeof(rcSpan*);
+
+ rcSpanPool* pool = hf.pools;
+ while (pool)
+ {
+ size += (sizeof(rcSpanPool) - sizeof(rcSpan)) + sizeof(rcSpan)*RC_SPANS_PER_POOL;
+ pool = pool->next;
+ }
+ return size;
+}
+
+static int getCompactHeightFieldMemoryusage(const rcCompactHeightfield& chf)
+{
+ int size = 0;
+ size += sizeof(rcCompactHeightfield);
+ size += sizeof(rcCompactSpan) * chf.spanCount;
+ size += sizeof(rcCompactCell) * chf.width * chf.height;
+ return size;
+}
+*/
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp b/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp
new file mode 100644
index 0000000000..453b5fa6a6
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp
@@ -0,0 +1,86 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <stdlib.h>
+#include <string.h>
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+static void *rcAllocDefault(size_t size, rcAllocHint)
+{
+ return malloc(size);
+}
+
+static void rcFreeDefault(void *ptr)
+{
+ free(ptr);
+}
+
+static rcAllocFunc* sRecastAllocFunc = rcAllocDefault;
+static rcFreeFunc* sRecastFreeFunc = rcFreeDefault;
+
+/// @see rcAlloc, rcFree
+void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc)
+{
+ sRecastAllocFunc = allocFunc ? allocFunc : rcAllocDefault;
+ sRecastFreeFunc = freeFunc ? freeFunc : rcFreeDefault;
+}
+
+/// @see rcAllocSetCustom
+void* rcAlloc(size_t size, rcAllocHint hint)
+{
+ return sRecastAllocFunc(size, hint);
+}
+
+/// @par
+///
+/// @warning This function leaves the value of @p ptr unchanged. So it still
+/// points to the same (now invalid) location, and not to null.
+///
+/// @see rcAllocSetCustom
+void rcFree(void* ptr)
+{
+ if (ptr)
+ sRecastFreeFunc(ptr);
+}
+
+/// @class rcIntArray
+///
+/// While it is possible to pre-allocate a specific array size during
+/// construction or by using the #resize method, certain methods will
+/// automatically resize the array as needed.
+///
+/// @warning The array memory is not initialized to zero when the size is
+/// manually set during construction or when using #resize.
+
+/// @par
+///
+/// Using this method ensures the array is at least large enough to hold
+/// the specified number of elements. This can improve performance by
+/// avoiding auto-resizing during use.
+void rcIntArray::doResize(int n)
+{
+ if (!m_cap) m_cap = n;
+ while (m_cap < n) m_cap *= 2;
+ int* newData = (int*)rcAlloc(m_cap*sizeof(int), RC_ALLOC_TEMP);
+ rcAssert(newData);
+ if (m_size && newData) memcpy(newData, m_data, m_size*sizeof(int));
+ rcFree(m_data);
+ m_data = newData;
+}
+
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastArea.cpp b/thirdparty/recastnavigation/Recast/Source/RecastArea.cpp
new file mode 100644
index 0000000000..97139cf996
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastArea.cpp
@@ -0,0 +1,591 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+/// @par
+///
+/// Basically, any spans that are closer to a boundary or obstruction than the specified radius
+/// are marked as unwalkable.
+///
+/// This method is usually called immediately after the heightfield has been built.
+///
+/// @see rcCompactHeightfield, rcBuildCompactHeightfield, rcConfig::walkableRadius
+bool rcErodeWalkableArea(rcContext* ctx, int radius, rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ const int w = chf.width;
+ const int h = chf.height;
+
+ rcScopedTimer timer(ctx, RC_TIMER_ERODE_AREA);
+
+ unsigned char* dist = (unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP);
+ if (!dist)
+ {
+ ctx->log(RC_LOG_ERROR, "erodeWalkableArea: Out of memory 'dist' (%d).", chf.spanCount);
+ return false;
+ }
+
+ // Init distance.
+ memset(dist, 0xff, sizeof(unsigned char)*chf.spanCount);
+
+ // Mark boundary cells.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.areas[i] == RC_NULL_AREA)
+ {
+ dist[i] = 0;
+ }
+ else
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ int nc = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ const int nidx = (int)chf.cells[nx+ny*w].index + rcGetCon(s, dir);
+ if (chf.areas[nidx] != RC_NULL_AREA)
+ {
+ nc++;
+ }
+ }
+ }
+ // At least one missing neighbour.
+ if (nc != 4)
+ dist[i] = 0;
+ }
+ }
+ }
+ }
+
+ unsigned char nd;
+
+ // Pass 1
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 0) != RC_NOT_CONNECTED)
+ {
+ // (-1,0)
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ const rcCompactSpan& as = chf.spans[ai];
+ nd = (unsigned char)rcMin((int)dist[ai]+2, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+
+ // (-1,-1)
+ if (rcGetCon(as, 3) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(3);
+ const int aay = ay + rcGetDirOffsetY(3);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 3);
+ nd = (unsigned char)rcMin((int)dist[aai]+3, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+ }
+ }
+ if (rcGetCon(s, 3) != RC_NOT_CONNECTED)
+ {
+ // (0,-1)
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ const rcCompactSpan& as = chf.spans[ai];
+ nd = (unsigned char)rcMin((int)dist[ai]+2, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+
+ // (1,-1)
+ if (rcGetCon(as, 2) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(2);
+ const int aay = ay + rcGetDirOffsetY(2);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 2);
+ nd = (unsigned char)rcMin((int)dist[aai]+3, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+ }
+ }
+ }
+ }
+ }
+
+ // Pass 2
+ for (int y = h-1; y >= 0; --y)
+ {
+ for (int x = w-1; x >= 0; --x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 2) != RC_NOT_CONNECTED)
+ {
+ // (1,0)
+ const int ax = x + rcGetDirOffsetX(2);
+ const int ay = y + rcGetDirOffsetY(2);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 2);
+ const rcCompactSpan& as = chf.spans[ai];
+ nd = (unsigned char)rcMin((int)dist[ai]+2, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+
+ // (1,1)
+ if (rcGetCon(as, 1) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(1);
+ const int aay = ay + rcGetDirOffsetY(1);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 1);
+ nd = (unsigned char)rcMin((int)dist[aai]+3, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+ }
+ }
+ if (rcGetCon(s, 1) != RC_NOT_CONNECTED)
+ {
+ // (0,1)
+ const int ax = x + rcGetDirOffsetX(1);
+ const int ay = y + rcGetDirOffsetY(1);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 1);
+ const rcCompactSpan& as = chf.spans[ai];
+ nd = (unsigned char)rcMin((int)dist[ai]+2, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+
+ // (-1,1)
+ if (rcGetCon(as, 0) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(0);
+ const int aay = ay + rcGetDirOffsetY(0);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 0);
+ nd = (unsigned char)rcMin((int)dist[aai]+3, 255);
+ if (nd < dist[i])
+ dist[i] = nd;
+ }
+ }
+ }
+ }
+ }
+
+ const unsigned char thr = (unsigned char)(radius*2);
+ for (int i = 0; i < chf.spanCount; ++i)
+ if (dist[i] < thr)
+ chf.areas[i] = RC_NULL_AREA;
+
+ rcFree(dist);
+
+ return true;
+}
+
+static void insertSort(unsigned char* a, const int n)
+{
+ int i, j;
+ for (i = 1; i < n; i++)
+ {
+ const unsigned char value = a[i];
+ for (j = i - 1; j >= 0 && a[j] > value; j--)
+ a[j+1] = a[j];
+ a[j+1] = value;
+ }
+}
+
+/// @par
+///
+/// This filter is usually applied after applying area id's using functions
+/// such as #rcMarkBoxArea, #rcMarkConvexPolyArea, and #rcMarkCylinderArea.
+///
+/// @see rcCompactHeightfield
+bool rcMedianFilterWalkableArea(rcContext* ctx, rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ const int w = chf.width;
+ const int h = chf.height;
+
+ rcScopedTimer timer(ctx, RC_TIMER_MEDIAN_AREA);
+
+ unsigned char* areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP);
+ if (!areas)
+ {
+ ctx->log(RC_LOG_ERROR, "medianFilterWalkableArea: Out of memory 'areas' (%d).", chf.spanCount);
+ return false;
+ }
+
+ // Init distance.
+ memset(areas, 0xff, sizeof(unsigned char)*chf.spanCount);
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ if (chf.areas[i] == RC_NULL_AREA)
+ {
+ areas[i] = chf.areas[i];
+ continue;
+ }
+
+ unsigned char nei[9];
+ for (int j = 0; j < 9; ++j)
+ nei[j] = chf.areas[i];
+
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ if (chf.areas[ai] != RC_NULL_AREA)
+ nei[dir*2+0] = chf.areas[ai];
+
+ const rcCompactSpan& as = chf.spans[ai];
+ const int dir2 = (dir+1) & 0x3;
+ if (rcGetCon(as, dir2) != RC_NOT_CONNECTED)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir2);
+ const int ay2 = ay + rcGetDirOffsetY(dir2);
+ const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2);
+ if (chf.areas[ai2] != RC_NULL_AREA)
+ nei[dir*2+1] = chf.areas[ai2];
+ }
+ }
+ }
+ insertSort(nei, 9);
+ areas[i] = nei[4];
+ }
+ }
+ }
+
+ memcpy(chf.areas, areas, sizeof(unsigned char)*chf.spanCount);
+
+ rcFree(areas);
+
+ return true;
+}
+
+/// @par
+///
+/// The value of spacial parameters are in world units.
+///
+/// @see rcCompactHeightfield, rcMedianFilterWalkableArea
+void rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId,
+ rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_MARK_BOX_AREA);
+
+ int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs);
+ int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch);
+ int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs);
+ int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs);
+ int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch);
+ int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs);
+
+ if (maxx < 0) return;
+ if (minx >= chf.width) return;
+ if (maxz < 0) return;
+ if (minz >= chf.height) return;
+
+ if (minx < 0) minx = 0;
+ if (maxx >= chf.width) maxx = chf.width-1;
+ if (minz < 0) minz = 0;
+ if (maxz >= chf.height) maxz = chf.height-1;
+
+ for (int z = minz; z <= maxz; ++z)
+ {
+ for (int x = minx; x <= maxx; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+z*chf.width];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ rcCompactSpan& s = chf.spans[i];
+ if ((int)s.y >= miny && (int)s.y <= maxy)
+ {
+ if (chf.areas[i] != RC_NULL_AREA)
+ chf.areas[i] = areaId;
+ }
+ }
+ }
+ }
+}
+
+
+static int pointInPoly(int nvert, const float* verts, const float* p)
+{
+ int i, j, c = 0;
+ for (i = 0, j = nvert-1; i < nvert; j = i++)
+ {
+ const float* vi = &verts[i*3];
+ const float* vj = &verts[j*3];
+ if (((vi[2] > p[2]) != (vj[2] > p[2])) &&
+ (p[0] < (vj[0]-vi[0]) * (p[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) )
+ c = !c;
+ }
+ return c;
+}
+
+/// @par
+///
+/// The value of spacial parameters are in world units.
+///
+/// The y-values of the polygon vertices are ignored. So the polygon is effectively
+/// projected onto the xz-plane at @p hmin, then extruded to @p hmax.
+///
+/// @see rcCompactHeightfield, rcMedianFilterWalkableArea
+void rcMarkConvexPolyArea(rcContext* ctx, const float* verts, const int nverts,
+ const float hmin, const float hmax, unsigned char areaId,
+ rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_MARK_CONVEXPOLY_AREA);
+
+ float bmin[3], bmax[3];
+ rcVcopy(bmin, verts);
+ rcVcopy(bmax, verts);
+ for (int i = 1; i < nverts; ++i)
+ {
+ rcVmin(bmin, &verts[i*3]);
+ rcVmax(bmax, &verts[i*3]);
+ }
+ bmin[1] = hmin;
+ bmax[1] = hmax;
+
+ int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs);
+ int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch);
+ int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs);
+ int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs);
+ int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch);
+ int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs);
+
+ if (maxx < 0) return;
+ if (minx >= chf.width) return;
+ if (maxz < 0) return;
+ if (minz >= chf.height) return;
+
+ if (minx < 0) minx = 0;
+ if (maxx >= chf.width) maxx = chf.width-1;
+ if (minz < 0) minz = 0;
+ if (maxz >= chf.height) maxz = chf.height-1;
+
+
+ // TODO: Optimize.
+ for (int z = minz; z <= maxz; ++z)
+ {
+ for (int x = minx; x <= maxx; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+z*chf.width];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ rcCompactSpan& s = chf.spans[i];
+ if (chf.areas[i] == RC_NULL_AREA)
+ continue;
+ if ((int)s.y >= miny && (int)s.y <= maxy)
+ {
+ float p[3];
+ p[0] = chf.bmin[0] + (x+0.5f)*chf.cs;
+ p[1] = 0;
+ p[2] = chf.bmin[2] + (z+0.5f)*chf.cs;
+
+ if (pointInPoly(nverts, verts, p))
+ {
+ chf.areas[i] = areaId;
+ }
+ }
+ }
+ }
+ }
+}
+
+int rcOffsetPoly(const float* verts, const int nverts, const float offset,
+ float* outVerts, const int maxOutVerts)
+{
+ const float MITER_LIMIT = 1.20f;
+
+ int n = 0;
+
+ for (int i = 0; i < nverts; i++)
+ {
+ const int a = (i+nverts-1) % nverts;
+ const int b = i;
+ const int c = (i+1) % nverts;
+ const float* va = &verts[a*3];
+ const float* vb = &verts[b*3];
+ const float* vc = &verts[c*3];
+ float dx0 = vb[0] - va[0];
+ float dy0 = vb[2] - va[2];
+ float d0 = dx0*dx0 + dy0*dy0;
+ if (d0 > 1e-6f)
+ {
+ d0 = 1.0f/rcSqrt(d0);
+ dx0 *= d0;
+ dy0 *= d0;
+ }
+ float dx1 = vc[0] - vb[0];
+ float dy1 = vc[2] - vb[2];
+ float d1 = dx1*dx1 + dy1*dy1;
+ if (d1 > 1e-6f)
+ {
+ d1 = 1.0f/rcSqrt(d1);
+ dx1 *= d1;
+ dy1 *= d1;
+ }
+ const float dlx0 = -dy0;
+ const float dly0 = dx0;
+ const float dlx1 = -dy1;
+ const float dly1 = dx1;
+ float cross = dx1*dy0 - dx0*dy1;
+ float dmx = (dlx0 + dlx1) * 0.5f;
+ float dmy = (dly0 + dly1) * 0.5f;
+ float dmr2 = dmx*dmx + dmy*dmy;
+ bool bevel = dmr2 * MITER_LIMIT*MITER_LIMIT < 1.0f;
+ if (dmr2 > 1e-6f)
+ {
+ const float scale = 1.0f / dmr2;
+ dmx *= scale;
+ dmy *= scale;
+ }
+
+ if (bevel && cross < 0.0f)
+ {
+ if (n+2 >= maxOutVerts)
+ return 0;
+ float d = (1.0f - (dx0*dx1 + dy0*dy1))*0.5f;
+ outVerts[n*3+0] = vb[0] + (-dlx0+dx0*d)*offset;
+ outVerts[n*3+1] = vb[1];
+ outVerts[n*3+2] = vb[2] + (-dly0+dy0*d)*offset;
+ n++;
+ outVerts[n*3+0] = vb[0] + (-dlx1-dx1*d)*offset;
+ outVerts[n*3+1] = vb[1];
+ outVerts[n*3+2] = vb[2] + (-dly1-dy1*d)*offset;
+ n++;
+ }
+ else
+ {
+ if (n+1 >= maxOutVerts)
+ return 0;
+ outVerts[n*3+0] = vb[0] - dmx*offset;
+ outVerts[n*3+1] = vb[1];
+ outVerts[n*3+2] = vb[2] - dmy*offset;
+ n++;
+ }
+ }
+
+ return n;
+}
+
+
+/// @par
+///
+/// The value of spacial parameters are in world units.
+///
+/// @see rcCompactHeightfield, rcMedianFilterWalkableArea
+void rcMarkCylinderArea(rcContext* ctx, const float* pos,
+ const float r, const float h, unsigned char areaId,
+ rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_MARK_CYLINDER_AREA);
+
+ float bmin[3], bmax[3];
+ bmin[0] = pos[0] - r;
+ bmin[1] = pos[1];
+ bmin[2] = pos[2] - r;
+ bmax[0] = pos[0] + r;
+ bmax[1] = pos[1] + h;
+ bmax[2] = pos[2] + r;
+ const float r2 = r*r;
+
+ int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs);
+ int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch);
+ int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs);
+ int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs);
+ int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch);
+ int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs);
+
+ if (maxx < 0) return;
+ if (minx >= chf.width) return;
+ if (maxz < 0) return;
+ if (minz >= chf.height) return;
+
+ if (minx < 0) minx = 0;
+ if (maxx >= chf.width) maxx = chf.width-1;
+ if (minz < 0) minz = 0;
+ if (maxz >= chf.height) maxz = chf.height-1;
+
+
+ for (int z = minz; z <= maxz; ++z)
+ {
+ for (int x = minx; x <= maxx; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+z*chf.width];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ rcCompactSpan& s = chf.spans[i];
+
+ if (chf.areas[i] == RC_NULL_AREA)
+ continue;
+
+ if ((int)s.y >= miny && (int)s.y <= maxy)
+ {
+ const float sx = chf.bmin[0] + (x+0.5f)*chf.cs;
+ const float sz = chf.bmin[2] + (z+0.5f)*chf.cs;
+ const float dx = sx - pos[0];
+ const float dz = sz - pos[2];
+
+ if (dx*dx + dz*dz < r2)
+ {
+ chf.areas[i] = areaId;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastAssert.cpp b/thirdparty/recastnavigation/Recast/Source/RecastAssert.cpp
new file mode 100644
index 0000000000..6297d42023
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastAssert.cpp
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include "RecastAssert.h"
+
+#ifndef NDEBUG
+
+static rcAssertFailFunc* sRecastAssertFailFunc = 0;
+
+void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc)
+{
+ sRecastAssertFailFunc = assertFailFunc;
+}
+
+rcAssertFailFunc* rcAssertFailGetCustom()
+{
+ return sRecastAssertFailFunc;
+}
+
+#endif
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp b/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp
new file mode 100644
index 0000000000..277ab01501
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp
@@ -0,0 +1,1105 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+
+static int getCornerHeight(int x, int y, int i, int dir,
+ const rcCompactHeightfield& chf,
+ bool& isBorderVertex)
+{
+ const rcCompactSpan& s = chf.spans[i];
+ int ch = (int)s.y;
+ int dirp = (dir+1) & 0x3;
+
+ unsigned int regs[4] = {0,0,0,0};
+
+ // Combine region and area codes in order to prevent
+ // border vertices which are in between two areas to be removed.
+ regs[0] = chf.spans[i].reg | (chf.areas[i] << 16);
+
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+ ch = rcMax(ch, (int)as.y);
+ regs[1] = chf.spans[ai].reg | (chf.areas[ai] << 16);
+ if (rcGetCon(as, dirp) != RC_NOT_CONNECTED)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dirp);
+ const int ay2 = ay + rcGetDirOffsetY(dirp);
+ const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dirp);
+ const rcCompactSpan& as2 = chf.spans[ai2];
+ ch = rcMax(ch, (int)as2.y);
+ regs[2] = chf.spans[ai2].reg | (chf.areas[ai2] << 16);
+ }
+ }
+ if (rcGetCon(s, dirp) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dirp);
+ const int ay = y + rcGetDirOffsetY(dirp);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dirp);
+ const rcCompactSpan& as = chf.spans[ai];
+ ch = rcMax(ch, (int)as.y);
+ regs[3] = chf.spans[ai].reg | (chf.areas[ai] << 16);
+ if (rcGetCon(as, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir);
+ const int ay2 = ay + rcGetDirOffsetY(dir);
+ const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dir);
+ const rcCompactSpan& as2 = chf.spans[ai2];
+ ch = rcMax(ch, (int)as2.y);
+ regs[2] = chf.spans[ai2].reg | (chf.areas[ai2] << 16);
+ }
+ }
+
+ // Check if the vertex is special edge vertex, these vertices will be removed later.
+ for (int j = 0; j < 4; ++j)
+ {
+ const int a = j;
+ const int b = (j+1) & 0x3;
+ const int c = (j+2) & 0x3;
+ const int d = (j+3) & 0x3;
+
+ // The vertex is a border vertex there are two same exterior cells in a row,
+ // followed by two interior cells and none of the regions are out of bounds.
+ const bool twoSameExts = (regs[a] & regs[b] & RC_BORDER_REG) != 0 && regs[a] == regs[b];
+ const bool twoInts = ((regs[c] | regs[d]) & RC_BORDER_REG) == 0;
+ const bool intsSameArea = (regs[c]>>16) == (regs[d]>>16);
+ const bool noZeros = regs[a] != 0 && regs[b] != 0 && regs[c] != 0 && regs[d] != 0;
+ if (twoSameExts && twoInts && intsSameArea && noZeros)
+ {
+ isBorderVertex = true;
+ break;
+ }
+ }
+
+ return ch;
+}
+
+static void walkContour(int x, int y, int i,
+ rcCompactHeightfield& chf,
+ unsigned char* flags, rcIntArray& points)
+{
+ // Choose the first non-connected edge
+ unsigned char dir = 0;
+ while ((flags[i] & (1 << dir)) == 0)
+ dir++;
+
+ unsigned char startDir = dir;
+ int starti = i;
+
+ const unsigned char area = chf.areas[i];
+
+ int iter = 0;
+ while (++iter < 40000)
+ {
+ if (flags[i] & (1 << dir))
+ {
+ // Choose the edge corner
+ bool isBorderVertex = false;
+ bool isAreaBorder = false;
+ int px = x;
+ int py = getCornerHeight(x, y, i, dir, chf, isBorderVertex);
+ int pz = y;
+ switch(dir)
+ {
+ case 0: pz++; break;
+ case 1: px++; pz++; break;
+ case 2: px++; break;
+ }
+ int r = 0;
+ const rcCompactSpan& s = chf.spans[i];
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ r = (int)chf.spans[ai].reg;
+ if (area != chf.areas[ai])
+ isAreaBorder = true;
+ }
+ if (isBorderVertex)
+ r |= RC_BORDER_VERTEX;
+ if (isAreaBorder)
+ r |= RC_AREA_BORDER;
+ points.push(px);
+ points.push(py);
+ points.push(pz);
+ points.push(r);
+
+ flags[i] &= ~(1 << dir); // Remove visited edges
+ dir = (dir+1) & 0x3; // Rotate CW
+ }
+ else
+ {
+ int ni = -1;
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ const rcCompactSpan& s = chf.spans[i];
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const rcCompactCell& nc = chf.cells[nx+ny*chf.width];
+ ni = (int)nc.index + rcGetCon(s, dir);
+ }
+ if (ni == -1)
+ {
+ // Should not happen.
+ return;
+ }
+ x = nx;
+ y = ny;
+ i = ni;
+ dir = (dir+3) & 0x3; // Rotate CCW
+ }
+
+ if (starti == i && startDir == dir)
+ {
+ break;
+ }
+ }
+}
+
+static float distancePtSeg(const int x, const int z,
+ const int px, const int pz,
+ const int qx, const int qz)
+{
+ float pqx = (float)(qx - px);
+ float pqz = (float)(qz - pz);
+ float dx = (float)(x - px);
+ float dz = (float)(z - pz);
+ float d = pqx*pqx + pqz*pqz;
+ float t = pqx*dx + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = px + t*pqx - x;
+ dz = pz + t*pqz - z;
+
+ return dx*dx + dz*dz;
+}
+
+static void simplifyContour(rcIntArray& points, rcIntArray& simplified,
+ const float maxError, const int maxEdgeLen, const int buildFlags)
+{
+ // Add initial points.
+ bool hasConnections = false;
+ for (int i = 0; i < points.size(); i += 4)
+ {
+ if ((points[i+3] & RC_CONTOUR_REG_MASK) != 0)
+ {
+ hasConnections = true;
+ break;
+ }
+ }
+
+ if (hasConnections)
+ {
+ // The contour has some portals to other regions.
+ // Add a new point to every location where the region changes.
+ for (int i = 0, ni = points.size()/4; i < ni; ++i)
+ {
+ int ii = (i+1) % ni;
+ const bool differentRegs = (points[i*4+3] & RC_CONTOUR_REG_MASK) != (points[ii*4+3] & RC_CONTOUR_REG_MASK);
+ const bool areaBorders = (points[i*4+3] & RC_AREA_BORDER) != (points[ii*4+3] & RC_AREA_BORDER);
+ if (differentRegs || areaBorders)
+ {
+ simplified.push(points[i*4+0]);
+ simplified.push(points[i*4+1]);
+ simplified.push(points[i*4+2]);
+ simplified.push(i);
+ }
+ }
+ }
+
+ if (simplified.size() == 0)
+ {
+ // If there is no connections at all,
+ // create some initial points for the simplification process.
+ // Find lower-left and upper-right vertices of the contour.
+ int llx = points[0];
+ int lly = points[1];
+ int llz = points[2];
+ int lli = 0;
+ int urx = points[0];
+ int ury = points[1];
+ int urz = points[2];
+ int uri = 0;
+ for (int i = 0; i < points.size(); i += 4)
+ {
+ int x = points[i+0];
+ int y = points[i+1];
+ int z = points[i+2];
+ if (x < llx || (x == llx && z < llz))
+ {
+ llx = x;
+ lly = y;
+ llz = z;
+ lli = i/4;
+ }
+ if (x > urx || (x == urx && z > urz))
+ {
+ urx = x;
+ ury = y;
+ urz = z;
+ uri = i/4;
+ }
+ }
+ simplified.push(llx);
+ simplified.push(lly);
+ simplified.push(llz);
+ simplified.push(lli);
+
+ simplified.push(urx);
+ simplified.push(ury);
+ simplified.push(urz);
+ simplified.push(uri);
+ }
+
+ // Add points until all raw points are within
+ // error tolerance to the simplified shape.
+ const int pn = points.size()/4;
+ for (int i = 0; i < simplified.size()/4; )
+ {
+ int ii = (i+1) % (simplified.size()/4);
+
+ int ax = simplified[i*4+0];
+ int az = simplified[i*4+2];
+ int ai = simplified[i*4+3];
+
+ int bx = simplified[ii*4+0];
+ int bz = simplified[ii*4+2];
+ int bi = simplified[ii*4+3];
+
+ // Find maximum deviation from the segment.
+ float maxd = 0;
+ int maxi = -1;
+ int ci, cinc, endi;
+
+ // Traverse the segment in lexilogical order so that the
+ // max deviation is calculated similarly when traversing
+ // opposite segments.
+ if (bx > ax || (bx == ax && bz > az))
+ {
+ cinc = 1;
+ ci = (ai+cinc) % pn;
+ endi = bi;
+ }
+ else
+ {
+ cinc = pn-1;
+ ci = (bi+cinc) % pn;
+ endi = ai;
+ rcSwap(ax, bx);
+ rcSwap(az, bz);
+ }
+
+ // Tessellate only outer edges or edges between areas.
+ if ((points[ci*4+3] & RC_CONTOUR_REG_MASK) == 0 ||
+ (points[ci*4+3] & RC_AREA_BORDER))
+ {
+ while (ci != endi)
+ {
+ float d = distancePtSeg(points[ci*4+0], points[ci*4+2], ax, az, bx, bz);
+ if (d > maxd)
+ {
+ maxd = d;
+ maxi = ci;
+ }
+ ci = (ci+cinc) % pn;
+ }
+ }
+
+
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1 && maxd > (maxError*maxError))
+ {
+ // Add space for the new point.
+ simplified.resize(simplified.size()+4);
+ const int n = simplified.size()/4;
+ for (int j = n-1; j > i; --j)
+ {
+ simplified[j*4+0] = simplified[(j-1)*4+0];
+ simplified[j*4+1] = simplified[(j-1)*4+1];
+ simplified[j*4+2] = simplified[(j-1)*4+2];
+ simplified[j*4+3] = simplified[(j-1)*4+3];
+ }
+ // Add the point.
+ simplified[(i+1)*4+0] = points[maxi*4+0];
+ simplified[(i+1)*4+1] = points[maxi*4+1];
+ simplified[(i+1)*4+2] = points[maxi*4+2];
+ simplified[(i+1)*4+3] = maxi;
+ }
+ else
+ {
+ ++i;
+ }
+ }
+
+ // Split too long edges.
+ if (maxEdgeLen > 0 && (buildFlags & (RC_CONTOUR_TESS_WALL_EDGES|RC_CONTOUR_TESS_AREA_EDGES)) != 0)
+ {
+ for (int i = 0; i < simplified.size()/4; )
+ {
+ const int ii = (i+1) % (simplified.size()/4);
+
+ const int ax = simplified[i*4+0];
+ const int az = simplified[i*4+2];
+ const int ai = simplified[i*4+3];
+
+ const int bx = simplified[ii*4+0];
+ const int bz = simplified[ii*4+2];
+ const int bi = simplified[ii*4+3];
+
+ // Find maximum deviation from the segment.
+ int maxi = -1;
+ int ci = (ai+1) % pn;
+
+ // Tessellate only outer edges or edges between areas.
+ bool tess = false;
+ // Wall edges.
+ if ((buildFlags & RC_CONTOUR_TESS_WALL_EDGES) && (points[ci*4+3] & RC_CONTOUR_REG_MASK) == 0)
+ tess = true;
+ // Edges between areas.
+ if ((buildFlags & RC_CONTOUR_TESS_AREA_EDGES) && (points[ci*4+3] & RC_AREA_BORDER))
+ tess = true;
+
+ if (tess)
+ {
+ int dx = bx - ax;
+ int dz = bz - az;
+ if (dx*dx + dz*dz > maxEdgeLen*maxEdgeLen)
+ {
+ // Round based on the segments in lexilogical order so that the
+ // max tesselation is consistent regardles in which direction
+ // segments are traversed.
+ const int n = bi < ai ? (bi+pn - ai) : (bi - ai);
+ if (n > 1)
+ {
+ if (bx > ax || (bx == ax && bz > az))
+ maxi = (ai + n/2) % pn;
+ else
+ maxi = (ai + (n+1)/2) % pn;
+ }
+ }
+ }
+
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1)
+ {
+ // Add space for the new point.
+ simplified.resize(simplified.size()+4);
+ const int n = simplified.size()/4;
+ for (int j = n-1; j > i; --j)
+ {
+ simplified[j*4+0] = simplified[(j-1)*4+0];
+ simplified[j*4+1] = simplified[(j-1)*4+1];
+ simplified[j*4+2] = simplified[(j-1)*4+2];
+ simplified[j*4+3] = simplified[(j-1)*4+3];
+ }
+ // Add the point.
+ simplified[(i+1)*4+0] = points[maxi*4+0];
+ simplified[(i+1)*4+1] = points[maxi*4+1];
+ simplified[(i+1)*4+2] = points[maxi*4+2];
+ simplified[(i+1)*4+3] = maxi;
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ }
+
+ for (int i = 0; i < simplified.size()/4; ++i)
+ {
+ // The edge vertex flag is take from the current raw point,
+ // and the neighbour region is take from the next raw point.
+ const int ai = (simplified[i*4+3]+1) % pn;
+ const int bi = simplified[i*4+3];
+ simplified[i*4+3] = (points[ai*4+3] & (RC_CONTOUR_REG_MASK|RC_AREA_BORDER)) | (points[bi*4+3] & RC_BORDER_VERTEX);
+ }
+
+}
+
+static int calcAreaOfPolygon2D(const int* verts, const int nverts)
+{
+ int area = 0;
+ for (int i = 0, j = nverts-1; i < nverts; j=i++)
+ {
+ const int* vi = &verts[i*4];
+ const int* vj = &verts[j*4];
+ area += vi[0] * vj[2] - vj[0] * vi[2];
+ }
+ return (area+1) / 2;
+}
+
+// TODO: these are the same as in RecastMesh.cpp, consider using the same.
+// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).
+inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; }
+inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }
+
+inline int area2(const int* a, const int* b, const int* c)
+{
+ return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
+}
+
+// Exclusive or: true iff exactly one argument is true.
+// The arguments are negated to ensure that they are 0/1
+// values. Then the bitwise Xor operator may apply.
+// (This idea is due to Michael Baldwin.)
+inline bool xorb(bool x, bool y)
+{
+ return !x ^ !y;
+}
+
+// Returns true iff c is strictly to the left of the directed
+// line through a to b.
+inline bool left(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) < 0;
+}
+
+inline bool leftOn(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) <= 0;
+}
+
+inline bool collinear(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) == 0;
+}
+
+// Returns true iff ab properly intersects cd: they share
+// a point interior to both segments. The properness of the
+// intersection is ensured by using strict leftness.
+static bool intersectProp(const int* a, const int* b, const int* c, const int* d)
+{
+ // Eliminate improper cases.
+ if (collinear(a,b,c) || collinear(a,b,d) ||
+ collinear(c,d,a) || collinear(c,d,b))
+ return false;
+
+ return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b));
+}
+
+// Returns T iff (a,b,c) are collinear and point c lies
+// on the closed segement ab.
+static bool between(const int* a, const int* b, const int* c)
+{
+ if (!collinear(a, b, c))
+ return false;
+ // If ab not vertical, check betweenness on x; else on y.
+ if (a[0] != b[0])
+ return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0]));
+ else
+ return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2]));
+}
+
+// Returns true iff segments ab and cd intersect, properly or improperly.
+static bool intersect(const int* a, const int* b, const int* c, const int* d)
+{
+ if (intersectProp(a, b, c, d))
+ return true;
+ else if (between(a, b, c) || between(a, b, d) ||
+ between(c, d, a) || between(c, d, b))
+ return true;
+ else
+ return false;
+}
+
+static bool vequal(const int* a, const int* b)
+{
+ return a[0] == b[0] && a[2] == b[2];
+}
+
+static bool intersectSegCountour(const int* d0, const int* d1, int i, int n, const int* verts)
+{
+ // For each edge (k,k+1) of P
+ for (int k = 0; k < n; k++)
+ {
+ int k1 = next(k, n);
+ // Skip edges incident to i.
+ if (i == k || i == k1)
+ continue;
+ const int* p0 = &verts[k * 4];
+ const int* p1 = &verts[k1 * 4];
+ if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1))
+ continue;
+
+ if (intersect(d0, d1, p0, p1))
+ return true;
+ }
+ return false;
+}
+
+static bool inCone(int i, int n, const int* verts, const int* pj)
+{
+ const int* pi = &verts[i * 4];
+ const int* pi1 = &verts[next(i, n) * 4];
+ const int* pin1 = &verts[prev(i, n) * 4];
+
+ // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ].
+ if (leftOn(pin1, pi, pi1))
+ return left(pi, pj, pin1) && left(pj, pi, pi1);
+ // Assume (i-1,i,i+1) not collinear.
+ // else P[i] is reflex.
+ return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1));
+}
+
+
+static void removeDegenerateSegments(rcIntArray& simplified)
+{
+ // Remove adjacent vertices which are equal on xz-plane,
+ // or else the triangulator will get confused.
+ int npts = simplified.size()/4;
+ for (int i = 0; i < npts; ++i)
+ {
+ int ni = next(i, npts);
+
+ if (vequal(&simplified[i*4], &simplified[ni*4]))
+ {
+ // Degenerate segment, remove.
+ for (int j = i; j < simplified.size()/4-1; ++j)
+ {
+ simplified[j*4+0] = simplified[(j+1)*4+0];
+ simplified[j*4+1] = simplified[(j+1)*4+1];
+ simplified[j*4+2] = simplified[(j+1)*4+2];
+ simplified[j*4+3] = simplified[(j+1)*4+3];
+ }
+ simplified.resize(simplified.size()-4);
+ npts--;
+ }
+ }
+}
+
+
+static bool mergeContours(rcContour& ca, rcContour& cb, int ia, int ib)
+{
+ const int maxVerts = ca.nverts + cb.nverts + 2;
+ int* verts = (int*)rcAlloc(sizeof(int)*maxVerts*4, RC_ALLOC_PERM);
+ if (!verts)
+ return false;
+
+ int nv = 0;
+
+ // Copy contour A.
+ for (int i = 0; i <= ca.nverts; ++i)
+ {
+ int* dst = &verts[nv*4];
+ const int* src = &ca.verts[((ia+i)%ca.nverts)*4];
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = src[3];
+ nv++;
+ }
+
+ // Copy contour B
+ for (int i = 0; i <= cb.nverts; ++i)
+ {
+ int* dst = &verts[nv*4];
+ const int* src = &cb.verts[((ib+i)%cb.nverts)*4];
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = src[3];
+ nv++;
+ }
+
+ rcFree(ca.verts);
+ ca.verts = verts;
+ ca.nverts = nv;
+
+ rcFree(cb.verts);
+ cb.verts = 0;
+ cb.nverts = 0;
+
+ return true;
+}
+
+struct rcContourHole
+{
+ rcContour* contour;
+ int minx, minz, leftmost;
+};
+
+struct rcContourRegion
+{
+ rcContour* outline;
+ rcContourHole* holes;
+ int nholes;
+};
+
+struct rcPotentialDiagonal
+{
+ int vert;
+ int dist;
+};
+
+// Finds the lowest leftmost vertex of a contour.
+static void findLeftMostVertex(rcContour* contour, int* minx, int* minz, int* leftmost)
+{
+ *minx = contour->verts[0];
+ *minz = contour->verts[2];
+ *leftmost = 0;
+ for (int i = 1; i < contour->nverts; i++)
+ {
+ const int x = contour->verts[i*4+0];
+ const int z = contour->verts[i*4+2];
+ if (x < *minx || (x == *minx && z < *minz))
+ {
+ *minx = x;
+ *minz = z;
+ *leftmost = i;
+ }
+ }
+}
+
+static int compareHoles(const void* va, const void* vb)
+{
+ const rcContourHole* a = (const rcContourHole*)va;
+ const rcContourHole* b = (const rcContourHole*)vb;
+ if (a->minx == b->minx)
+ {
+ if (a->minz < b->minz)
+ return -1;
+ if (a->minz > b->minz)
+ return 1;
+ }
+ else
+ {
+ if (a->minx < b->minx)
+ return -1;
+ if (a->minx > b->minx)
+ return 1;
+ }
+ return 0;
+}
+
+
+static int compareDiagDist(const void* va, const void* vb)
+{
+ const rcPotentialDiagonal* a = (const rcPotentialDiagonal*)va;
+ const rcPotentialDiagonal* b = (const rcPotentialDiagonal*)vb;
+ if (a->dist < b->dist)
+ return -1;
+ if (a->dist > b->dist)
+ return 1;
+ return 0;
+}
+
+
+static void mergeRegionHoles(rcContext* ctx, rcContourRegion& region)
+{
+ // Sort holes from left to right.
+ for (int i = 0; i < region.nholes; i++)
+ findLeftMostVertex(region.holes[i].contour, &region.holes[i].minx, &region.holes[i].minz, &region.holes[i].leftmost);
+
+ qsort(region.holes, region.nholes, sizeof(rcContourHole), compareHoles);
+
+ int maxVerts = region.outline->nverts;
+ for (int i = 0; i < region.nholes; i++)
+ maxVerts += region.holes[i].contour->nverts;
+
+ rcScopedDelete<rcPotentialDiagonal> diags((rcPotentialDiagonal*)rcAlloc(sizeof(rcPotentialDiagonal)*maxVerts, RC_ALLOC_TEMP));
+ if (!diags)
+ {
+ ctx->log(RC_LOG_WARNING, "mergeRegionHoles: Failed to allocated diags %d.", maxVerts);
+ return;
+ }
+
+ rcContour* outline = region.outline;
+
+ // Merge holes into the outline one by one.
+ for (int i = 0; i < region.nholes; i++)
+ {
+ rcContour* hole = region.holes[i].contour;
+
+ int index = -1;
+ int bestVertex = region.holes[i].leftmost;
+ for (int iter = 0; iter < hole->nverts; iter++)
+ {
+ // Find potential diagonals.
+ // The 'best' vertex must be in the cone described by 3 cosequtive vertices of the outline.
+ // ..o j-1
+ // |
+ // | * best
+ // |
+ // j o-----o j+1
+ // :
+ int ndiags = 0;
+ const int* corner = &hole->verts[bestVertex*4];
+ for (int j = 0; j < outline->nverts; j++)
+ {
+ if (inCone(j, outline->nverts, outline->verts, corner))
+ {
+ int dx = outline->verts[j*4+0] - corner[0];
+ int dz = outline->verts[j*4+2] - corner[2];
+ diags[ndiags].vert = j;
+ diags[ndiags].dist = dx*dx + dz*dz;
+ ndiags++;
+ }
+ }
+ // Sort potential diagonals by distance, we want to make the connection as short as possible.
+ qsort(diags, ndiags, sizeof(rcPotentialDiagonal), compareDiagDist);
+
+ // Find a diagonal that is not intersecting the outline not the remaining holes.
+ index = -1;
+ for (int j = 0; j < ndiags; j++)
+ {
+ const int* pt = &outline->verts[diags[j].vert*4];
+ bool intersect = intersectSegCountour(pt, corner, diags[i].vert, outline->nverts, outline->verts);
+ for (int k = i; k < region.nholes && !intersect; k++)
+ intersect |= intersectSegCountour(pt, corner, -1, region.holes[k].contour->nverts, region.holes[k].contour->verts);
+ if (!intersect)
+ {
+ index = diags[j].vert;
+ break;
+ }
+ }
+ // If found non-intersecting diagonal, stop looking.
+ if (index != -1)
+ break;
+ // All the potential diagonals for the current vertex were intersecting, try next vertex.
+ bestVertex = (bestVertex + 1) % hole->nverts;
+ }
+
+ if (index == -1)
+ {
+ ctx->log(RC_LOG_WARNING, "mergeHoles: Failed to find merge points for %p and %p.", region.outline, hole);
+ continue;
+ }
+ if (!mergeContours(*region.outline, *hole, index, bestVertex))
+ {
+ ctx->log(RC_LOG_WARNING, "mergeHoles: Failed to merge contours %p and %p.", region.outline, hole);
+ continue;
+ }
+ }
+}
+
+
+/// @par
+///
+/// The raw contours will match the region outlines exactly. The @p maxError and @p maxEdgeLen
+/// parameters control how closely the simplified contours will match the raw contours.
+///
+/// Simplified contours are generated such that the vertices for portals between areas match up.
+/// (They are considered mandatory vertices.)
+///
+/// Setting @p maxEdgeLength to zero will disabled the edge length feature.
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcAllocContourSet, rcCompactHeightfield, rcContourSet, rcConfig
+bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf,
+ const float maxError, const int maxEdgeLen,
+ rcContourSet& cset, const int buildFlags)
+{
+ rcAssert(ctx);
+
+ const int w = chf.width;
+ const int h = chf.height;
+ const int borderSize = chf.borderSize;
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_CONTOURS);
+
+ rcVcopy(cset.bmin, chf.bmin);
+ rcVcopy(cset.bmax, chf.bmax);
+ if (borderSize > 0)
+ {
+ // If the heightfield was build with bordersize, remove the offset.
+ const float pad = borderSize*chf.cs;
+ cset.bmin[0] += pad;
+ cset.bmin[2] += pad;
+ cset.bmax[0] -= pad;
+ cset.bmax[2] -= pad;
+ }
+ cset.cs = chf.cs;
+ cset.ch = chf.ch;
+ cset.width = chf.width - chf.borderSize*2;
+ cset.height = chf.height - chf.borderSize*2;
+ cset.borderSize = chf.borderSize;
+ cset.maxError = maxError;
+
+ int maxContours = rcMax((int)chf.maxRegions, 8);
+ cset.conts = (rcContour*)rcAlloc(sizeof(rcContour)*maxContours, RC_ALLOC_PERM);
+ if (!cset.conts)
+ return false;
+ cset.nconts = 0;
+
+ rcScopedDelete<unsigned char> flags((unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP));
+ if (!flags)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'flags' (%d).", chf.spanCount);
+ return false;
+ }
+
+ ctx->startTimer(RC_TIMER_BUILD_CONTOURS_TRACE);
+
+ // Mark boundaries.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ unsigned char res = 0;
+ const rcCompactSpan& s = chf.spans[i];
+ if (!chf.spans[i].reg || (chf.spans[i].reg & RC_BORDER_REG))
+ {
+ flags[i] = 0;
+ continue;
+ }
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ r = chf.spans[ai].reg;
+ }
+ if (r == chf.spans[i].reg)
+ res |= (1 << dir);
+ }
+ flags[i] = res ^ 0xf; // Inverse, mark non connected edges.
+ }
+ }
+ }
+
+ ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_TRACE);
+
+ rcIntArray verts(256);
+ rcIntArray simplified(64);
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (flags[i] == 0 || flags[i] == 0xf)
+ {
+ flags[i] = 0;
+ continue;
+ }
+ const unsigned short reg = chf.spans[i].reg;
+ if (!reg || (reg & RC_BORDER_REG))
+ continue;
+ const unsigned char area = chf.areas[i];
+
+ verts.resize(0);
+ simplified.resize(0);
+
+ ctx->startTimer(RC_TIMER_BUILD_CONTOURS_TRACE);
+ walkContour(x, y, i, chf, flags, verts);
+ ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_TRACE);
+
+ ctx->startTimer(RC_TIMER_BUILD_CONTOURS_SIMPLIFY);
+ simplifyContour(verts, simplified, maxError, maxEdgeLen, buildFlags);
+ removeDegenerateSegments(simplified);
+ ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_SIMPLIFY);
+
+
+ // Store region->contour remap info.
+ // Create contour.
+ if (simplified.size()/4 >= 3)
+ {
+ if (cset.nconts >= maxContours)
+ {
+ // Allocate more contours.
+ // This happens when a region has holes.
+ const int oldMax = maxContours;
+ maxContours *= 2;
+ rcContour* newConts = (rcContour*)rcAlloc(sizeof(rcContour)*maxContours, RC_ALLOC_PERM);
+ for (int j = 0; j < cset.nconts; ++j)
+ {
+ newConts[j] = cset.conts[j];
+ // Reset source pointers to prevent data deletion.
+ cset.conts[j].verts = 0;
+ cset.conts[j].rverts = 0;
+ }
+ rcFree(cset.conts);
+ cset.conts = newConts;
+
+ ctx->log(RC_LOG_WARNING, "rcBuildContours: Expanding max contours from %d to %d.", oldMax, maxContours);
+ }
+
+ rcContour* cont = &cset.conts[cset.nconts++];
+
+ cont->nverts = simplified.size()/4;
+ cont->verts = (int*)rcAlloc(sizeof(int)*cont->nverts*4, RC_ALLOC_PERM);
+ if (!cont->verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'verts' (%d).", cont->nverts);
+ return false;
+ }
+ memcpy(cont->verts, &simplified[0], sizeof(int)*cont->nverts*4);
+ if (borderSize > 0)
+ {
+ // If the heightfield was build with bordersize, remove the offset.
+ for (int j = 0; j < cont->nverts; ++j)
+ {
+ int* v = &cont->verts[j*4];
+ v[0] -= borderSize;
+ v[2] -= borderSize;
+ }
+ }
+
+ cont->nrverts = verts.size()/4;
+ cont->rverts = (int*)rcAlloc(sizeof(int)*cont->nrverts*4, RC_ALLOC_PERM);
+ if (!cont->rverts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'rverts' (%d).", cont->nrverts);
+ return false;
+ }
+ memcpy(cont->rverts, &verts[0], sizeof(int)*cont->nrverts*4);
+ if (borderSize > 0)
+ {
+ // If the heightfield was build with bordersize, remove the offset.
+ for (int j = 0; j < cont->nrverts; ++j)
+ {
+ int* v = &cont->rverts[j*4];
+ v[0] -= borderSize;
+ v[2] -= borderSize;
+ }
+ }
+
+ cont->reg = reg;
+ cont->area = area;
+ }
+ }
+ }
+ }
+
+ // Merge holes if needed.
+ if (cset.nconts > 0)
+ {
+ // Calculate winding of all polygons.
+ rcScopedDelete<char> winding((char*)rcAlloc(sizeof(char)*cset.nconts, RC_ALLOC_TEMP));
+ if (!winding)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'hole' (%d).", cset.nconts);
+ return false;
+ }
+ int nholes = 0;
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+ // If the contour is wound backwards, it is a hole.
+ winding[i] = calcAreaOfPolygon2D(cont.verts, cont.nverts) < 0 ? -1 : 1;
+ if (winding[i] < 0)
+ nholes++;
+ }
+
+ if (nholes > 0)
+ {
+ // Collect outline contour and holes contours per region.
+ // We assume that there is one outline and multiple holes.
+ const int nregions = chf.maxRegions+1;
+ rcScopedDelete<rcContourRegion> regions((rcContourRegion*)rcAlloc(sizeof(rcContourRegion)*nregions, RC_ALLOC_TEMP));
+ if (!regions)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'regions' (%d).", nregions);
+ return false;
+ }
+ memset(regions, 0, sizeof(rcContourRegion)*nregions);
+
+ rcScopedDelete<rcContourHole> holes((rcContourHole*)rcAlloc(sizeof(rcContourHole)*cset.nconts, RC_ALLOC_TEMP));
+ if (!holes)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'holes' (%d).", cset.nconts);
+ return false;
+ }
+ memset(holes, 0, sizeof(rcContourHole)*cset.nconts);
+
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+ // Positively would contours are outlines, negative holes.
+ if (winding[i] > 0)
+ {
+ if (regions[cont.reg].outline)
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Multiple outlines for region %d.", cont.reg);
+ regions[cont.reg].outline = &cont;
+ }
+ else
+ {
+ regions[cont.reg].nholes++;
+ }
+ }
+ int index = 0;
+ for (int i = 0; i < nregions; i++)
+ {
+ if (regions[i].nholes > 0)
+ {
+ regions[i].holes = &holes[index];
+ index += regions[i].nholes;
+ regions[i].nholes = 0;
+ }
+ }
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+ rcContourRegion& reg = regions[cont.reg];
+ if (winding[i] < 0)
+ reg.holes[reg.nholes++].contour = &cont;
+ }
+
+ // Finally merge each regions holes into the outline.
+ for (int i = 0; i < nregions; i++)
+ {
+ rcContourRegion& reg = regions[i];
+ if (!reg.nholes) continue;
+
+ if (reg.outline)
+ {
+ mergeRegionHoles(ctx, reg);
+ }
+ else
+ {
+ // The region does not have an outline.
+ // This can happen if the contour becaomes selfoverlapping because of
+ // too aggressive simplification settings.
+ ctx->log(RC_LOG_ERROR, "rcBuildContours: Bad outline for region %d, contour simplification is likely too aggressive.", i);
+ }
+ }
+ }
+
+ }
+
+ return true;
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastFilter.cpp b/thirdparty/recastnavigation/Recast/Source/RecastFilter.cpp
new file mode 100644
index 0000000000..9d3e63c482
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastFilter.cpp
@@ -0,0 +1,202 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAssert.h"
+
+/// @par
+///
+/// Allows the formation of walkable regions that will flow over low lying
+/// objects such as curbs, and up structures such as stairways.
+///
+/// Two neighboring spans are walkable if: <tt>rcAbs(currentSpan.smax - neighborSpan.smax) < waklableClimb</tt>
+///
+/// @warning Will override the effect of #rcFilterLedgeSpans. So if both filters are used, call
+/// #rcFilterLedgeSpans after calling this filter.
+///
+/// @see rcHeightfield, rcConfig
+void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_FILTER_LOW_OBSTACLES);
+
+ const int w = solid.width;
+ const int h = solid.height;
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ rcSpan* ps = 0;
+ bool previousWalkable = false;
+ unsigned char previousArea = RC_NULL_AREA;
+
+ for (rcSpan* s = solid.spans[x + y*w]; s; ps = s, s = s->next)
+ {
+ const bool walkable = s->area != RC_NULL_AREA;
+ // If current span is not walkable, but there is walkable
+ // span just below it, mark the span above it walkable too.
+ if (!walkable && previousWalkable)
+ {
+ if (rcAbs((int)s->smax - (int)ps->smax) <= walkableClimb)
+ s->area = previousArea;
+ }
+ // Copy walkable flag so that it cannot propagate
+ // past multiple non-walkable objects.
+ previousWalkable = walkable;
+ previousArea = s->area;
+ }
+ }
+ }
+}
+
+/// @par
+///
+/// A ledge is a span with one or more neighbors whose maximum is further away than @p walkableClimb
+/// from the current span's maximum.
+/// This method removes the impact of the overestimation of conservative voxelization
+/// so the resulting mesh will not have regions hanging in the air over ledges.
+///
+/// A span is a ledge if: <tt>rcAbs(currentSpan.smax - neighborSpan.smax) > walkableClimb</tt>
+///
+/// @see rcHeightfield, rcConfig
+void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walkableClimb,
+ rcHeightfield& solid)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_FILTER_BORDER);
+
+ const int w = solid.width;
+ const int h = solid.height;
+ const int MAX_HEIGHT = 0xffff;
+
+ // Mark border spans.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next)
+ {
+ // Skip non walkable spans.
+ if (s->area == RC_NULL_AREA)
+ continue;
+
+ const int bot = (int)(s->smax);
+ const int top = s->next ? (int)(s->next->smin) : MAX_HEIGHT;
+
+ // Find neighbours minimum height.
+ int minh = MAX_HEIGHT;
+
+ // Min and max height of accessible neighbours.
+ int asmin = s->smax;
+ int asmax = s->smax;
+
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ int dx = x + rcGetDirOffsetX(dir);
+ int dy = y + rcGetDirOffsetY(dir);
+ // Skip neighbours which are out of bounds.
+ if (dx < 0 || dy < 0 || dx >= w || dy >= h)
+ {
+ minh = rcMin(minh, -walkableClimb - bot);
+ continue;
+ }
+
+ // From minus infinity to the first span.
+ rcSpan* ns = solid.spans[dx + dy*w];
+ int nbot = -walkableClimb;
+ int ntop = ns ? (int)ns->smin : MAX_HEIGHT;
+ // Skip neightbour if the gap between the spans is too small.
+ if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
+ minh = rcMin(minh, nbot - bot);
+
+ // Rest of the spans.
+ for (ns = solid.spans[dx + dy*w]; ns; ns = ns->next)
+ {
+ nbot = (int)ns->smax;
+ ntop = ns->next ? (int)ns->next->smin : MAX_HEIGHT;
+ // Skip neightbour if the gap between the spans is too small.
+ if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
+ {
+ minh = rcMin(minh, nbot - bot);
+
+ // Find min/max accessible neighbour height.
+ if (rcAbs(nbot - bot) <= walkableClimb)
+ {
+ if (nbot < asmin) asmin = nbot;
+ if (nbot > asmax) asmax = nbot;
+ }
+
+ }
+ }
+ }
+
+ // The current span is close to a ledge if the drop to any
+ // neighbour span is less than the walkableClimb.
+ if (minh < -walkableClimb)
+ {
+ s->area = RC_NULL_AREA;
+ }
+ // If the difference between all neighbours is too large,
+ // we are at steep slope, mark the span as ledge.
+ else if ((asmax - asmin) > walkableClimb)
+ {
+ s->area = RC_NULL_AREA;
+ }
+ }
+ }
+ }
+}
+
+/// @par
+///
+/// For this filter, the clearance above the span is the distance from the span's
+/// maximum to the next higher span's minimum. (Same grid column.)
+///
+/// @see rcHeightfield, rcConfig
+void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_FILTER_WALKABLE);
+
+ const int w = solid.width;
+ const int h = solid.height;
+ const int MAX_HEIGHT = 0xffff;
+
+ // Remove walkable flag from spans which do not have enough
+ // space above them for the agent to stand there.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next)
+ {
+ const int bot = (int)(s->smax);
+ const int top = s->next ? (int)(s->next->smin) : MAX_HEIGHT;
+ if ((top - bot) <= walkableHeight)
+ s->area = RC_NULL_AREA;
+ }
+ }
+ }
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastLayers.cpp b/thirdparty/recastnavigation/Recast/Source/RecastLayers.cpp
new file mode 100644
index 0000000000..acc97e44f0
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastLayers.cpp
@@ -0,0 +1,644 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+
+// Must be 255 or smaller (not 256) because layer IDs are stored as
+// a byte where 255 is a special value.
+static const int RC_MAX_LAYERS = 63;
+static const int RC_MAX_NEIS = 16;
+
+struct rcLayerRegion
+{
+ unsigned char layers[RC_MAX_LAYERS];
+ unsigned char neis[RC_MAX_NEIS];
+ unsigned short ymin, ymax;
+ unsigned char layerId; // Layer ID
+ unsigned char nlayers; // Layer count
+ unsigned char nneis; // Neighbour count
+ unsigned char base; // Flag indicating if the region is the base of merged regions.
+};
+
+
+static bool contains(const unsigned char* a, const unsigned char an, const unsigned char v)
+{
+ const int n = (int)an;
+ for (int i = 0; i < n; ++i)
+ {
+ if (a[i] == v)
+ return true;
+ }
+ return false;
+}
+
+static bool addUnique(unsigned char* a, unsigned char& an, int anMax, unsigned char v)
+{
+ if (contains(a, an, v))
+ return true;
+
+ if ((int)an >= anMax)
+ return false;
+
+ a[an] = v;
+ an++;
+ return true;
+}
+
+
+inline bool overlapRange(const unsigned short amin, const unsigned short amax,
+ const unsigned short bmin, const unsigned short bmax)
+{
+ return (amin > bmax || amax < bmin) ? false : true;
+}
+
+
+
+struct rcLayerSweepSpan
+{
+ unsigned short ns; // number samples
+ unsigned char id; // region id
+ unsigned char nei; // neighbour id
+};
+
+/// @par
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcAllocHeightfieldLayerSet, rcCompactHeightfield, rcHeightfieldLayerSet, rcConfig
+bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int walkableHeight,
+ rcHeightfieldLayerSet& lset)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_LAYERS);
+
+ const int w = chf.width;
+ const int h = chf.height;
+
+ rcScopedDelete<unsigned char> srcReg((unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP));
+ if (!srcReg)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'srcReg' (%d).", chf.spanCount);
+ return false;
+ }
+ memset(srcReg,0xff,sizeof(unsigned char)*chf.spanCount);
+
+ const int nsweeps = chf.width;
+ rcScopedDelete<rcLayerSweepSpan> sweeps((rcLayerSweepSpan*)rcAlloc(sizeof(rcLayerSweepSpan)*nsweeps, RC_ALLOC_TEMP));
+ if (!sweeps)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'sweeps' (%d).", nsweeps);
+ return false;
+ }
+
+
+ // Partition walkable area into monotone regions.
+ int prevCount[256];
+ unsigned char regId = 0;
+
+ for (int y = borderSize; y < h-borderSize; ++y)
+ {
+ memset(prevCount,0,sizeof(int)*regId);
+ unsigned char sweepId = 0;
+
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ if (chf.areas[i] == RC_NULL_AREA) continue;
+
+ unsigned char sid = 0xff;
+
+ // -x
+ if (rcGetCon(s, 0) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ if (chf.areas[ai] != RC_NULL_AREA && srcReg[ai] != 0xff)
+ sid = srcReg[ai];
+ }
+
+ if (sid == 0xff)
+ {
+ sid = sweepId++;
+ sweeps[sid].nei = 0xff;
+ sweeps[sid].ns = 0;
+ }
+
+ // -y
+ if (rcGetCon(s,3) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ const unsigned char nr = srcReg[ai];
+ if (nr != 0xff)
+ {
+ // Set neighbour when first valid neighbour is encoutered.
+ if (sweeps[sid].ns == 0)
+ sweeps[sid].nei = nr;
+
+ if (sweeps[sid].nei == nr)
+ {
+ // Update existing neighbour
+ sweeps[sid].ns++;
+ prevCount[nr]++;
+ }
+ else
+ {
+ // This is hit if there is nore than one neighbour.
+ // Invalidate the neighbour.
+ sweeps[sid].nei = 0xff;
+ }
+ }
+ }
+
+ srcReg[i] = sid;
+ }
+ }
+
+ // Create unique ID.
+ for (int i = 0; i < sweepId; ++i)
+ {
+ // If the neighbour is set and there is only one continuous connection to it,
+ // the sweep will be merged with the previous one, else new region is created.
+ if (sweeps[i].nei != 0xff && prevCount[sweeps[i].nei] == (int)sweeps[i].ns)
+ {
+ sweeps[i].id = sweeps[i].nei;
+ }
+ else
+ {
+ if (regId == 255)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Region ID overflow.");
+ return false;
+ }
+ sweeps[i].id = regId++;
+ }
+ }
+
+ // Remap local sweep ids to region ids.
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (srcReg[i] != 0xff)
+ srcReg[i] = sweeps[srcReg[i]].id;
+ }
+ }
+ }
+
+ // Allocate and init layer regions.
+ const int nregs = (int)regId;
+ rcScopedDelete<rcLayerRegion> regs((rcLayerRegion*)rcAlloc(sizeof(rcLayerRegion)*nregs, RC_ALLOC_TEMP));
+ if (!regs)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'regs' (%d).", nregs);
+ return false;
+ }
+ memset(regs, 0, sizeof(rcLayerRegion)*nregs);
+ for (int i = 0; i < nregs; ++i)
+ {
+ regs[i].layerId = 0xff;
+ regs[i].ymin = 0xffff;
+ regs[i].ymax = 0;
+ }
+
+ // Find region neighbours and overlapping regions.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ unsigned char lregs[RC_MAX_LAYERS];
+ int nlregs = 0;
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ const unsigned char ri = srcReg[i];
+ if (ri == 0xff) continue;
+
+ regs[ri].ymin = rcMin(regs[ri].ymin, s.y);
+ regs[ri].ymax = rcMax(regs[ri].ymax, s.y);
+
+ // Collect all region layers.
+ if (nlregs < RC_MAX_LAYERS)
+ lregs[nlregs++] = ri;
+
+ // Update neighbours
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ const unsigned char rai = srcReg[ai];
+ if (rai != 0xff && rai != ri)
+ {
+ // Don't check return value -- if we cannot add the neighbor
+ // it will just cause a few more regions to be created, which
+ // is fine.
+ addUnique(regs[ri].neis, regs[ri].nneis, RC_MAX_NEIS, rai);
+ }
+ }
+ }
+
+ }
+
+ // Update overlapping regions.
+ for (int i = 0; i < nlregs-1; ++i)
+ {
+ for (int j = i+1; j < nlregs; ++j)
+ {
+ if (lregs[i] != lregs[j])
+ {
+ rcLayerRegion& ri = regs[lregs[i]];
+ rcLayerRegion& rj = regs[lregs[j]];
+
+ if (!addUnique(ri.layers, ri.nlayers, RC_MAX_LAYERS, lregs[j]) ||
+ !addUnique(rj.layers, rj.nlayers, RC_MAX_LAYERS, lregs[i]))
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS.");
+ return false;
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ // Create 2D layers from regions.
+ unsigned char layerId = 0;
+
+ static const int MAX_STACK = 64;
+ unsigned char stack[MAX_STACK];
+ int nstack = 0;
+
+ for (int i = 0; i < nregs; ++i)
+ {
+ rcLayerRegion& root = regs[i];
+ // Skip already visited.
+ if (root.layerId != 0xff)
+ continue;
+
+ // Start search.
+ root.layerId = layerId;
+ root.base = 1;
+
+ nstack = 0;
+ stack[nstack++] = (unsigned char)i;
+
+ while (nstack)
+ {
+ // Pop front
+ rcLayerRegion& reg = regs[stack[0]];
+ nstack--;
+ for (int j = 0; j < nstack; ++j)
+ stack[j] = stack[j+1];
+
+ const int nneis = (int)reg.nneis;
+ for (int j = 0; j < nneis; ++j)
+ {
+ const unsigned char nei = reg.neis[j];
+ rcLayerRegion& regn = regs[nei];
+ // Skip already visited.
+ if (regn.layerId != 0xff)
+ continue;
+ // Skip if the neighbour is overlapping root region.
+ if (contains(root.layers, root.nlayers, nei))
+ continue;
+ // Skip if the height range would become too large.
+ const int ymin = rcMin(root.ymin, regn.ymin);
+ const int ymax = rcMax(root.ymax, regn.ymax);
+ if ((ymax - ymin) >= 255)
+ continue;
+
+ if (nstack < MAX_STACK)
+ {
+ // Deepen
+ stack[nstack++] = (unsigned char)nei;
+
+ // Mark layer id
+ regn.layerId = layerId;
+ // Merge current layers to root.
+ for (int k = 0; k < regn.nlayers; ++k)
+ {
+ if (!addUnique(root.layers, root.nlayers, RC_MAX_LAYERS, regn.layers[k]))
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS.");
+ return false;
+ }
+ }
+ root.ymin = rcMin(root.ymin, regn.ymin);
+ root.ymax = rcMax(root.ymax, regn.ymax);
+ }
+ }
+ }
+
+ layerId++;
+ }
+
+ // Merge non-overlapping regions that are close in height.
+ const unsigned short mergeHeight = (unsigned short)walkableHeight * 4;
+
+ for (int i = 0; i < nregs; ++i)
+ {
+ rcLayerRegion& ri = regs[i];
+ if (!ri.base) continue;
+
+ unsigned char newId = ri.layerId;
+
+ for (;;)
+ {
+ unsigned char oldId = 0xff;
+
+ for (int j = 0; j < nregs; ++j)
+ {
+ if (i == j) continue;
+ rcLayerRegion& rj = regs[j];
+ if (!rj.base) continue;
+
+ // Skip if the regions are not close to each other.
+ if (!overlapRange(ri.ymin,ri.ymax+mergeHeight, rj.ymin,rj.ymax+mergeHeight))
+ continue;
+ // Skip if the height range would become too large.
+ const int ymin = rcMin(ri.ymin, rj.ymin);
+ const int ymax = rcMax(ri.ymax, rj.ymax);
+ if ((ymax - ymin) >= 255)
+ continue;
+
+ // Make sure that there is no overlap when merging 'ri' and 'rj'.
+ bool overlap = false;
+ // Iterate over all regions which have the same layerId as 'rj'
+ for (int k = 0; k < nregs; ++k)
+ {
+ if (regs[k].layerId != rj.layerId)
+ continue;
+ // Check if region 'k' is overlapping region 'ri'
+ // Index to 'regs' is the same as region id.
+ if (contains(ri.layers,ri.nlayers, (unsigned char)k))
+ {
+ overlap = true;
+ break;
+ }
+ }
+ // Cannot merge of regions overlap.
+ if (overlap)
+ continue;
+
+ // Can merge i and j.
+ oldId = rj.layerId;
+ break;
+ }
+
+ // Could not find anything to merge with, stop.
+ if (oldId == 0xff)
+ break;
+
+ // Merge
+ for (int j = 0; j < nregs; ++j)
+ {
+ rcLayerRegion& rj = regs[j];
+ if (rj.layerId == oldId)
+ {
+ rj.base = 0;
+ // Remap layerIds.
+ rj.layerId = newId;
+ // Add overlaid layers from 'rj' to 'ri'.
+ for (int k = 0; k < rj.nlayers; ++k)
+ {
+ if (!addUnique(ri.layers, ri.nlayers, RC_MAX_LAYERS, rj.layers[k]))
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS.");
+ return false;
+ }
+ }
+
+ // Update height bounds.
+ ri.ymin = rcMin(ri.ymin, rj.ymin);
+ ri.ymax = rcMax(ri.ymax, rj.ymax);
+ }
+ }
+ }
+ }
+
+ // Compact layerIds
+ unsigned char remap[256];
+ memset(remap, 0, 256);
+
+ // Find number of unique layers.
+ layerId = 0;
+ for (int i = 0; i < nregs; ++i)
+ remap[regs[i].layerId] = 1;
+ for (int i = 0; i < 256; ++i)
+ {
+ if (remap[i])
+ remap[i] = layerId++;
+ else
+ remap[i] = 0xff;
+ }
+ // Remap ids.
+ for (int i = 0; i < nregs; ++i)
+ regs[i].layerId = remap[regs[i].layerId];
+
+ // No layers, return empty.
+ if (layerId == 0)
+ return true;
+
+ // Create layers.
+ rcAssert(lset.layers == 0);
+
+ const int lw = w - borderSize*2;
+ const int lh = h - borderSize*2;
+
+ // Build contracted bbox for layers.
+ float bmin[3], bmax[3];
+ rcVcopy(bmin, chf.bmin);
+ rcVcopy(bmax, chf.bmax);
+ bmin[0] += borderSize*chf.cs;
+ bmin[2] += borderSize*chf.cs;
+ bmax[0] -= borderSize*chf.cs;
+ bmax[2] -= borderSize*chf.cs;
+
+ lset.nlayers = (int)layerId;
+
+ lset.layers = (rcHeightfieldLayer*)rcAlloc(sizeof(rcHeightfieldLayer)*lset.nlayers, RC_ALLOC_PERM);
+ if (!lset.layers)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'layers' (%d).", lset.nlayers);
+ return false;
+ }
+ memset(lset.layers, 0, sizeof(rcHeightfieldLayer)*lset.nlayers);
+
+
+ // Store layers.
+ for (int i = 0; i < lset.nlayers; ++i)
+ {
+ unsigned char curId = (unsigned char)i;
+
+ rcHeightfieldLayer* layer = &lset.layers[i];
+
+ const int gridSize = sizeof(unsigned char)*lw*lh;
+
+ layer->heights = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM);
+ if (!layer->heights)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'heights' (%d).", gridSize);
+ return false;
+ }
+ memset(layer->heights, 0xff, gridSize);
+
+ layer->areas = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM);
+ if (!layer->areas)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'areas' (%d).", gridSize);
+ return false;
+ }
+ memset(layer->areas, 0, gridSize);
+
+ layer->cons = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM);
+ if (!layer->cons)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'cons' (%d).", gridSize);
+ return false;
+ }
+ memset(layer->cons, 0, gridSize);
+
+ // Find layer height bounds.
+ int hmin = 0, hmax = 0;
+ for (int j = 0; j < nregs; ++j)
+ {
+ if (regs[j].base && regs[j].layerId == curId)
+ {
+ hmin = (int)regs[j].ymin;
+ hmax = (int)regs[j].ymax;
+ }
+ }
+
+ layer->width = lw;
+ layer->height = lh;
+ layer->cs = chf.cs;
+ layer->ch = chf.ch;
+
+ // Adjust the bbox to fit the heightfield.
+ rcVcopy(layer->bmin, bmin);
+ rcVcopy(layer->bmax, bmax);
+ layer->bmin[1] = bmin[1] + hmin*chf.ch;
+ layer->bmax[1] = bmin[1] + hmax*chf.ch;
+ layer->hmin = hmin;
+ layer->hmax = hmax;
+
+ // Update usable data region.
+ layer->minx = layer->width;
+ layer->maxx = 0;
+ layer->miny = layer->height;
+ layer->maxy = 0;
+
+ // Copy height and area from compact heightfield.
+ for (int y = 0; y < lh; ++y)
+ {
+ for (int x = 0; x < lw; ++x)
+ {
+ const int cx = borderSize+x;
+ const int cy = borderSize+y;
+ const rcCompactCell& c = chf.cells[cx+cy*w];
+ for (int j = (int)c.index, nj = (int)(c.index+c.count); j < nj; ++j)
+ {
+ const rcCompactSpan& s = chf.spans[j];
+ // Skip unassigned regions.
+ if (srcReg[j] == 0xff)
+ continue;
+ // Skip of does nto belong to current layer.
+ unsigned char lid = regs[srcReg[j]].layerId;
+ if (lid != curId)
+ continue;
+
+ // Update data bounds.
+ layer->minx = rcMin(layer->minx, x);
+ layer->maxx = rcMax(layer->maxx, x);
+ layer->miny = rcMin(layer->miny, y);
+ layer->maxy = rcMax(layer->maxy, y);
+
+ // Store height and area type.
+ const int idx = x+y*lw;
+ layer->heights[idx] = (unsigned char)(s.y - hmin);
+ layer->areas[idx] = chf.areas[j];
+
+ // Check connection.
+ unsigned char portal = 0;
+ unsigned char con = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ unsigned char alid = srcReg[ai] != 0xff ? regs[srcReg[ai]].layerId : 0xff;
+ // Portal mask
+ if (chf.areas[ai] != RC_NULL_AREA && lid != alid)
+ {
+ portal |= (unsigned char)(1<<dir);
+ // Update height so that it matches on both sides of the portal.
+ const rcCompactSpan& as = chf.spans[ai];
+ if (as.y > hmin)
+ layer->heights[idx] = rcMax(layer->heights[idx], (unsigned char)(as.y - hmin));
+ }
+ // Valid connection mask
+ if (chf.areas[ai] != RC_NULL_AREA && lid == alid)
+ {
+ const int nx = ax - borderSize;
+ const int ny = ay - borderSize;
+ if (nx >= 0 && ny >= 0 && nx < lw && ny < lh)
+ con |= (unsigned char)(1<<dir);
+ }
+ }
+ }
+
+ layer->cons[idx] = (portal << 4) | con;
+ }
+ }
+ }
+
+ if (layer->minx > layer->maxx)
+ layer->minx = layer->maxx = 0;
+ if (layer->miny > layer->maxy)
+ layer->miny = layer->maxy = 0;
+ }
+
+ return true;
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastMesh.cpp b/thirdparty/recastnavigation/Recast/Source/RecastMesh.cpp
new file mode 100644
index 0000000000..e99eaebb79
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastMesh.cpp
@@ -0,0 +1,1552 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+struct rcEdge
+{
+ unsigned short vert[2];
+ unsigned short polyEdge[2];
+ unsigned short poly[2];
+};
+
+static bool buildMeshAdjacency(unsigned short* polys, const int npolys,
+ const int nverts, const int vertsPerPoly)
+{
+ // Based on code by Eric Lengyel from:
+ // http://www.terathon.com/code/edges.php
+
+ int maxEdgeCount = npolys*vertsPerPoly;
+ unsigned short* firstEdge = (unsigned short*)rcAlloc(sizeof(unsigned short)*(nverts + maxEdgeCount), RC_ALLOC_TEMP);
+ if (!firstEdge)
+ return false;
+ unsigned short* nextEdge = firstEdge + nverts;
+ int edgeCount = 0;
+
+ rcEdge* edges = (rcEdge*)rcAlloc(sizeof(rcEdge)*maxEdgeCount, RC_ALLOC_TEMP);
+ if (!edges)
+ {
+ rcFree(firstEdge);
+ return false;
+ }
+
+ for (int i = 0; i < nverts; i++)
+ firstEdge[i] = RC_MESH_NULL_IDX;
+
+ for (int i = 0; i < npolys; ++i)
+ {
+ unsigned short* t = &polys[i*vertsPerPoly*2];
+ for (int j = 0; j < vertsPerPoly; ++j)
+ {
+ if (t[j] == RC_MESH_NULL_IDX) break;
+ unsigned short v0 = t[j];
+ unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1];
+ if (v0 < v1)
+ {
+ rcEdge& edge = edges[edgeCount];
+ edge.vert[0] = v0;
+ edge.vert[1] = v1;
+ edge.poly[0] = (unsigned short)i;
+ edge.polyEdge[0] = (unsigned short)j;
+ edge.poly[1] = (unsigned short)i;
+ edge.polyEdge[1] = 0;
+ // Insert edge
+ nextEdge[edgeCount] = firstEdge[v0];
+ firstEdge[v0] = (unsigned short)edgeCount;
+ edgeCount++;
+ }
+ }
+ }
+
+ for (int i = 0; i < npolys; ++i)
+ {
+ unsigned short* t = &polys[i*vertsPerPoly*2];
+ for (int j = 0; j < vertsPerPoly; ++j)
+ {
+ if (t[j] == RC_MESH_NULL_IDX) break;
+ unsigned short v0 = t[j];
+ unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1];
+ if (v0 > v1)
+ {
+ for (unsigned short e = firstEdge[v1]; e != RC_MESH_NULL_IDX; e = nextEdge[e])
+ {
+ rcEdge& edge = edges[e];
+ if (edge.vert[1] == v0 && edge.poly[0] == edge.poly[1])
+ {
+ edge.poly[1] = (unsigned short)i;
+ edge.polyEdge[1] = (unsigned short)j;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Store adjacency
+ for (int i = 0; i < edgeCount; ++i)
+ {
+ const rcEdge& e = edges[i];
+ if (e.poly[0] != e.poly[1])
+ {
+ unsigned short* p0 = &polys[e.poly[0]*vertsPerPoly*2];
+ unsigned short* p1 = &polys[e.poly[1]*vertsPerPoly*2];
+ p0[vertsPerPoly + e.polyEdge[0]] = e.poly[1];
+ p1[vertsPerPoly + e.polyEdge[1]] = e.poly[0];
+ }
+ }
+
+ rcFree(firstEdge);
+ rcFree(edges);
+
+ return true;
+}
+
+
+static const int VERTEX_BUCKET_COUNT = (1<<12);
+
+inline int computeVertexHash(int x, int y, int z)
+{
+ const unsigned int h1 = 0x8da6b343; // Large multiplicative constants;
+ const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes
+ const unsigned int h3 = 0xcb1ab31f;
+ unsigned int n = h1 * x + h2 * y + h3 * z;
+ return (int)(n & (VERTEX_BUCKET_COUNT-1));
+}
+
+static unsigned short addVertex(unsigned short x, unsigned short y, unsigned short z,
+ unsigned short* verts, int* firstVert, int* nextVert, int& nv)
+{
+ int bucket = computeVertexHash(x, 0, z);
+ int i = firstVert[bucket];
+
+ while (i != -1)
+ {
+ const unsigned short* v = &verts[i*3];
+ if (v[0] == x && (rcAbs(v[1] - y) <= 2) && v[2] == z)
+ return (unsigned short)i;
+ i = nextVert[i]; // next
+ }
+
+ // Could not find, create new.
+ i = nv; nv++;
+ unsigned short* v = &verts[i*3];
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ nextVert[i] = firstVert[bucket];
+ firstVert[bucket] = i;
+
+ return (unsigned short)i;
+}
+
+// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).
+inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; }
+inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }
+
+inline int area2(const int* a, const int* b, const int* c)
+{
+ return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
+}
+
+// Exclusive or: true iff exactly one argument is true.
+// The arguments are negated to ensure that they are 0/1
+// values. Then the bitwise Xor operator may apply.
+// (This idea is due to Michael Baldwin.)
+inline bool xorb(bool x, bool y)
+{
+ return !x ^ !y;
+}
+
+// Returns true iff c is strictly to the left of the directed
+// line through a to b.
+inline bool left(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) < 0;
+}
+
+inline bool leftOn(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) <= 0;
+}
+
+inline bool collinear(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) == 0;
+}
+
+// Returns true iff ab properly intersects cd: they share
+// a point interior to both segments. The properness of the
+// intersection is ensured by using strict leftness.
+static bool intersectProp(const int* a, const int* b, const int* c, const int* d)
+{
+ // Eliminate improper cases.
+ if (collinear(a,b,c) || collinear(a,b,d) ||
+ collinear(c,d,a) || collinear(c,d,b))
+ return false;
+
+ return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b));
+}
+
+// Returns T iff (a,b,c) are collinear and point c lies
+// on the closed segement ab.
+static bool between(const int* a, const int* b, const int* c)
+{
+ if (!collinear(a, b, c))
+ return false;
+ // If ab not vertical, check betweenness on x; else on y.
+ if (a[0] != b[0])
+ return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0]));
+ else
+ return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2]));
+}
+
+// Returns true iff segments ab and cd intersect, properly or improperly.
+static bool intersect(const int* a, const int* b, const int* c, const int* d)
+{
+ if (intersectProp(a, b, c, d))
+ return true;
+ else if (between(a, b, c) || between(a, b, d) ||
+ between(c, d, a) || between(c, d, b))
+ return true;
+ else
+ return false;
+}
+
+static bool vequal(const int* a, const int* b)
+{
+ return a[0] == b[0] && a[2] == b[2];
+}
+
+// Returns T iff (v_i, v_j) is a proper internal *or* external
+// diagonal of P, *ignoring edges incident to v_i and v_j*.
+static bool diagonalie(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4];
+
+ // For each edge (k,k+1) of P
+ for (int k = 0; k < n; k++)
+ {
+ int k1 = next(k, n);
+ // Skip edges incident to i or j
+ if (!((k == i) || (k1 == i) || (k == j) || (k1 == j)))
+ {
+ const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4];
+ const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4];
+
+ if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1))
+ continue;
+
+ if (intersect(d0, d1, p0, p1))
+ return false;
+ }
+ }
+ return true;
+}
+
+// Returns true iff the diagonal (i,j) is strictly internal to the
+// polygon P in the neighborhood of the i endpoint.
+static bool inCone(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* pi = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* pj = &verts[(indices[j] & 0x0fffffff) * 4];
+ const int* pi1 = &verts[(indices[next(i, n)] & 0x0fffffff) * 4];
+ const int* pin1 = &verts[(indices[prev(i, n)] & 0x0fffffff) * 4];
+
+ // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ].
+ if (leftOn(pin1, pi, pi1))
+ return left(pi, pj, pin1) && left(pj, pi, pi1);
+ // Assume (i-1,i,i+1) not collinear.
+ // else P[i] is reflex.
+ return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1));
+}
+
+// Returns T iff (v_i, v_j) is a proper internal
+// diagonal of P.
+static bool diagonal(int i, int j, int n, const int* verts, int* indices)
+{
+ return inCone(i, j, n, verts, indices) && diagonalie(i, j, n, verts, indices);
+}
+
+
+static bool diagonalieLoose(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4];
+
+ // For each edge (k,k+1) of P
+ for (int k = 0; k < n; k++)
+ {
+ int k1 = next(k, n);
+ // Skip edges incident to i or j
+ if (!((k == i) || (k1 == i) || (k == j) || (k1 == j)))
+ {
+ const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4];
+ const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4];
+
+ if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1))
+ continue;
+
+ if (intersectProp(d0, d1, p0, p1))
+ return false;
+ }
+ }
+ return true;
+}
+
+static bool inConeLoose(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* pi = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* pj = &verts[(indices[j] & 0x0fffffff) * 4];
+ const int* pi1 = &verts[(indices[next(i, n)] & 0x0fffffff) * 4];
+ const int* pin1 = &verts[(indices[prev(i, n)] & 0x0fffffff) * 4];
+
+ // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ].
+ if (leftOn(pin1, pi, pi1))
+ return leftOn(pi, pj, pin1) && leftOn(pj, pi, pi1);
+ // Assume (i-1,i,i+1) not collinear.
+ // else P[i] is reflex.
+ return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1));
+}
+
+static bool diagonalLoose(int i, int j, int n, const int* verts, int* indices)
+{
+ return inConeLoose(i, j, n, verts, indices) && diagonalieLoose(i, j, n, verts, indices);
+}
+
+
+static int triangulate(int n, const int* verts, int* indices, int* tris)
+{
+ int ntris = 0;
+ int* dst = tris;
+
+ // The last bit of the index is used to indicate if the vertex can be removed.
+ for (int i = 0; i < n; i++)
+ {
+ int i1 = next(i, n);
+ int i2 = next(i1, n);
+ if (diagonal(i, i2, n, verts, indices))
+ indices[i1] |= 0x80000000;
+ }
+
+ while (n > 3)
+ {
+ int minLen = -1;
+ int mini = -1;
+ for (int i = 0; i < n; i++)
+ {
+ int i1 = next(i, n);
+ if (indices[i1] & 0x80000000)
+ {
+ const int* p0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* p2 = &verts[(indices[next(i1, n)] & 0x0fffffff) * 4];
+
+ int dx = p2[0] - p0[0];
+ int dy = p2[2] - p0[2];
+ int len = dx*dx + dy*dy;
+
+ if (minLen < 0 || len < minLen)
+ {
+ minLen = len;
+ mini = i;
+ }
+ }
+ }
+
+ if (mini == -1)
+ {
+ // We might get here because the contour has overlapping segments, like this:
+ //
+ // A o-o=====o---o B
+ // / |C D| \.
+ // o o o o
+ // : : : :
+ // We'll try to recover by loosing up the inCone test a bit so that a diagonal
+ // like A-B or C-D can be found and we can continue.
+ minLen = -1;
+ mini = -1;
+ for (int i = 0; i < n; i++)
+ {
+ int i1 = next(i, n);
+ int i2 = next(i1, n);
+ if (diagonalLoose(i, i2, n, verts, indices))
+ {
+ const int* p0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* p2 = &verts[(indices[next(i2, n)] & 0x0fffffff) * 4];
+ int dx = p2[0] - p0[0];
+ int dy = p2[2] - p0[2];
+ int len = dx*dx + dy*dy;
+
+ if (minLen < 0 || len < minLen)
+ {
+ minLen = len;
+ mini = i;
+ }
+ }
+ }
+ if (mini == -1)
+ {
+ // The contour is messed up. This sometimes happens
+ // if the contour simplification is too aggressive.
+ return -ntris;
+ }
+ }
+
+ int i = mini;
+ int i1 = next(i, n);
+ int i2 = next(i1, n);
+
+ *dst++ = indices[i] & 0x0fffffff;
+ *dst++ = indices[i1] & 0x0fffffff;
+ *dst++ = indices[i2] & 0x0fffffff;
+ ntris++;
+
+ // Removes P[i1] by copying P[i+1]...P[n-1] left one index.
+ n--;
+ for (int k = i1; k < n; k++)
+ indices[k] = indices[k+1];
+
+ if (i1 >= n) i1 = 0;
+ i = prev(i1,n);
+ // Update diagonal flags.
+ if (diagonal(prev(i, n), i1, n, verts, indices))
+ indices[i] |= 0x80000000;
+ else
+ indices[i] &= 0x0fffffff;
+
+ if (diagonal(i, next(i1, n), n, verts, indices))
+ indices[i1] |= 0x80000000;
+ else
+ indices[i1] &= 0x0fffffff;
+ }
+
+ // Append the remaining triangle.
+ *dst++ = indices[0] & 0x0fffffff;
+ *dst++ = indices[1] & 0x0fffffff;
+ *dst++ = indices[2] & 0x0fffffff;
+ ntris++;
+
+ return ntris;
+}
+
+static int countPolyVerts(const unsigned short* p, const int nvp)
+{
+ for (int i = 0; i < nvp; ++i)
+ if (p[i] == RC_MESH_NULL_IDX)
+ return i;
+ return nvp;
+}
+
+inline bool uleft(const unsigned short* a, const unsigned short* b, const unsigned short* c)
+{
+ return ((int)b[0] - (int)a[0]) * ((int)c[2] - (int)a[2]) -
+ ((int)c[0] - (int)a[0]) * ((int)b[2] - (int)a[2]) < 0;
+}
+
+static int getPolyMergeValue(unsigned short* pa, unsigned short* pb,
+ const unsigned short* verts, int& ea, int& eb,
+ const int nvp)
+{
+ const int na = countPolyVerts(pa, nvp);
+ const int nb = countPolyVerts(pb, nvp);
+
+ // If the merged polygon would be too big, do not merge.
+ if (na+nb-2 > nvp)
+ return -1;
+
+ // Check if the polygons share an edge.
+ ea = -1;
+ eb = -1;
+
+ for (int i = 0; i < na; ++i)
+ {
+ unsigned short va0 = pa[i];
+ unsigned short va1 = pa[(i+1) % na];
+ if (va0 > va1)
+ rcSwap(va0, va1);
+ for (int j = 0; j < nb; ++j)
+ {
+ unsigned short vb0 = pb[j];
+ unsigned short vb1 = pb[(j+1) % nb];
+ if (vb0 > vb1)
+ rcSwap(vb0, vb1);
+ if (va0 == vb0 && va1 == vb1)
+ {
+ ea = i;
+ eb = j;
+ break;
+ }
+ }
+ }
+
+ // No common edge, cannot merge.
+ if (ea == -1 || eb == -1)
+ return -1;
+
+ // Check to see if the merged polygon would be convex.
+ unsigned short va, vb, vc;
+
+ va = pa[(ea+na-1) % na];
+ vb = pa[ea];
+ vc = pb[(eb+2) % nb];
+ if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3]))
+ return -1;
+
+ va = pb[(eb+nb-1) % nb];
+ vb = pb[eb];
+ vc = pa[(ea+2) % na];
+ if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3]))
+ return -1;
+
+ va = pa[ea];
+ vb = pa[(ea+1)%na];
+
+ int dx = (int)verts[va*3+0] - (int)verts[vb*3+0];
+ int dy = (int)verts[va*3+2] - (int)verts[vb*3+2];
+
+ return dx*dx + dy*dy;
+}
+
+static void mergePolyVerts(unsigned short* pa, unsigned short* pb, int ea, int eb,
+ unsigned short* tmp, const int nvp)
+{
+ const int na = countPolyVerts(pa, nvp);
+ const int nb = countPolyVerts(pb, nvp);
+
+ // Merge polygons.
+ memset(tmp, 0xff, sizeof(unsigned short)*nvp);
+ int n = 0;
+ // Add pa
+ for (int i = 0; i < na-1; ++i)
+ tmp[n++] = pa[(ea+1+i) % na];
+ // Add pb
+ for (int i = 0; i < nb-1; ++i)
+ tmp[n++] = pb[(eb+1+i) % nb];
+
+ memcpy(pa, tmp, sizeof(unsigned short)*nvp);
+}
+
+
+static void pushFront(int v, int* arr, int& an)
+{
+ an++;
+ for (int i = an-1; i > 0; --i) arr[i] = arr[i-1];
+ arr[0] = v;
+}
+
+static void pushBack(int v, int* arr, int& an)
+{
+ arr[an] = v;
+ an++;
+}
+
+static bool canRemoveVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem)
+{
+ const int nvp = mesh.nvp;
+
+ // Count number of polygons to remove.
+ int numRemovedVerts = 0;
+ int numTouchedVerts = 0;
+ int numRemainingEdges = 0;
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ int numRemoved = 0;
+ int numVerts = 0;
+ for (int j = 0; j < nv; ++j)
+ {
+ if (p[j] == rem)
+ {
+ numTouchedVerts++;
+ numRemoved++;
+ }
+ numVerts++;
+ }
+ if (numRemoved)
+ {
+ numRemovedVerts += numRemoved;
+ numRemainingEdges += numVerts-(numRemoved+1);
+ }
+ }
+
+ // There would be too few edges remaining to create a polygon.
+ // This can happen for example when a tip of a triangle is marked
+ // as deletion, but there are no other polys that share the vertex.
+ // In this case, the vertex should not be removed.
+ if (numRemainingEdges <= 2)
+ return false;
+
+ // Find edges which share the removed vertex.
+ const int maxEdges = numTouchedVerts*2;
+ int nedges = 0;
+ rcScopedDelete<int> edges((int*)rcAlloc(sizeof(int)*maxEdges*3, RC_ALLOC_TEMP));
+ if (!edges)
+ {
+ ctx->log(RC_LOG_WARNING, "canRemoveVertex: Out of memory 'edges' (%d).", maxEdges*3);
+ return false;
+ }
+
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+
+ // Collect edges which touches the removed vertex.
+ for (int j = 0, k = nv-1; j < nv; k = j++)
+ {
+ if (p[j] == rem || p[k] == rem)
+ {
+ // Arrange edge so that a=rem.
+ int a = p[j], b = p[k];
+ if (b == rem)
+ rcSwap(a,b);
+
+ // Check if the edge exists
+ bool exists = false;
+ for (int m = 0; m < nedges; ++m)
+ {
+ int* e = &edges[m*3];
+ if (e[1] == b)
+ {
+ // Exists, increment vertex share count.
+ e[2]++;
+ exists = true;
+ }
+ }
+ // Add new edge.
+ if (!exists)
+ {
+ int* e = &edges[nedges*3];
+ e[0] = a;
+ e[1] = b;
+ e[2] = 1;
+ nedges++;
+ }
+ }
+ }
+ }
+
+ // There should be no more than 2 open edges.
+ // This catches the case that two non-adjacent polygons
+ // share the removed vertex. In that case, do not remove the vertex.
+ int numOpenEdges = 0;
+ for (int i = 0; i < nedges; ++i)
+ {
+ if (edges[i*3+2] < 2)
+ numOpenEdges++;
+ }
+ if (numOpenEdges > 2)
+ return false;
+
+ return true;
+}
+
+static bool removeVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem, const int maxTris)
+{
+ const int nvp = mesh.nvp;
+
+ // Count number of polygons to remove.
+ int numRemovedVerts = 0;
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ for (int j = 0; j < nv; ++j)
+ {
+ if (p[j] == rem)
+ numRemovedVerts++;
+ }
+ }
+
+ int nedges = 0;
+ rcScopedDelete<int> edges((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp*4, RC_ALLOC_TEMP));
+ if (!edges)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'edges' (%d).", numRemovedVerts*nvp*4);
+ return false;
+ }
+
+ int nhole = 0;
+ rcScopedDelete<int> hole((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP));
+ if (!hole)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hole' (%d).", numRemovedVerts*nvp);
+ return false;
+ }
+
+ int nhreg = 0;
+ rcScopedDelete<int> hreg((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP));
+ if (!hreg)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hreg' (%d).", numRemovedVerts*nvp);
+ return false;
+ }
+
+ int nharea = 0;
+ rcScopedDelete<int> harea((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP));
+ if (!harea)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'harea' (%d).", numRemovedVerts*nvp);
+ return false;
+ }
+
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ bool hasRem = false;
+ for (int j = 0; j < nv; ++j)
+ if (p[j] == rem) hasRem = true;
+ if (hasRem)
+ {
+ // Collect edges which does not touch the removed vertex.
+ for (int j = 0, k = nv-1; j < nv; k = j++)
+ {
+ if (p[j] != rem && p[k] != rem)
+ {
+ int* e = &edges[nedges*4];
+ e[0] = p[k];
+ e[1] = p[j];
+ e[2] = mesh.regs[i];
+ e[3] = mesh.areas[i];
+ nedges++;
+ }
+ }
+ // Remove the polygon.
+ unsigned short* p2 = &mesh.polys[(mesh.npolys-1)*nvp*2];
+ if (p != p2)
+ memcpy(p,p2,sizeof(unsigned short)*nvp);
+ memset(p+nvp,0xff,sizeof(unsigned short)*nvp);
+ mesh.regs[i] = mesh.regs[mesh.npolys-1];
+ mesh.areas[i] = mesh.areas[mesh.npolys-1];
+ mesh.npolys--;
+ --i;
+ }
+ }
+
+ // Remove vertex.
+ for (int i = (int)rem; i < mesh.nverts - 1; ++i)
+ {
+ mesh.verts[i*3+0] = mesh.verts[(i+1)*3+0];
+ mesh.verts[i*3+1] = mesh.verts[(i+1)*3+1];
+ mesh.verts[i*3+2] = mesh.verts[(i+1)*3+2];
+ }
+ mesh.nverts--;
+
+ // Adjust indices to match the removed vertex layout.
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ for (int j = 0; j < nv; ++j)
+ if (p[j] > rem) p[j]--;
+ }
+ for (int i = 0; i < nedges; ++i)
+ {
+ if (edges[i*4+0] > rem) edges[i*4+0]--;
+ if (edges[i*4+1] > rem) edges[i*4+1]--;
+ }
+
+ if (nedges == 0)
+ return true;
+
+ // Start with one vertex, keep appending connected
+ // segments to the start and end of the hole.
+ pushBack(edges[0], hole, nhole);
+ pushBack(edges[2], hreg, nhreg);
+ pushBack(edges[3], harea, nharea);
+
+ while (nedges)
+ {
+ bool match = false;
+
+ for (int i = 0; i < nedges; ++i)
+ {
+ const int ea = edges[i*4+0];
+ const int eb = edges[i*4+1];
+ const int r = edges[i*4+2];
+ const int a = edges[i*4+3];
+ bool add = false;
+ if (hole[0] == eb)
+ {
+ // The segment matches the beginning of the hole boundary.
+ pushFront(ea, hole, nhole);
+ pushFront(r, hreg, nhreg);
+ pushFront(a, harea, nharea);
+ add = true;
+ }
+ else if (hole[nhole-1] == ea)
+ {
+ // The segment matches the end of the hole boundary.
+ pushBack(eb, hole, nhole);
+ pushBack(r, hreg, nhreg);
+ pushBack(a, harea, nharea);
+ add = true;
+ }
+ if (add)
+ {
+ // The edge segment was added, remove it.
+ edges[i*4+0] = edges[(nedges-1)*4+0];
+ edges[i*4+1] = edges[(nedges-1)*4+1];
+ edges[i*4+2] = edges[(nedges-1)*4+2];
+ edges[i*4+3] = edges[(nedges-1)*4+3];
+ --nedges;
+ match = true;
+ --i;
+ }
+ }
+
+ if (!match)
+ break;
+ }
+
+ rcScopedDelete<int> tris((int*)rcAlloc(sizeof(int)*nhole*3, RC_ALLOC_TEMP));
+ if (!tris)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tris' (%d).", nhole*3);
+ return false;
+ }
+
+ rcScopedDelete<int> tverts((int*)rcAlloc(sizeof(int)*nhole*4, RC_ALLOC_TEMP));
+ if (!tverts)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tverts' (%d).", nhole*4);
+ return false;
+ }
+
+ rcScopedDelete<int> thole((int*)rcAlloc(sizeof(int)*nhole, RC_ALLOC_TEMP));
+ if (!thole)
+ {
+ ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'thole' (%d).", nhole);
+ return false;
+ }
+
+ // Generate temp vertex array for triangulation.
+ for (int i = 0; i < nhole; ++i)
+ {
+ const int pi = hole[i];
+ tverts[i*4+0] = mesh.verts[pi*3+0];
+ tverts[i*4+1] = mesh.verts[pi*3+1];
+ tverts[i*4+2] = mesh.verts[pi*3+2];
+ tverts[i*4+3] = 0;
+ thole[i] = i;
+ }
+
+ // Triangulate the hole.
+ int ntris = triangulate(nhole, &tverts[0], &thole[0], tris);
+ if (ntris < 0)
+ {
+ ntris = -ntris;
+ ctx->log(RC_LOG_WARNING, "removeVertex: triangulate() returned bad results.");
+ }
+
+ // Merge the hole triangles back to polygons.
+ rcScopedDelete<unsigned short> polys((unsigned short*)rcAlloc(sizeof(unsigned short)*(ntris+1)*nvp, RC_ALLOC_TEMP));
+ if (!polys)
+ {
+ ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'polys' (%d).", (ntris+1)*nvp);
+ return false;
+ }
+ rcScopedDelete<unsigned short> pregs((unsigned short*)rcAlloc(sizeof(unsigned short)*ntris, RC_ALLOC_TEMP));
+ if (!pregs)
+ {
+ ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'pregs' (%d).", ntris);
+ return false;
+ }
+ rcScopedDelete<unsigned char> pareas((unsigned char*)rcAlloc(sizeof(unsigned char)*ntris, RC_ALLOC_TEMP));
+ if (!pareas)
+ {
+ ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'pareas' (%d).", ntris);
+ return false;
+ }
+
+ unsigned short* tmpPoly = &polys[ntris*nvp];
+
+ // Build initial polygons.
+ int npolys = 0;
+ memset(polys, 0xff, ntris*nvp*sizeof(unsigned short));
+ for (int j = 0; j < ntris; ++j)
+ {
+ int* t = &tris[j*3];
+ if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2])
+ {
+ polys[npolys*nvp+0] = (unsigned short)hole[t[0]];
+ polys[npolys*nvp+1] = (unsigned short)hole[t[1]];
+ polys[npolys*nvp+2] = (unsigned short)hole[t[2]];
+
+ // If this polygon covers multiple region types then
+ // mark it as such
+ if (hreg[t[0]] != hreg[t[1]] || hreg[t[1]] != hreg[t[2]])
+ pregs[npolys] = RC_MULTIPLE_REGS;
+ else
+ pregs[npolys] = (unsigned short)hreg[t[0]];
+
+ pareas[npolys] = (unsigned char)harea[t[0]];
+ npolys++;
+ }
+ }
+ if (!npolys)
+ return true;
+
+ // Merge polygons.
+ if (nvp > 3)
+ {
+ for (;;)
+ {
+ // Find best polygons to merge.
+ int bestMergeVal = 0;
+ int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0;
+
+ for (int j = 0; j < npolys-1; ++j)
+ {
+ unsigned short* pj = &polys[j*nvp];
+ for (int k = j+1; k < npolys; ++k)
+ {
+ unsigned short* pk = &polys[k*nvp];
+ int ea, eb;
+ int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp);
+ if (v > bestMergeVal)
+ {
+ bestMergeVal = v;
+ bestPa = j;
+ bestPb = k;
+ bestEa = ea;
+ bestEb = eb;
+ }
+ }
+ }
+
+ if (bestMergeVal > 0)
+ {
+ // Found best, merge.
+ unsigned short* pa = &polys[bestPa*nvp];
+ unsigned short* pb = &polys[bestPb*nvp];
+ mergePolyVerts(pa, pb, bestEa, bestEb, tmpPoly, nvp);
+ if (pregs[bestPa] != pregs[bestPb])
+ pregs[bestPa] = RC_MULTIPLE_REGS;
+
+ unsigned short* last = &polys[(npolys-1)*nvp];
+ if (pb != last)
+ memcpy(pb, last, sizeof(unsigned short)*nvp);
+ pregs[bestPb] = pregs[npolys-1];
+ pareas[bestPb] = pareas[npolys-1];
+ npolys--;
+ }
+ else
+ {
+ // Could not merge any polygons, stop.
+ break;
+ }
+ }
+ }
+
+ // Store polygons.
+ for (int i = 0; i < npolys; ++i)
+ {
+ if (mesh.npolys >= maxTris) break;
+ unsigned short* p = &mesh.polys[mesh.npolys*nvp*2];
+ memset(p,0xff,sizeof(unsigned short)*nvp*2);
+ for (int j = 0; j < nvp; ++j)
+ p[j] = polys[i*nvp+j];
+ mesh.regs[mesh.npolys] = pregs[i];
+ mesh.areas[mesh.npolys] = pareas[i];
+ mesh.npolys++;
+ if (mesh.npolys > maxTris)
+ {
+ ctx->log(RC_LOG_ERROR, "removeVertex: Too many polygons %d (max:%d).", mesh.npolys, maxTris);
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// @note If the mesh data is to be used to construct a Detour navigation mesh, then the upper
+/// limit must be retricted to <= #DT_VERTS_PER_POLYGON.
+///
+/// @see rcAllocPolyMesh, rcContourSet, rcPolyMesh, rcConfig
+bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_POLYMESH);
+
+ rcVcopy(mesh.bmin, cset.bmin);
+ rcVcopy(mesh.bmax, cset.bmax);
+ mesh.cs = cset.cs;
+ mesh.ch = cset.ch;
+ mesh.borderSize = cset.borderSize;
+ mesh.maxEdgeError = cset.maxError;
+
+ int maxVertices = 0;
+ int maxTris = 0;
+ int maxVertsPerCont = 0;
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ // Skip null contours.
+ if (cset.conts[i].nverts < 3) continue;
+ maxVertices += cset.conts[i].nverts;
+ maxTris += cset.conts[i].nverts - 2;
+ maxVertsPerCont = rcMax(maxVertsPerCont, cset.conts[i].nverts);
+ }
+
+ if (maxVertices >= 0xfffe)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Too many vertices %d.", maxVertices);
+ return false;
+ }
+
+ rcScopedDelete<unsigned char> vflags((unsigned char*)rcAlloc(sizeof(unsigned char)*maxVertices, RC_ALLOC_TEMP));
+ if (!vflags)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'vflags' (%d).", maxVertices);
+ return false;
+ }
+ memset(vflags, 0, maxVertices);
+
+ mesh.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxVertices*3, RC_ALLOC_PERM);
+ if (!mesh.verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.verts' (%d).", maxVertices);
+ return false;
+ }
+ mesh.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxTris*nvp*2, RC_ALLOC_PERM);
+ if (!mesh.polys)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.polys' (%d).", maxTris*nvp*2);
+ return false;
+ }
+ mesh.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxTris, RC_ALLOC_PERM);
+ if (!mesh.regs)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.regs' (%d).", maxTris);
+ return false;
+ }
+ mesh.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxTris, RC_ALLOC_PERM);
+ if (!mesh.areas)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.areas' (%d).", maxTris);
+ return false;
+ }
+
+ mesh.nverts = 0;
+ mesh.npolys = 0;
+ mesh.nvp = nvp;
+ mesh.maxpolys = maxTris;
+
+ memset(mesh.verts, 0, sizeof(unsigned short)*maxVertices*3);
+ memset(mesh.polys, 0xff, sizeof(unsigned short)*maxTris*nvp*2);
+ memset(mesh.regs, 0, sizeof(unsigned short)*maxTris);
+ memset(mesh.areas, 0, sizeof(unsigned char)*maxTris);
+
+ rcScopedDelete<int> nextVert((int*)rcAlloc(sizeof(int)*maxVertices, RC_ALLOC_TEMP));
+ if (!nextVert)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'nextVert' (%d).", maxVertices);
+ return false;
+ }
+ memset(nextVert, 0, sizeof(int)*maxVertices);
+
+ rcScopedDelete<int> firstVert((int*)rcAlloc(sizeof(int)*VERTEX_BUCKET_COUNT, RC_ALLOC_TEMP));
+ if (!firstVert)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT);
+ return false;
+ }
+ for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i)
+ firstVert[i] = -1;
+
+ rcScopedDelete<int> indices((int*)rcAlloc(sizeof(int)*maxVertsPerCont, RC_ALLOC_TEMP));
+ if (!indices)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'indices' (%d).", maxVertsPerCont);
+ return false;
+ }
+ rcScopedDelete<int> tris((int*)rcAlloc(sizeof(int)*maxVertsPerCont*3, RC_ALLOC_TEMP));
+ if (!tris)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'tris' (%d).", maxVertsPerCont*3);
+ return false;
+ }
+ rcScopedDelete<unsigned short> polys((unsigned short*)rcAlloc(sizeof(unsigned short)*(maxVertsPerCont+1)*nvp, RC_ALLOC_TEMP));
+ if (!polys)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'polys' (%d).", maxVertsPerCont*nvp);
+ return false;
+ }
+ unsigned short* tmpPoly = &polys[maxVertsPerCont*nvp];
+
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+
+ // Skip null contours.
+ if (cont.nverts < 3)
+ continue;
+
+ // Triangulate contour
+ for (int j = 0; j < cont.nverts; ++j)
+ indices[j] = j;
+
+ int ntris = triangulate(cont.nverts, cont.verts, &indices[0], &tris[0]);
+ if (ntris <= 0)
+ {
+ // Bad triangulation, should not happen.
+/* printf("\tconst float bmin[3] = {%ff,%ff,%ff};\n", cset.bmin[0], cset.bmin[1], cset.bmin[2]);
+ printf("\tconst float cs = %ff;\n", cset.cs);
+ printf("\tconst float ch = %ff;\n", cset.ch);
+ printf("\tconst int verts[] = {\n");
+ for (int k = 0; k < cont.nverts; ++k)
+ {
+ const int* v = &cont.verts[k*4];
+ printf("\t\t%d,%d,%d,%d,\n", v[0], v[1], v[2], v[3]);
+ }
+ printf("\t};\n\tconst int nverts = sizeof(verts)/(sizeof(int)*4);\n");*/
+ ctx->log(RC_LOG_WARNING, "rcBuildPolyMesh: Bad triangulation Contour %d.", i);
+ ntris = -ntris;
+ }
+
+ // Add and merge vertices.
+ for (int j = 0; j < cont.nverts; ++j)
+ {
+ const int* v = &cont.verts[j*4];
+ indices[j] = addVertex((unsigned short)v[0], (unsigned short)v[1], (unsigned short)v[2],
+ mesh.verts, firstVert, nextVert, mesh.nverts);
+ if (v[3] & RC_BORDER_VERTEX)
+ {
+ // This vertex should be removed.
+ vflags[indices[j]] = 1;
+ }
+ }
+
+ // Build initial polygons.
+ int npolys = 0;
+ memset(polys, 0xff, maxVertsPerCont*nvp*sizeof(unsigned short));
+ for (int j = 0; j < ntris; ++j)
+ {
+ int* t = &tris[j*3];
+ if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2])
+ {
+ polys[npolys*nvp+0] = (unsigned short)indices[t[0]];
+ polys[npolys*nvp+1] = (unsigned short)indices[t[1]];
+ polys[npolys*nvp+2] = (unsigned short)indices[t[2]];
+ npolys++;
+ }
+ }
+ if (!npolys)
+ continue;
+
+ // Merge polygons.
+ if (nvp > 3)
+ {
+ for(;;)
+ {
+ // Find best polygons to merge.
+ int bestMergeVal = 0;
+ int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0;
+
+ for (int j = 0; j < npolys-1; ++j)
+ {
+ unsigned short* pj = &polys[j*nvp];
+ for (int k = j+1; k < npolys; ++k)
+ {
+ unsigned short* pk = &polys[k*nvp];
+ int ea, eb;
+ int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp);
+ if (v > bestMergeVal)
+ {
+ bestMergeVal = v;
+ bestPa = j;
+ bestPb = k;
+ bestEa = ea;
+ bestEb = eb;
+ }
+ }
+ }
+
+ if (bestMergeVal > 0)
+ {
+ // Found best, merge.
+ unsigned short* pa = &polys[bestPa*nvp];
+ unsigned short* pb = &polys[bestPb*nvp];
+ mergePolyVerts(pa, pb, bestEa, bestEb, tmpPoly, nvp);
+ unsigned short* lastPoly = &polys[(npolys-1)*nvp];
+ if (pb != lastPoly)
+ memcpy(pb, lastPoly, sizeof(unsigned short)*nvp);
+ npolys--;
+ }
+ else
+ {
+ // Could not merge any polygons, stop.
+ break;
+ }
+ }
+ }
+
+ // Store polygons.
+ for (int j = 0; j < npolys; ++j)
+ {
+ unsigned short* p = &mesh.polys[mesh.npolys*nvp*2];
+ unsigned short* q = &polys[j*nvp];
+ for (int k = 0; k < nvp; ++k)
+ p[k] = q[k];
+ mesh.regs[mesh.npolys] = cont.reg;
+ mesh.areas[mesh.npolys] = cont.area;
+ mesh.npolys++;
+ if (mesh.npolys > maxTris)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Too many polygons %d (max:%d).", mesh.npolys, maxTris);
+ return false;
+ }
+ }
+ }
+
+
+ // Remove edge vertices.
+ for (int i = 0; i < mesh.nverts; ++i)
+ {
+ if (vflags[i])
+ {
+ if (!canRemoveVertex(ctx, mesh, (unsigned short)i))
+ continue;
+ if (!removeVertex(ctx, mesh, (unsigned short)i, maxTris))
+ {
+ // Failed to remove vertex
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Failed to remove edge vertex %d.", i);
+ return false;
+ }
+ // Remove vertex
+ // Note: mesh.nverts is already decremented inside removeVertex()!
+ // Fixup vertex flags
+ for (int j = i; j < mesh.nverts; ++j)
+ vflags[j] = vflags[j+1];
+ --i;
+ }
+ }
+
+ // Calculate adjacency.
+ if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, nvp))
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Adjacency failed.");
+ return false;
+ }
+
+ // Find portal edges
+ if (mesh.borderSize > 0)
+ {
+ const int w = cset.width;
+ const int h = cset.height;
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*2*nvp];
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (p[j] == RC_MESH_NULL_IDX) break;
+ // Skip connected edges.
+ if (p[nvp+j] != RC_MESH_NULL_IDX)
+ continue;
+ int nj = j+1;
+ if (nj >= nvp || p[nj] == RC_MESH_NULL_IDX) nj = 0;
+ const unsigned short* va = &mesh.verts[p[j]*3];
+ const unsigned short* vb = &mesh.verts[p[nj]*3];
+
+ if ((int)va[0] == 0 && (int)vb[0] == 0)
+ p[nvp+j] = 0x8000 | 0;
+ else if ((int)va[2] == h && (int)vb[2] == h)
+ p[nvp+j] = 0x8000 | 1;
+ else if ((int)va[0] == w && (int)vb[0] == w)
+ p[nvp+j] = 0x8000 | 2;
+ else if ((int)va[2] == 0 && (int)vb[2] == 0)
+ p[nvp+j] = 0x8000 | 3;
+ }
+ }
+ }
+
+ // Just allocate the mesh flags array. The user is resposible to fill it.
+ mesh.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*mesh.npolys, RC_ALLOC_PERM);
+ if (!mesh.flags)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.flags' (%d).", mesh.npolys);
+ return false;
+ }
+ memset(mesh.flags, 0, sizeof(unsigned short) * mesh.npolys);
+
+ if (mesh.nverts > 0xffff)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: The resulting mesh has too many vertices %d (max %d). Data can be corrupted.", mesh.nverts, 0xffff);
+ }
+ if (mesh.npolys > 0xffff)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: The resulting mesh has too many polygons %d (max %d). Data can be corrupted.", mesh.npolys, 0xffff);
+ }
+
+ return true;
+}
+
+/// @see rcAllocPolyMesh, rcPolyMesh
+bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh)
+{
+ rcAssert(ctx);
+
+ if (!nmeshes || !meshes)
+ return true;
+
+ rcScopedTimer timer(ctx, RC_TIMER_MERGE_POLYMESH);
+
+ mesh.nvp = meshes[0]->nvp;
+ mesh.cs = meshes[0]->cs;
+ mesh.ch = meshes[0]->ch;
+ rcVcopy(mesh.bmin, meshes[0]->bmin);
+ rcVcopy(mesh.bmax, meshes[0]->bmax);
+
+ int maxVerts = 0;
+ int maxPolys = 0;
+ int maxVertsPerMesh = 0;
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ rcVmin(mesh.bmin, meshes[i]->bmin);
+ rcVmax(mesh.bmax, meshes[i]->bmax);
+ maxVertsPerMesh = rcMax(maxVertsPerMesh, meshes[i]->nverts);
+ maxVerts += meshes[i]->nverts;
+ maxPolys += meshes[i]->npolys;
+ }
+
+ mesh.nverts = 0;
+ mesh.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxVerts*3, RC_ALLOC_PERM);
+ if (!mesh.verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.verts' (%d).", maxVerts*3);
+ return false;
+ }
+
+ mesh.npolys = 0;
+ mesh.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys*2*mesh.nvp, RC_ALLOC_PERM);
+ if (!mesh.polys)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.polys' (%d).", maxPolys*2*mesh.nvp);
+ return false;
+ }
+ memset(mesh.polys, 0xff, sizeof(unsigned short)*maxPolys*2*mesh.nvp);
+
+ mesh.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys, RC_ALLOC_PERM);
+ if (!mesh.regs)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.regs' (%d).", maxPolys);
+ return false;
+ }
+ memset(mesh.regs, 0, sizeof(unsigned short)*maxPolys);
+
+ mesh.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxPolys, RC_ALLOC_PERM);
+ if (!mesh.areas)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.areas' (%d).", maxPolys);
+ return false;
+ }
+ memset(mesh.areas, 0, sizeof(unsigned char)*maxPolys);
+
+ mesh.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys, RC_ALLOC_PERM);
+ if (!mesh.flags)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.flags' (%d).", maxPolys);
+ return false;
+ }
+ memset(mesh.flags, 0, sizeof(unsigned short)*maxPolys);
+
+ rcScopedDelete<int> nextVert((int*)rcAlloc(sizeof(int)*maxVerts, RC_ALLOC_TEMP));
+ if (!nextVert)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'nextVert' (%d).", maxVerts);
+ return false;
+ }
+ memset(nextVert, 0, sizeof(int)*maxVerts);
+
+ rcScopedDelete<int> firstVert((int*)rcAlloc(sizeof(int)*VERTEX_BUCKET_COUNT, RC_ALLOC_TEMP));
+ if (!firstVert)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT);
+ return false;
+ }
+ for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i)
+ firstVert[i] = -1;
+
+ rcScopedDelete<unsigned short> vremap((unsigned short*)rcAlloc(sizeof(unsigned short)*maxVertsPerMesh, RC_ALLOC_PERM));
+ if (!vremap)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'vremap' (%d).", maxVertsPerMesh);
+ return false;
+ }
+ memset(vremap, 0, sizeof(unsigned short)*maxVertsPerMesh);
+
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ const rcPolyMesh* pmesh = meshes[i];
+
+ const unsigned short ox = (unsigned short)floorf((pmesh->bmin[0]-mesh.bmin[0])/mesh.cs+0.5f);
+ const unsigned short oz = (unsigned short)floorf((pmesh->bmin[2]-mesh.bmin[2])/mesh.cs+0.5f);
+
+ bool isMinX = (ox == 0);
+ bool isMinZ = (oz == 0);
+ bool isMaxX = ((unsigned short)floorf((mesh.bmax[0] - pmesh->bmax[0]) / mesh.cs + 0.5f)) == 0;
+ bool isMaxZ = ((unsigned short)floorf((mesh.bmax[2] - pmesh->bmax[2]) / mesh.cs + 0.5f)) == 0;
+ bool isOnBorder = (isMinX || isMinZ || isMaxX || isMaxZ);
+
+ for (int j = 0; j < pmesh->nverts; ++j)
+ {
+ unsigned short* v = &pmesh->verts[j*3];
+ vremap[j] = addVertex(v[0]+ox, v[1], v[2]+oz,
+ mesh.verts, firstVert, nextVert, mesh.nverts);
+ }
+
+ for (int j = 0; j < pmesh->npolys; ++j)
+ {
+ unsigned short* tgt = &mesh.polys[mesh.npolys*2*mesh.nvp];
+ unsigned short* src = &pmesh->polys[j*2*mesh.nvp];
+ mesh.regs[mesh.npolys] = pmesh->regs[j];
+ mesh.areas[mesh.npolys] = pmesh->areas[j];
+ mesh.flags[mesh.npolys] = pmesh->flags[j];
+ mesh.npolys++;
+ for (int k = 0; k < mesh.nvp; ++k)
+ {
+ if (src[k] == RC_MESH_NULL_IDX) break;
+ tgt[k] = vremap[src[k]];
+ }
+
+ if (isOnBorder)
+ {
+ for (int k = mesh.nvp; k < mesh.nvp * 2; ++k)
+ {
+ if (src[k] & 0x8000 && src[k] != 0xffff)
+ {
+ unsigned short dir = src[k] & 0xf;
+ switch (dir)
+ {
+ case 0: // Portal x-
+ if (isMinX)
+ tgt[k] = src[k];
+ break;
+ case 1: // Portal z+
+ if (isMaxZ)
+ tgt[k] = src[k];
+ break;
+ case 2: // Portal x+
+ if (isMaxX)
+ tgt[k] = src[k];
+ break;
+ case 3: // Portal z-
+ if (isMinZ)
+ tgt[k] = src[k];
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Calculate adjacency.
+ if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, mesh.nvp))
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Adjacency failed.");
+ return false;
+ }
+
+ if (mesh.nverts > 0xffff)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: The resulting mesh has too many vertices %d (max %d). Data can be corrupted.", mesh.nverts, 0xffff);
+ }
+ if (mesh.npolys > 0xffff)
+ {
+ ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: The resulting mesh has too many polygons %d (max %d). Data can be corrupted.", mesh.npolys, 0xffff);
+ }
+
+ return true;
+}
+
+bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst)
+{
+ rcAssert(ctx);
+
+ // Destination must be empty.
+ rcAssert(dst.verts == 0);
+ rcAssert(dst.polys == 0);
+ rcAssert(dst.regs == 0);
+ rcAssert(dst.areas == 0);
+ rcAssert(dst.flags == 0);
+
+ dst.nverts = src.nverts;
+ dst.npolys = src.npolys;
+ dst.maxpolys = src.npolys;
+ dst.nvp = src.nvp;
+ rcVcopy(dst.bmin, src.bmin);
+ rcVcopy(dst.bmax, src.bmax);
+ dst.cs = src.cs;
+ dst.ch = src.ch;
+ dst.borderSize = src.borderSize;
+ dst.maxEdgeError = src.maxEdgeError;
+
+ dst.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.nverts*3, RC_ALLOC_PERM);
+ if (!dst.verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.verts' (%d).", src.nverts*3);
+ return false;
+ }
+ memcpy(dst.verts, src.verts, sizeof(unsigned short)*src.nverts*3);
+
+ dst.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys*2*src.nvp, RC_ALLOC_PERM);
+ if (!dst.polys)
+ {
+ ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.polys' (%d).", src.npolys*2*src.nvp);
+ return false;
+ }
+ memcpy(dst.polys, src.polys, sizeof(unsigned short)*src.npolys*2*src.nvp);
+
+ dst.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys, RC_ALLOC_PERM);
+ if (!dst.regs)
+ {
+ ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.regs' (%d).", src.npolys);
+ return false;
+ }
+ memcpy(dst.regs, src.regs, sizeof(unsigned short)*src.npolys);
+
+ dst.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*src.npolys, RC_ALLOC_PERM);
+ if (!dst.areas)
+ {
+ ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.areas' (%d).", src.npolys);
+ return false;
+ }
+ memcpy(dst.areas, src.areas, sizeof(unsigned char)*src.npolys);
+
+ dst.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys, RC_ALLOC_PERM);
+ if (!dst.flags)
+ {
+ ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.flags' (%d).", src.npolys);
+ return false;
+ }
+ memcpy(dst.flags, src.flags, sizeof(unsigned short)*src.npolys);
+
+ return true;
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp b/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp
new file mode 100644
index 0000000000..f953132f74
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp
@@ -0,0 +1,1462 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+
+static const unsigned RC_UNSET_HEIGHT = 0xffff;
+
+struct rcHeightPatch
+{
+ inline rcHeightPatch() : data(0), xmin(0), ymin(0), width(0), height(0) {}
+ inline ~rcHeightPatch() { rcFree(data); }
+ unsigned short* data;
+ int xmin, ymin, width, height;
+};
+
+
+inline float vdot2(const float* a, const float* b)
+{
+ return a[0]*b[0] + a[2]*b[2];
+}
+
+inline float vdistSq2(const float* p, const float* q)
+{
+ const float dx = q[0] - p[0];
+ const float dy = q[2] - p[2];
+ return dx*dx + dy*dy;
+}
+
+inline float vdist2(const float* p, const float* q)
+{
+ return sqrtf(vdistSq2(p,q));
+}
+
+inline float vcross2(const float* p1, const float* p2, const float* p3)
+{
+ const float u1 = p2[0] - p1[0];
+ const float v1 = p2[2] - p1[2];
+ const float u2 = p3[0] - p1[0];
+ const float v2 = p3[2] - p1[2];
+ return u1 * v2 - v1 * u2;
+}
+
+static bool circumCircle(const float* p1, const float* p2, const float* p3,
+ float* c, float& r)
+{
+ static const float EPS = 1e-6f;
+ // Calculate the circle relative to p1, to avoid some precision issues.
+ const float v1[3] = {0,0,0};
+ float v2[3], v3[3];
+ rcVsub(v2, p2,p1);
+ rcVsub(v3, p3,p1);
+
+ const float cp = vcross2(v1, v2, v3);
+ if (fabsf(cp) > EPS)
+ {
+ const float v1Sq = vdot2(v1,v1);
+ const float v2Sq = vdot2(v2,v2);
+ const float v3Sq = vdot2(v3,v3);
+ c[0] = (v1Sq*(v2[2]-v3[2]) + v2Sq*(v3[2]-v1[2]) + v3Sq*(v1[2]-v2[2])) / (2*cp);
+ c[1] = 0;
+ c[2] = (v1Sq*(v3[0]-v2[0]) + v2Sq*(v1[0]-v3[0]) + v3Sq*(v2[0]-v1[0])) / (2*cp);
+ r = vdist2(c, v1);
+ rcVadd(c, c, p1);
+ return true;
+ }
+
+ rcVcopy(c, p1);
+ r = 0;
+ return false;
+}
+
+static float distPtTri(const float* p, const float* a, const float* b, const float* c)
+{
+ float v0[3], v1[3], v2[3];
+ rcVsub(v0, c,a);
+ rcVsub(v1, b,a);
+ rcVsub(v2, p,a);
+
+ const float dot00 = vdot2(v0, v0);
+ const float dot01 = vdot2(v0, v1);
+ const float dot02 = vdot2(v0, v2);
+ const float dot11 = vdot2(v1, v1);
+ const float dot12 = vdot2(v1, v2);
+
+ // Compute barycentric coordinates
+ const float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01);
+ const float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+ float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+ // If point lies inside the triangle, return interpolated y-coord.
+ static const float EPS = 1e-4f;
+ if (u >= -EPS && v >= -EPS && (u+v) <= 1+EPS)
+ {
+ const float y = a[1] + v0[1]*u + v1[1]*v;
+ return fabsf(y-p[1]);
+ }
+ return FLT_MAX;
+}
+
+static float distancePtSeg(const float* pt, const float* p, const float* q)
+{
+ float pqx = q[0] - p[0];
+ float pqy = q[1] - p[1];
+ float pqz = q[2] - p[2];
+ float dx = pt[0] - p[0];
+ float dy = pt[1] - p[1];
+ float dz = pt[2] - p[2];
+ float d = pqx*pqx + pqy*pqy + pqz*pqz;
+ float t = pqx*dx + pqy*dy + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = p[0] + t*pqx - pt[0];
+ dy = p[1] + t*pqy - pt[1];
+ dz = p[2] + t*pqz - pt[2];
+
+ return dx*dx + dy*dy + dz*dz;
+}
+
+static float distancePtSeg2d(const float* pt, const float* p, const float* q)
+{
+ float pqx = q[0] - p[0];
+ float pqz = q[2] - p[2];
+ float dx = pt[0] - p[0];
+ float dz = pt[2] - p[2];
+ float d = pqx*pqx + pqz*pqz;
+ float t = pqx*dx + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = p[0] + t*pqx - pt[0];
+ dz = p[2] + t*pqz - pt[2];
+
+ return dx*dx + dz*dz;
+}
+
+static float distToTriMesh(const float* p, const float* verts, const int /*nverts*/, const int* tris, const int ntris)
+{
+ float dmin = FLT_MAX;
+ for (int i = 0; i < ntris; ++i)
+ {
+ const float* va = &verts[tris[i*4+0]*3];
+ const float* vb = &verts[tris[i*4+1]*3];
+ const float* vc = &verts[tris[i*4+2]*3];
+ float d = distPtTri(p, va,vb,vc);
+ if (d < dmin)
+ dmin = d;
+ }
+ if (dmin == FLT_MAX) return -1;
+ return dmin;
+}
+
+static float distToPoly(int nvert, const float* verts, const float* p)
+{
+
+ float dmin = FLT_MAX;
+ int i, j, c = 0;
+ for (i = 0, j = nvert-1; i < nvert; j = i++)
+ {
+ const float* vi = &verts[i*3];
+ const float* vj = &verts[j*3];
+ if (((vi[2] > p[2]) != (vj[2] > p[2])) &&
+ (p[0] < (vj[0]-vi[0]) * (p[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) )
+ c = !c;
+ dmin = rcMin(dmin, distancePtSeg2d(p, vj, vi));
+ }
+ return c ? -dmin : dmin;
+}
+
+
+static unsigned short getHeight(const float fx, const float fy, const float fz,
+ const float /*cs*/, const float ics, const float ch,
+ const int radius, const rcHeightPatch& hp)
+{
+ int ix = (int)floorf(fx*ics + 0.01f);
+ int iz = (int)floorf(fz*ics + 0.01f);
+ ix = rcClamp(ix-hp.xmin, 0, hp.width - 1);
+ iz = rcClamp(iz-hp.ymin, 0, hp.height - 1);
+ unsigned short h = hp.data[ix+iz*hp.width];
+ if (h == RC_UNSET_HEIGHT)
+ {
+ // Special case when data might be bad.
+ // Walk adjacent cells in a spiral up to 'radius', and look
+ // for a pixel which has a valid height.
+ int x = 1, z = 0, dx = 1, dz = 0;
+ int maxSize = radius * 2 + 1;
+ int maxIter = maxSize * maxSize - 1;
+
+ int nextRingIterStart = 8;
+ int nextRingIters = 16;
+
+ float dmin = FLT_MAX;
+ for (int i = 0; i < maxIter; i++)
+ {
+ const int nx = ix + x;
+ const int nz = iz + z;
+
+ if (nx >= 0 && nz >= 0 && nx < hp.width && nz < hp.height)
+ {
+ const unsigned short nh = hp.data[nx + nz*hp.width];
+ if (nh != RC_UNSET_HEIGHT)
+ {
+ const float d = fabsf(nh*ch - fy);
+ if (d < dmin)
+ {
+ h = nh;
+ dmin = d;
+ }
+ }
+ }
+
+ // We are searching in a grid which looks approximately like this:
+ // __________
+ // |2 ______ 2|
+ // | |1 __ 1| |
+ // | | |__| | |
+ // | |______| |
+ // |__________|
+ // We want to find the best height as close to the center cell as possible. This means that
+ // if we find a height in one of the neighbor cells to the center, we don't want to
+ // expand further out than the 8 neighbors - we want to limit our search to the closest
+ // of these "rings", but the best height in the ring.
+ // For example, the center is just 1 cell. We checked that at the entrance to the function.
+ // The next "ring" contains 8 cells (marked 1 above). Those are all the neighbors to the center cell.
+ // The next one again contains 16 cells (marked 2). In general each ring has 8 additional cells, which
+ // can be thought of as adding 2 cells around the "center" of each side when we expand the ring.
+ // Here we detect if we are about to enter the next ring, and if we are and we have found
+ // a height, we abort the search.
+ if (i + 1 == nextRingIterStart)
+ {
+ if (h != RC_UNSET_HEIGHT)
+ break;
+
+ nextRingIterStart += nextRingIters;
+ nextRingIters += 8;
+ }
+
+ if ((x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1 - z)))
+ {
+ int tmp = dx;
+ dx = -dz;
+ dz = tmp;
+ }
+ x += dx;
+ z += dz;
+ }
+ }
+ return h;
+}
+
+
+enum EdgeValues
+{
+ EV_UNDEF = -1,
+ EV_HULL = -2,
+};
+
+static int findEdge(const int* edges, int nedges, int s, int t)
+{
+ for (int i = 0; i < nedges; i++)
+ {
+ const int* e = &edges[i*4];
+ if ((e[0] == s && e[1] == t) || (e[0] == t && e[1] == s))
+ return i;
+ }
+ return EV_UNDEF;
+}
+
+static int addEdge(rcContext* ctx, int* edges, int& nedges, const int maxEdges, int s, int t, int l, int r)
+{
+ if (nedges >= maxEdges)
+ {
+ ctx->log(RC_LOG_ERROR, "addEdge: Too many edges (%d/%d).", nedges, maxEdges);
+ return EV_UNDEF;
+ }
+
+ // Add edge if not already in the triangulation.
+ int e = findEdge(edges, nedges, s, t);
+ if (e == EV_UNDEF)
+ {
+ int* edge = &edges[nedges*4];
+ edge[0] = s;
+ edge[1] = t;
+ edge[2] = l;
+ edge[3] = r;
+ return nedges++;
+ }
+ else
+ {
+ return EV_UNDEF;
+ }
+}
+
+static void updateLeftFace(int* e, int s, int t, int f)
+{
+ if (e[0] == s && e[1] == t && e[2] == EV_UNDEF)
+ e[2] = f;
+ else if (e[1] == s && e[0] == t && e[3] == EV_UNDEF)
+ e[3] = f;
+}
+
+static int overlapSegSeg2d(const float* a, const float* b, const float* c, const float* d)
+{
+ const float a1 = vcross2(a, b, d);
+ const float a2 = vcross2(a, b, c);
+ if (a1*a2 < 0.0f)
+ {
+ float a3 = vcross2(c, d, a);
+ float a4 = a3 + a2 - a1;
+ if (a3 * a4 < 0.0f)
+ return 1;
+ }
+ return 0;
+}
+
+static bool overlapEdges(const float* pts, const int* edges, int nedges, int s1, int t1)
+{
+ for (int i = 0; i < nedges; ++i)
+ {
+ const int s0 = edges[i*4+0];
+ const int t0 = edges[i*4+1];
+ // Same or connected edges do not overlap.
+ if (s0 == s1 || s0 == t1 || t0 == s1 || t0 == t1)
+ continue;
+ if (overlapSegSeg2d(&pts[s0*3],&pts[t0*3], &pts[s1*3],&pts[t1*3]))
+ return true;
+ }
+ return false;
+}
+
+static void completeFacet(rcContext* ctx, const float* pts, int npts, int* edges, int& nedges, const int maxEdges, int& nfaces, int e)
+{
+ static const float EPS = 1e-5f;
+
+ int* edge = &edges[e*4];
+
+ // Cache s and t.
+ int s,t;
+ if (edge[2] == EV_UNDEF)
+ {
+ s = edge[0];
+ t = edge[1];
+ }
+ else if (edge[3] == EV_UNDEF)
+ {
+ s = edge[1];
+ t = edge[0];
+ }
+ else
+ {
+ // Edge already completed.
+ return;
+ }
+
+ // Find best point on left of edge.
+ int pt = npts;
+ float c[3] = {0,0,0};
+ float r = -1;
+ for (int u = 0; u < npts; ++u)
+ {
+ if (u == s || u == t) continue;
+ if (vcross2(&pts[s*3], &pts[t*3], &pts[u*3]) > EPS)
+ {
+ if (r < 0)
+ {
+ // The circle is not updated yet, do it now.
+ pt = u;
+ circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r);
+ continue;
+ }
+ const float d = vdist2(c, &pts[u*3]);
+ const float tol = 0.001f;
+ if (d > r*(1+tol))
+ {
+ // Outside current circumcircle, skip.
+ continue;
+ }
+ else if (d < r*(1-tol))
+ {
+ // Inside safe circumcircle, update circle.
+ pt = u;
+ circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r);
+ }
+ else
+ {
+ // Inside epsilon circum circle, do extra tests to make sure the edge is valid.
+ // s-u and t-u cannot overlap with s-pt nor t-pt if they exists.
+ if (overlapEdges(pts, edges, nedges, s,u))
+ continue;
+ if (overlapEdges(pts, edges, nedges, t,u))
+ continue;
+ // Edge is valid.
+ pt = u;
+ circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r);
+ }
+ }
+ }
+
+ // Add new triangle or update edge info if s-t is on hull.
+ if (pt < npts)
+ {
+ // Update face information of edge being completed.
+ updateLeftFace(&edges[e*4], s, t, nfaces);
+
+ // Add new edge or update face info of old edge.
+ e = findEdge(edges, nedges, pt, s);
+ if (e == EV_UNDEF)
+ addEdge(ctx, edges, nedges, maxEdges, pt, s, nfaces, EV_UNDEF);
+ else
+ updateLeftFace(&edges[e*4], pt, s, nfaces);
+
+ // Add new edge or update face info of old edge.
+ e = findEdge(edges, nedges, t, pt);
+ if (e == EV_UNDEF)
+ addEdge(ctx, edges, nedges, maxEdges, t, pt, nfaces, EV_UNDEF);
+ else
+ updateLeftFace(&edges[e*4], t, pt, nfaces);
+
+ nfaces++;
+ }
+ else
+ {
+ updateLeftFace(&edges[e*4], s, t, EV_HULL);
+ }
+}
+
+static void delaunayHull(rcContext* ctx, const int npts, const float* pts,
+ const int nhull, const int* hull,
+ rcIntArray& tris, rcIntArray& edges)
+{
+ int nfaces = 0;
+ int nedges = 0;
+ const int maxEdges = npts*10;
+ edges.resize(maxEdges*4);
+
+ for (int i = 0, j = nhull-1; i < nhull; j=i++)
+ addEdge(ctx, &edges[0], nedges, maxEdges, hull[j],hull[i], EV_HULL, EV_UNDEF);
+
+ int currentEdge = 0;
+ while (currentEdge < nedges)
+ {
+ if (edges[currentEdge*4+2] == EV_UNDEF)
+ completeFacet(ctx, pts, npts, &edges[0], nedges, maxEdges, nfaces, currentEdge);
+ if (edges[currentEdge*4+3] == EV_UNDEF)
+ completeFacet(ctx, pts, npts, &edges[0], nedges, maxEdges, nfaces, currentEdge);
+ currentEdge++;
+ }
+
+ // Create tris
+ tris.resize(nfaces*4);
+ for (int i = 0; i < nfaces*4; ++i)
+ tris[i] = -1;
+
+ for (int i = 0; i < nedges; ++i)
+ {
+ const int* e = &edges[i*4];
+ if (e[3] >= 0)
+ {
+ // Left face
+ int* t = &tris[e[3]*4];
+ if (t[0] == -1)
+ {
+ t[0] = e[0];
+ t[1] = e[1];
+ }
+ else if (t[0] == e[1])
+ t[2] = e[0];
+ else if (t[1] == e[0])
+ t[2] = e[1];
+ }
+ if (e[2] >= 0)
+ {
+ // Right
+ int* t = &tris[e[2]*4];
+ if (t[0] == -1)
+ {
+ t[0] = e[1];
+ t[1] = e[0];
+ }
+ else if (t[0] == e[0])
+ t[2] = e[1];
+ else if (t[1] == e[1])
+ t[2] = e[0];
+ }
+ }
+
+ for (int i = 0; i < tris.size()/4; ++i)
+ {
+ int* t = &tris[i*4];
+ if (t[0] == -1 || t[1] == -1 || t[2] == -1)
+ {
+ ctx->log(RC_LOG_WARNING, "delaunayHull: Removing dangling face %d [%d,%d,%d].", i, t[0],t[1],t[2]);
+ t[0] = tris[tris.size()-4];
+ t[1] = tris[tris.size()-3];
+ t[2] = tris[tris.size()-2];
+ t[3] = tris[tris.size()-1];
+ tris.resize(tris.size()-4);
+ --i;
+ }
+ }
+}
+
+// Calculate minimum extend of the polygon.
+static float polyMinExtent(const float* verts, const int nverts)
+{
+ float minDist = FLT_MAX;
+ for (int i = 0; i < nverts; i++)
+ {
+ const int ni = (i+1) % nverts;
+ const float* p1 = &verts[i*3];
+ const float* p2 = &verts[ni*3];
+ float maxEdgeDist = 0;
+ for (int j = 0; j < nverts; j++)
+ {
+ if (j == i || j == ni) continue;
+ float d = distancePtSeg2d(&verts[j*3], p1,p2);
+ maxEdgeDist = rcMax(maxEdgeDist, d);
+ }
+ minDist = rcMin(minDist, maxEdgeDist);
+ }
+ return rcSqrt(minDist);
+}
+
+// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).
+inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; }
+inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }
+
+static void triangulateHull(const int /*nverts*/, const float* verts, const int nhull, const int* hull, rcIntArray& tris)
+{
+ int start = 0, left = 1, right = nhull-1;
+
+ // Start from an ear with shortest perimeter.
+ // This tends to favor well formed triangles as starting point.
+ float dmin = 0;
+ for (int i = 0; i < nhull; i++)
+ {
+ int pi = prev(i, nhull);
+ int ni = next(i, nhull);
+ const float* pv = &verts[hull[pi]*3];
+ const float* cv = &verts[hull[i]*3];
+ const float* nv = &verts[hull[ni]*3];
+ const float d = vdist2(pv,cv) + vdist2(cv,nv) + vdist2(nv,pv);
+ if (d < dmin)
+ {
+ start = i;
+ left = ni;
+ right = pi;
+ dmin = d;
+ }
+ }
+
+ // Add first triangle
+ tris.push(hull[start]);
+ tris.push(hull[left]);
+ tris.push(hull[right]);
+ tris.push(0);
+
+ // Triangulate the polygon by moving left or right,
+ // depending on which triangle has shorter perimeter.
+ // This heuristic was chose emprically, since it seems
+ // handle tesselated straight edges well.
+ while (next(left, nhull) != right)
+ {
+ // Check to see if se should advance left or right.
+ int nleft = next(left, nhull);
+ int nright = prev(right, nhull);
+
+ const float* cvleft = &verts[hull[left]*3];
+ const float* nvleft = &verts[hull[nleft]*3];
+ const float* cvright = &verts[hull[right]*3];
+ const float* nvright = &verts[hull[nright]*3];
+ const float dleft = vdist2(cvleft, nvleft) + vdist2(nvleft, cvright);
+ const float dright = vdist2(cvright, nvright) + vdist2(cvleft, nvright);
+
+ if (dleft < dright)
+ {
+ tris.push(hull[left]);
+ tris.push(hull[nleft]);
+ tris.push(hull[right]);
+ tris.push(0);
+ left = nleft;
+ }
+ else
+ {
+ tris.push(hull[left]);
+ tris.push(hull[nright]);
+ tris.push(hull[right]);
+ tris.push(0);
+ right = nright;
+ }
+ }
+}
+
+
+inline float getJitterX(const int i)
+{
+ return (((i * 0x8da6b343) & 0xffff) / 65535.0f * 2.0f) - 1.0f;
+}
+
+inline float getJitterY(const int i)
+{
+ return (((i * 0xd8163841) & 0xffff) / 65535.0f * 2.0f) - 1.0f;
+}
+
+static bool buildPolyDetail(rcContext* ctx, const float* in, const int nin,
+ const float sampleDist, const float sampleMaxError,
+ const int heightSearchRadius, const rcCompactHeightfield& chf,
+ const rcHeightPatch& hp, float* verts, int& nverts,
+ rcIntArray& tris, rcIntArray& edges, rcIntArray& samples)
+{
+ static const int MAX_VERTS = 127;
+ static const int MAX_TRIS = 255; // Max tris for delaunay is 2n-2-k (n=num verts, k=num hull verts).
+ static const int MAX_VERTS_PER_EDGE = 32;
+ float edge[(MAX_VERTS_PER_EDGE+1)*3];
+ int hull[MAX_VERTS];
+ int nhull = 0;
+
+ nverts = nin;
+
+ for (int i = 0; i < nin; ++i)
+ rcVcopy(&verts[i*3], &in[i*3]);
+
+ edges.resize(0);
+ tris.resize(0);
+
+ const float cs = chf.cs;
+ const float ics = 1.0f/cs;
+
+ // Calculate minimum extents of the polygon based on input data.
+ float minExtent = polyMinExtent(verts, nverts);
+
+ // Tessellate outlines.
+ // This is done in separate pass in order to ensure
+ // seamless height values across the ply boundaries.
+ if (sampleDist > 0)
+ {
+ for (int i = 0, j = nin-1; i < nin; j=i++)
+ {
+ const float* vj = &in[j*3];
+ const float* vi = &in[i*3];
+ bool swapped = false;
+ // Make sure the segments are always handled in same order
+ // using lexological sort or else there will be seams.
+ if (fabsf(vj[0]-vi[0]) < 1e-6f)
+ {
+ if (vj[2] > vi[2])
+ {
+ rcSwap(vj,vi);
+ swapped = true;
+ }
+ }
+ else
+ {
+ if (vj[0] > vi[0])
+ {
+ rcSwap(vj,vi);
+ swapped = true;
+ }
+ }
+ // Create samples along the edge.
+ float dx = vi[0] - vj[0];
+ float dy = vi[1] - vj[1];
+ float dz = vi[2] - vj[2];
+ float d = sqrtf(dx*dx + dz*dz);
+ int nn = 1 + (int)floorf(d/sampleDist);
+ if (nn >= MAX_VERTS_PER_EDGE) nn = MAX_VERTS_PER_EDGE-1;
+ if (nverts+nn >= MAX_VERTS)
+ nn = MAX_VERTS-1-nverts;
+
+ for (int k = 0; k <= nn; ++k)
+ {
+ float u = (float)k/(float)nn;
+ float* pos = &edge[k*3];
+ pos[0] = vj[0] + dx*u;
+ pos[1] = vj[1] + dy*u;
+ pos[2] = vj[2] + dz*u;
+ pos[1] = getHeight(pos[0],pos[1],pos[2], cs, ics, chf.ch, heightSearchRadius, hp)*chf.ch;
+ }
+ // Simplify samples.
+ int idx[MAX_VERTS_PER_EDGE] = {0,nn};
+ int nidx = 2;
+ for (int k = 0; k < nidx-1; )
+ {
+ const int a = idx[k];
+ const int b = idx[k+1];
+ const float* va = &edge[a*3];
+ const float* vb = &edge[b*3];
+ // Find maximum deviation along the segment.
+ float maxd = 0;
+ int maxi = -1;
+ for (int m = a+1; m < b; ++m)
+ {
+ float dev = distancePtSeg(&edge[m*3],va,vb);
+ if (dev > maxd)
+ {
+ maxd = dev;
+ maxi = m;
+ }
+ }
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1 && maxd > rcSqr(sampleMaxError))
+ {
+ for (int m = nidx; m > k; --m)
+ idx[m] = idx[m-1];
+ idx[k+1] = maxi;
+ nidx++;
+ }
+ else
+ {
+ ++k;
+ }
+ }
+
+ hull[nhull++] = j;
+ // Add new vertices.
+ if (swapped)
+ {
+ for (int k = nidx-2; k > 0; --k)
+ {
+ rcVcopy(&verts[nverts*3], &edge[idx[k]*3]);
+ hull[nhull++] = nverts;
+ nverts++;
+ }
+ }
+ else
+ {
+ for (int k = 1; k < nidx-1; ++k)
+ {
+ rcVcopy(&verts[nverts*3], &edge[idx[k]*3]);
+ hull[nhull++] = nverts;
+ nverts++;
+ }
+ }
+ }
+ }
+
+ // If the polygon minimum extent is small (sliver or small triangle), do not try to add internal points.
+ if (minExtent < sampleDist*2)
+ {
+ triangulateHull(nverts, verts, nhull, hull, tris);
+ return true;
+ }
+
+ // Tessellate the base mesh.
+ // We're using the triangulateHull instead of delaunayHull as it tends to
+ // create a bit better triangulation for long thin triangles when there
+ // are no internal points.
+ triangulateHull(nverts, verts, nhull, hull, tris);
+
+ if (tris.size() == 0)
+ {
+ // Could not triangulate the poly, make sure there is some valid data there.
+ ctx->log(RC_LOG_WARNING, "buildPolyDetail: Could not triangulate polygon (%d verts).", nverts);
+ return true;
+ }
+
+ if (sampleDist > 0)
+ {
+ // Create sample locations in a grid.
+ float bmin[3], bmax[3];
+ rcVcopy(bmin, in);
+ rcVcopy(bmax, in);
+ for (int i = 1; i < nin; ++i)
+ {
+ rcVmin(bmin, &in[i*3]);
+ rcVmax(bmax, &in[i*3]);
+ }
+ int x0 = (int)floorf(bmin[0]/sampleDist);
+ int x1 = (int)ceilf(bmax[0]/sampleDist);
+ int z0 = (int)floorf(bmin[2]/sampleDist);
+ int z1 = (int)ceilf(bmax[2]/sampleDist);
+ samples.resize(0);
+ for (int z = z0; z < z1; ++z)
+ {
+ for (int x = x0; x < x1; ++x)
+ {
+ float pt[3];
+ pt[0] = x*sampleDist;
+ pt[1] = (bmax[1]+bmin[1])*0.5f;
+ pt[2] = z*sampleDist;
+ // Make sure the samples are not too close to the edges.
+ if (distToPoly(nin,in,pt) > -sampleDist/2) continue;
+ samples.push(x);
+ samples.push(getHeight(pt[0], pt[1], pt[2], cs, ics, chf.ch, heightSearchRadius, hp));
+ samples.push(z);
+ samples.push(0); // Not added
+ }
+ }
+
+ // Add the samples starting from the one that has the most
+ // error. The procedure stops when all samples are added
+ // or when the max error is within treshold.
+ const int nsamples = samples.size()/4;
+ for (int iter = 0; iter < nsamples; ++iter)
+ {
+ if (nverts >= MAX_VERTS)
+ break;
+
+ // Find sample with most error.
+ float bestpt[3] = {0,0,0};
+ float bestd = 0;
+ int besti = -1;
+ for (int i = 0; i < nsamples; ++i)
+ {
+ const int* s = &samples[i*4];
+ if (s[3]) continue; // skip added.
+ float pt[3];
+ // The sample location is jittered to get rid of some bad triangulations
+ // which are cause by symmetrical data from the grid structure.
+ pt[0] = s[0]*sampleDist + getJitterX(i)*cs*0.1f;
+ pt[1] = s[1]*chf.ch;
+ pt[2] = s[2]*sampleDist + getJitterY(i)*cs*0.1f;
+ float d = distToTriMesh(pt, verts, nverts, &tris[0], tris.size()/4);
+ if (d < 0) continue; // did not hit the mesh.
+ if (d > bestd)
+ {
+ bestd = d;
+ besti = i;
+ rcVcopy(bestpt,pt);
+ }
+ }
+ // If the max error is within accepted threshold, stop tesselating.
+ if (bestd <= sampleMaxError || besti == -1)
+ break;
+ // Mark sample as added.
+ samples[besti*4+3] = 1;
+ // Add the new sample point.
+ rcVcopy(&verts[nverts*3],bestpt);
+ nverts++;
+
+ // Create new triangulation.
+ // TODO: Incremental add instead of full rebuild.
+ edges.resize(0);
+ tris.resize(0);
+ delaunayHull(ctx, nverts, verts, nhull, hull, tris, edges);
+ }
+ }
+
+ const int ntris = tris.size()/4;
+ if (ntris > MAX_TRIS)
+ {
+ tris.resize(MAX_TRIS*4);
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Shrinking triangle count from %d to max %d.", ntris, MAX_TRIS);
+ }
+
+ return true;
+}
+
+static void seedArrayWithPolyCenter(rcContext* ctx, const rcCompactHeightfield& chf,
+ const unsigned short* poly, const int npoly,
+ const unsigned short* verts, const int bs,
+ rcHeightPatch& hp, rcIntArray& array)
+{
+ // Note: Reads to the compact heightfield are offset by border size (bs)
+ // since border size offset is already removed from the polymesh vertices.
+
+ static const int offset[9*2] =
+ {
+ 0,0, -1,-1, 0,-1, 1,-1, 1,0, 1,1, 0,1, -1,1, -1,0,
+ };
+
+ // Find cell closest to a poly vertex
+ int startCellX = 0, startCellY = 0, startSpanIndex = -1;
+ int dmin = RC_UNSET_HEIGHT;
+ for (int j = 0; j < npoly && dmin > 0; ++j)
+ {
+ for (int k = 0; k < 9 && dmin > 0; ++k)
+ {
+ const int ax = (int)verts[poly[j]*3+0] + offset[k*2+0];
+ const int ay = (int)verts[poly[j]*3+1];
+ const int az = (int)verts[poly[j]*3+2] + offset[k*2+1];
+ if (ax < hp.xmin || ax >= hp.xmin+hp.width ||
+ az < hp.ymin || az >= hp.ymin+hp.height)
+ continue;
+
+ const rcCompactCell& c = chf.cells[(ax+bs)+(az+bs)*chf.width];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni && dmin > 0; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ int d = rcAbs(ay - (int)s.y);
+ if (d < dmin)
+ {
+ startCellX = ax;
+ startCellY = az;
+ startSpanIndex = i;
+ dmin = d;
+ }
+ }
+ }
+ }
+
+ rcAssert(startSpanIndex != -1);
+ // Find center of the polygon
+ int pcx = 0, pcy = 0;
+ for (int j = 0; j < npoly; ++j)
+ {
+ pcx += (int)verts[poly[j]*3+0];
+ pcy += (int)verts[poly[j]*3+2];
+ }
+ pcx /= npoly;
+ pcy /= npoly;
+
+ // Use seeds array as a stack for DFS
+ array.resize(0);
+ array.push(startCellX);
+ array.push(startCellY);
+ array.push(startSpanIndex);
+
+ int dirs[] = { 0, 1, 2, 3 };
+ memset(hp.data, 0, sizeof(unsigned short)*hp.width*hp.height);
+ // DFS to move to the center. Note that we need a DFS here and can not just move
+ // directly towards the center without recording intermediate nodes, even though the polygons
+ // are convex. In very rare we can get stuck due to contour simplification if we do not
+ // record nodes.
+ int cx = -1, cy = -1, ci = -1;
+ while (true)
+ {
+ if (array.size() < 3)
+ {
+ ctx->log(RC_LOG_WARNING, "Walk towards polygon center failed to reach center");
+ break;
+ }
+
+ ci = array.pop();
+ cy = array.pop();
+ cx = array.pop();
+
+ if (cx == pcx && cy == pcy)
+ break;
+
+ // If we are already at the correct X-position, prefer direction
+ // directly towards the center in the Y-axis; otherwise prefer
+ // direction in the X-axis
+ int directDir;
+ if (cx == pcx)
+ directDir = rcGetDirForOffset(0, pcy > cy ? 1 : -1);
+ else
+ directDir = rcGetDirForOffset(pcx > cx ? 1 : -1, 0);
+
+ // Push the direct dir last so we start with this on next iteration
+ rcSwap(dirs[directDir], dirs[3]);
+
+ const rcCompactSpan& cs = chf.spans[ci];
+ for (int i = 0; i < 4; i++)
+ {
+ int dir = dirs[i];
+ if (rcGetCon(cs, dir) == RC_NOT_CONNECTED)
+ continue;
+
+ int newX = cx + rcGetDirOffsetX(dir);
+ int newY = cy + rcGetDirOffsetY(dir);
+
+ int hpx = newX - hp.xmin;
+ int hpy = newY - hp.ymin;
+ if (hpx < 0 || hpx >= hp.width || hpy < 0 || hpy >= hp.height)
+ continue;
+
+ if (hp.data[hpx+hpy*hp.width] != 0)
+ continue;
+
+ hp.data[hpx+hpy*hp.width] = 1;
+ array.push(newX);
+ array.push(newY);
+ array.push((int)chf.cells[(newX+bs)+(newY+bs)*chf.width].index + rcGetCon(cs, dir));
+ }
+
+ rcSwap(dirs[directDir], dirs[3]);
+ }
+
+ array.resize(0);
+ // getHeightData seeds are given in coordinates with borders
+ array.push(cx+bs);
+ array.push(cy+bs);
+ array.push(ci);
+
+ memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height);
+ const rcCompactSpan& cs = chf.spans[ci];
+ hp.data[cx-hp.xmin+(cy-hp.ymin)*hp.width] = cs.y;
+}
+
+
+static void push3(rcIntArray& queue, int v1, int v2, int v3)
+{
+ queue.resize(queue.size() + 3);
+ queue[queue.size() - 3] = v1;
+ queue[queue.size() - 2] = v2;
+ queue[queue.size() - 1] = v3;
+}
+
+static void getHeightData(rcContext* ctx, const rcCompactHeightfield& chf,
+ const unsigned short* poly, const int npoly,
+ const unsigned short* verts, const int bs,
+ rcHeightPatch& hp, rcIntArray& queue,
+ int region)
+{
+ // Note: Reads to the compact heightfield are offset by border size (bs)
+ // since border size offset is already removed from the polymesh vertices.
+
+ queue.resize(0);
+ // Set all heights to RC_UNSET_HEIGHT.
+ memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height);
+
+ bool empty = true;
+
+ // We cannot sample from this poly if it was created from polys
+ // of different regions. If it was then it could potentially be overlapping
+ // with polys of that region and the heights sampled here could be wrong.
+ if (region != RC_MULTIPLE_REGS)
+ {
+ // Copy the height from the same region, and mark region borders
+ // as seed points to fill the rest.
+ for (int hy = 0; hy < hp.height; hy++)
+ {
+ int y = hp.ymin + hy + bs;
+ for (int hx = 0; hx < hp.width; hx++)
+ {
+ int x = hp.xmin + hx + bs;
+ const rcCompactCell& c = chf.cells[x + y*chf.width];
+ for (int i = (int)c.index, ni = (int)(c.index + c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ if (s.reg == region)
+ {
+ // Store height
+ hp.data[hx + hy*hp.width] = s.y;
+ empty = false;
+
+ // If any of the neighbours is not in same region,
+ // add the current location as flood fill start
+ bool border = false;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax + ay*chf.width].index + rcGetCon(s, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (as.reg != region)
+ {
+ border = true;
+ break;
+ }
+ }
+ }
+ if (border)
+ push3(queue, x, y, i);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // if the polygon does not contain any points from the current region (rare, but happens)
+ // or if it could potentially be overlapping polygons of the same region,
+ // then use the center as the seed point.
+ if (empty)
+ seedArrayWithPolyCenter(ctx, chf, poly, npoly, verts, bs, hp, queue);
+
+ static const int RETRACT_SIZE = 256;
+ int head = 0;
+
+ // We assume the seed is centered in the polygon, so a BFS to collect
+ // height data will ensure we do not move onto overlapping polygons and
+ // sample wrong heights.
+ while (head*3 < queue.size())
+ {
+ int cx = queue[head*3+0];
+ int cy = queue[head*3+1];
+ int ci = queue[head*3+2];
+ head++;
+ if (head >= RETRACT_SIZE)
+ {
+ head = 0;
+ if (queue.size() > RETRACT_SIZE*3)
+ memmove(&queue[0], &queue[RETRACT_SIZE*3], sizeof(int)*(queue.size()-RETRACT_SIZE*3));
+ queue.resize(queue.size()-RETRACT_SIZE*3);
+ }
+
+ const rcCompactSpan& cs = chf.spans[ci];
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(cs, dir) == RC_NOT_CONNECTED) continue;
+
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int hx = ax - hp.xmin - bs;
+ const int hy = ay - hp.ymin - bs;
+
+ if ((unsigned int)hx >= (unsigned int)hp.width || (unsigned int)hy >= (unsigned int)hp.height)
+ continue;
+
+ if (hp.data[hx + hy*hp.width] != RC_UNSET_HEIGHT)
+ continue;
+
+ const int ai = (int)chf.cells[ax + ay*chf.width].index + rcGetCon(cs, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+
+ hp.data[hx + hy*hp.width] = as.y;
+
+ push3(queue, ax, ay, ai);
+ }
+ }
+}
+
+static unsigned char getEdgeFlags(const float* va, const float* vb,
+ const float* vpoly, const int npoly)
+{
+ // Return true if edge (va,vb) is part of the polygon.
+ static const float thrSqr = rcSqr(0.001f);
+ for (int i = 0, j = npoly-1; i < npoly; j=i++)
+ {
+ if (distancePtSeg2d(va, &vpoly[j*3], &vpoly[i*3]) < thrSqr &&
+ distancePtSeg2d(vb, &vpoly[j*3], &vpoly[i*3]) < thrSqr)
+ return 1;
+ }
+ return 0;
+}
+
+static unsigned char getTriFlags(const float* va, const float* vb, const float* vc,
+ const float* vpoly, const int npoly)
+{
+ unsigned char flags = 0;
+ flags |= getEdgeFlags(va,vb,vpoly,npoly) << 0;
+ flags |= getEdgeFlags(vb,vc,vpoly,npoly) << 2;
+ flags |= getEdgeFlags(vc,va,vpoly,npoly) << 4;
+ return flags;
+}
+
+/// @par
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// @see rcAllocPolyMeshDetail, rcPolyMesh, rcCompactHeightfield, rcPolyMeshDetail, rcConfig
+bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
+ const float sampleDist, const float sampleMaxError,
+ rcPolyMeshDetail& dmesh)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_POLYMESHDETAIL);
+
+ if (mesh.nverts == 0 || mesh.npolys == 0)
+ return true;
+
+ const int nvp = mesh.nvp;
+ const float cs = mesh.cs;
+ const float ch = mesh.ch;
+ const float* orig = mesh.bmin;
+ const int borderSize = mesh.borderSize;
+ const int heightSearchRadius = rcMax(1, (int)ceilf(mesh.maxEdgeError));
+
+ rcIntArray edges(64);
+ rcIntArray tris(512);
+ rcIntArray arr(512);
+ rcIntArray samples(512);
+ float verts[256*3];
+ rcHeightPatch hp;
+ int nPolyVerts = 0;
+ int maxhw = 0, maxhh = 0;
+
+ rcScopedDelete<int> bounds((int*)rcAlloc(sizeof(int)*mesh.npolys*4, RC_ALLOC_TEMP));
+ if (!bounds)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'bounds' (%d).", mesh.npolys*4);
+ return false;
+ }
+ rcScopedDelete<float> poly((float*)rcAlloc(sizeof(float)*nvp*3, RC_ALLOC_TEMP));
+ if (!poly)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'poly' (%d).", nvp*3);
+ return false;
+ }
+
+ // Find max size for a polygon area.
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ const unsigned short* p = &mesh.polys[i*nvp*2];
+ int& xmin = bounds[i*4+0];
+ int& xmax = bounds[i*4+1];
+ int& ymin = bounds[i*4+2];
+ int& ymax = bounds[i*4+3];
+ xmin = chf.width;
+ xmax = 0;
+ ymin = chf.height;
+ ymax = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if(p[j] == RC_MESH_NULL_IDX) break;
+ const unsigned short* v = &mesh.verts[p[j]*3];
+ xmin = rcMin(xmin, (int)v[0]);
+ xmax = rcMax(xmax, (int)v[0]);
+ ymin = rcMin(ymin, (int)v[2]);
+ ymax = rcMax(ymax, (int)v[2]);
+ nPolyVerts++;
+ }
+ xmin = rcMax(0,xmin-1);
+ xmax = rcMin(chf.width,xmax+1);
+ ymin = rcMax(0,ymin-1);
+ ymax = rcMin(chf.height,ymax+1);
+ if (xmin >= xmax || ymin >= ymax) continue;
+ maxhw = rcMax(maxhw, xmax-xmin);
+ maxhh = rcMax(maxhh, ymax-ymin);
+ }
+
+ hp.data = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxhw*maxhh, RC_ALLOC_TEMP);
+ if (!hp.data)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'hp.data' (%d).", maxhw*maxhh);
+ return false;
+ }
+
+ dmesh.nmeshes = mesh.npolys;
+ dmesh.nverts = 0;
+ dmesh.ntris = 0;
+ dmesh.meshes = (unsigned int*)rcAlloc(sizeof(unsigned int)*dmesh.nmeshes*4, RC_ALLOC_PERM);
+ if (!dmesh.meshes)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.meshes' (%d).", dmesh.nmeshes*4);
+ return false;
+ }
+
+ int vcap = nPolyVerts+nPolyVerts/2;
+ int tcap = vcap*2;
+
+ dmesh.nverts = 0;
+ dmesh.verts = (float*)rcAlloc(sizeof(float)*vcap*3, RC_ALLOC_PERM);
+ if (!dmesh.verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", vcap*3);
+ return false;
+ }
+ dmesh.ntris = 0;
+ dmesh.tris = (unsigned char*)rcAlloc(sizeof(unsigned char)*tcap*4, RC_ALLOC_PERM);
+ if (!dmesh.tris)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", tcap*4);
+ return false;
+ }
+
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ const unsigned short* p = &mesh.polys[i*nvp*2];
+
+ // Store polygon vertices for processing.
+ int npoly = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if(p[j] == RC_MESH_NULL_IDX) break;
+ const unsigned short* v = &mesh.verts[p[j]*3];
+ poly[j*3+0] = v[0]*cs;
+ poly[j*3+1] = v[1]*ch;
+ poly[j*3+2] = v[2]*cs;
+ npoly++;
+ }
+
+ // Get the height data from the area of the polygon.
+ hp.xmin = bounds[i*4+0];
+ hp.ymin = bounds[i*4+2];
+ hp.width = bounds[i*4+1]-bounds[i*4+0];
+ hp.height = bounds[i*4+3]-bounds[i*4+2];
+ getHeightData(ctx, chf, p, npoly, mesh.verts, borderSize, hp, arr, mesh.regs[i]);
+
+ // Build detail mesh.
+ int nverts = 0;
+ if (!buildPolyDetail(ctx, poly, npoly,
+ sampleDist, sampleMaxError,
+ heightSearchRadius, chf, hp,
+ verts, nverts, tris,
+ edges, samples))
+ {
+ return false;
+ }
+
+ // Move detail verts to world space.
+ for (int j = 0; j < nverts; ++j)
+ {
+ verts[j*3+0] += orig[0];
+ verts[j*3+1] += orig[1] + chf.ch; // Is this offset necessary?
+ verts[j*3+2] += orig[2];
+ }
+ // Offset poly too, will be used to flag checking.
+ for (int j = 0; j < npoly; ++j)
+ {
+ poly[j*3+0] += orig[0];
+ poly[j*3+1] += orig[1];
+ poly[j*3+2] += orig[2];
+ }
+
+ // Store detail submesh.
+ const int ntris = tris.size()/4;
+
+ dmesh.meshes[i*4+0] = (unsigned int)dmesh.nverts;
+ dmesh.meshes[i*4+1] = (unsigned int)nverts;
+ dmesh.meshes[i*4+2] = (unsigned int)dmesh.ntris;
+ dmesh.meshes[i*4+3] = (unsigned int)ntris;
+
+ // Store vertices, allocate more memory if necessary.
+ if (dmesh.nverts+nverts > vcap)
+ {
+ while (dmesh.nverts+nverts > vcap)
+ vcap += 256;
+
+ float* newv = (float*)rcAlloc(sizeof(float)*vcap*3, RC_ALLOC_PERM);
+ if (!newv)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newv' (%d).", vcap*3);
+ return false;
+ }
+ if (dmesh.nverts)
+ memcpy(newv, dmesh.verts, sizeof(float)*3*dmesh.nverts);
+ rcFree(dmesh.verts);
+ dmesh.verts = newv;
+ }
+ for (int j = 0; j < nverts; ++j)
+ {
+ dmesh.verts[dmesh.nverts*3+0] = verts[j*3+0];
+ dmesh.verts[dmesh.nverts*3+1] = verts[j*3+1];
+ dmesh.verts[dmesh.nverts*3+2] = verts[j*3+2];
+ dmesh.nverts++;
+ }
+
+ // Store triangles, allocate more memory if necessary.
+ if (dmesh.ntris+ntris > tcap)
+ {
+ while (dmesh.ntris+ntris > tcap)
+ tcap += 256;
+ unsigned char* newt = (unsigned char*)rcAlloc(sizeof(unsigned char)*tcap*4, RC_ALLOC_PERM);
+ if (!newt)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newt' (%d).", tcap*4);
+ return false;
+ }
+ if (dmesh.ntris)
+ memcpy(newt, dmesh.tris, sizeof(unsigned char)*4*dmesh.ntris);
+ rcFree(dmesh.tris);
+ dmesh.tris = newt;
+ }
+ for (int j = 0; j < ntris; ++j)
+ {
+ const int* t = &tris[j*4];
+ dmesh.tris[dmesh.ntris*4+0] = (unsigned char)t[0];
+ dmesh.tris[dmesh.ntris*4+1] = (unsigned char)t[1];
+ dmesh.tris[dmesh.ntris*4+2] = (unsigned char)t[2];
+ dmesh.tris[dmesh.ntris*4+3] = getTriFlags(&verts[t[0]*3], &verts[t[1]*3], &verts[t[2]*3], poly, npoly);
+ dmesh.ntris++;
+ }
+ }
+
+ return true;
+}
+
+/// @see rcAllocPolyMeshDetail, rcPolyMeshDetail
+bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_MERGE_POLYMESHDETAIL);
+
+ int maxVerts = 0;
+ int maxTris = 0;
+ int maxMeshes = 0;
+
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ if (!meshes[i]) continue;
+ maxVerts += meshes[i]->nverts;
+ maxTris += meshes[i]->ntris;
+ maxMeshes += meshes[i]->nmeshes;
+ }
+
+ mesh.nmeshes = 0;
+ mesh.meshes = (unsigned int*)rcAlloc(sizeof(unsigned int)*maxMeshes*4, RC_ALLOC_PERM);
+ if (!mesh.meshes)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'pmdtl.meshes' (%d).", maxMeshes*4);
+ return false;
+ }
+
+ mesh.ntris = 0;
+ mesh.tris = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxTris*4, RC_ALLOC_PERM);
+ if (!mesh.tris)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", maxTris*4);
+ return false;
+ }
+
+ mesh.nverts = 0;
+ mesh.verts = (float*)rcAlloc(sizeof(float)*maxVerts*3, RC_ALLOC_PERM);
+ if (!mesh.verts)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", maxVerts*3);
+ return false;
+ }
+
+ // Merge datas.
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ rcPolyMeshDetail* dm = meshes[i];
+ if (!dm) continue;
+ for (int j = 0; j < dm->nmeshes; ++j)
+ {
+ unsigned int* dst = &mesh.meshes[mesh.nmeshes*4];
+ unsigned int* src = &dm->meshes[j*4];
+ dst[0] = (unsigned int)mesh.nverts+src[0];
+ dst[1] = src[1];
+ dst[2] = (unsigned int)mesh.ntris+src[2];
+ dst[3] = src[3];
+ mesh.nmeshes++;
+ }
+
+ for (int k = 0; k < dm->nverts; ++k)
+ {
+ rcVcopy(&mesh.verts[mesh.nverts*3], &dm->verts[k*3]);
+ mesh.nverts++;
+ }
+ for (int k = 0; k < dm->ntris; ++k)
+ {
+ mesh.tris[mesh.ntris*4+0] = dm->tris[k*4+0];
+ mesh.tris[mesh.ntris*4+1] = dm->tris[k*4+1];
+ mesh.tris[mesh.ntris*4+2] = dm->tris[k*4+2];
+ mesh.tris[mesh.ntris*4+3] = dm->tris[k*4+3];
+ mesh.ntris++;
+ }
+ }
+
+ return true;
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastRasterization.cpp b/thirdparty/recastnavigation/Recast/Source/RecastRasterization.cpp
new file mode 100644
index 0000000000..a4cef74909
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastRasterization.cpp
@@ -0,0 +1,454 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+
+inline bool overlapBounds(const float* amin, const float* amax, const float* bmin, const float* bmax)
+{
+ bool overlap = true;
+ overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
+ overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
+ overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
+ return overlap;
+}
+
+inline bool overlapInterval(unsigned short amin, unsigned short amax,
+ unsigned short bmin, unsigned short bmax)
+{
+ if (amax < bmin) return false;
+ if (amin > bmax) return false;
+ return true;
+}
+
+
+static rcSpan* allocSpan(rcHeightfield& hf)
+{
+ // If running out of memory, allocate new page and update the freelist.
+ if (!hf.freelist || !hf.freelist->next)
+ {
+ // Create new page.
+ // Allocate memory for the new pool.
+ rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM);
+ if (!pool) return 0;
+
+ // Add the pool into the list of pools.
+ pool->next = hf.pools;
+ hf.pools = pool;
+ // Add new items to the free list.
+ rcSpan* freelist = hf.freelist;
+ rcSpan* head = &pool->items[0];
+ rcSpan* it = &pool->items[RC_SPANS_PER_POOL];
+ do
+ {
+ --it;
+ it->next = freelist;
+ freelist = it;
+ }
+ while (it != head);
+ hf.freelist = it;
+ }
+
+ // Pop item from in front of the free list.
+ rcSpan* it = hf.freelist;
+ hf.freelist = hf.freelist->next;
+ return it;
+}
+
+static void freeSpan(rcHeightfield& hf, rcSpan* ptr)
+{
+ if (!ptr) return;
+ // Add the node in front of the free list.
+ ptr->next = hf.freelist;
+ hf.freelist = ptr;
+}
+
+static bool addSpan(rcHeightfield& hf, const int x, const int y,
+ const unsigned short smin, const unsigned short smax,
+ const unsigned char area, const int flagMergeThr)
+{
+
+ int idx = x + y*hf.width;
+
+ rcSpan* s = allocSpan(hf);
+ if (!s)
+ return false;
+ s->smin = smin;
+ s->smax = smax;
+ s->area = area;
+ s->next = 0;
+
+ // Empty cell, add the first span.
+ if (!hf.spans[idx])
+ {
+ hf.spans[idx] = s;
+ return true;
+ }
+ rcSpan* prev = 0;
+ rcSpan* cur = hf.spans[idx];
+
+ // Insert and merge spans.
+ while (cur)
+ {
+ if (cur->smin > s->smax)
+ {
+ // Current span is further than the new span, break.
+ break;
+ }
+ else if (cur->smax < s->smin)
+ {
+ // Current span is before the new span advance.
+ prev = cur;
+ cur = cur->next;
+ }
+ else
+ {
+ // Merge spans.
+ if (cur->smin < s->smin)
+ s->smin = cur->smin;
+ if (cur->smax > s->smax)
+ s->smax = cur->smax;
+
+ // Merge flags.
+ if (rcAbs((int)s->smax - (int)cur->smax) <= flagMergeThr)
+ s->area = rcMax(s->area, cur->area);
+
+ // Remove current span.
+ rcSpan* next = cur->next;
+ freeSpan(hf, cur);
+ if (prev)
+ prev->next = next;
+ else
+ hf.spans[idx] = next;
+ cur = next;
+ }
+ }
+
+ // Insert new span.
+ if (prev)
+ {
+ s->next = prev->next;
+ prev->next = s;
+ }
+ else
+ {
+ s->next = hf.spans[idx];
+ hf.spans[idx] = s;
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// The span addition can be set to favor flags. If the span is merged to
+/// another span and the new @p smax is within @p flagMergeThr units
+/// from the existing span, the span flags are merged.
+///
+/// @see rcHeightfield, rcSpan.
+bool rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y,
+ const unsigned short smin, const unsigned short smax,
+ const unsigned char area, const int flagMergeThr)
+{
+ rcAssert(ctx);
+
+ if (!addSpan(hf, x, y, smin, smax, area, flagMergeThr))
+ {
+ ctx->log(RC_LOG_ERROR, "rcAddSpan: Out of memory.");
+ return false;
+ }
+
+ return true;
+}
+
+// divides a convex polygons into two convex polygons on both sides of a line
+static void dividePoly(const float* in, int nin,
+ float* out1, int* nout1,
+ float* out2, int* nout2,
+ float x, int axis)
+{
+ float d[12];
+ for (int i = 0; i < nin; ++i)
+ d[i] = x - in[i*3+axis];
+
+ int m = 0, n = 0;
+ for (int i = 0, j = nin-1; i < nin; j=i, ++i)
+ {
+ bool ina = d[j] >= 0;
+ bool inb = d[i] >= 0;
+ if (ina != inb)
+ {
+ float s = d[j] / (d[j] - d[i]);
+ out1[m*3+0] = in[j*3+0] + (in[i*3+0] - in[j*3+0])*s;
+ out1[m*3+1] = in[j*3+1] + (in[i*3+1] - in[j*3+1])*s;
+ out1[m*3+2] = in[j*3+2] + (in[i*3+2] - in[j*3+2])*s;
+ rcVcopy(out2 + n*3, out1 + m*3);
+ m++;
+ n++;
+ // add the i'th point to the right polygon. Do NOT add points that are on the dividing line
+ // since these were already added above
+ if (d[i] > 0)
+ {
+ rcVcopy(out1 + m*3, in + i*3);
+ m++;
+ }
+ else if (d[i] < 0)
+ {
+ rcVcopy(out2 + n*3, in + i*3);
+ n++;
+ }
+ }
+ else // same side
+ {
+ // add the i'th point to the right polygon. Addition is done even for points on the dividing line
+ if (d[i] >= 0)
+ {
+ rcVcopy(out1 + m*3, in + i*3);
+ m++;
+ if (d[i] != 0)
+ continue;
+ }
+ rcVcopy(out2 + n*3, in + i*3);
+ n++;
+ }
+ }
+
+ *nout1 = m;
+ *nout2 = n;
+}
+
+
+
+static bool rasterizeTri(const float* v0, const float* v1, const float* v2,
+ const unsigned char area, rcHeightfield& hf,
+ const float* bmin, const float* bmax,
+ const float cs, const float ics, const float ich,
+ const int flagMergeThr)
+{
+ const int w = hf.width;
+ const int h = hf.height;
+ float tmin[3], tmax[3];
+ const float by = bmax[1] - bmin[1];
+
+ // Calculate the bounding box of the triangle.
+ rcVcopy(tmin, v0);
+ rcVcopy(tmax, v0);
+ rcVmin(tmin, v1);
+ rcVmin(tmin, v2);
+ rcVmax(tmax, v1);
+ rcVmax(tmax, v2);
+
+ // If the triangle does not touch the bbox of the heightfield, skip the triagle.
+ if (!overlapBounds(bmin, bmax, tmin, tmax))
+ return true;
+
+ // Calculate the footprint of the triangle on the grid's y-axis
+ int y0 = (int)((tmin[2] - bmin[2])*ics);
+ int y1 = (int)((tmax[2] - bmin[2])*ics);
+ y0 = rcClamp(y0, 0, h-1);
+ y1 = rcClamp(y1, 0, h-1);
+
+ // Clip the triangle into all grid cells it touches.
+ float buf[7*3*4];
+ float *in = buf, *inrow = buf+7*3, *p1 = inrow+7*3, *p2 = p1+7*3;
+
+ rcVcopy(&in[0], v0);
+ rcVcopy(&in[1*3], v1);
+ rcVcopy(&in[2*3], v2);
+ int nvrow, nvIn = 3;
+
+ for (int y = y0; y <= y1; ++y)
+ {
+ // Clip polygon to row. Store the remaining polygon as well
+ const float cz = bmin[2] + y*cs;
+ dividePoly(in, nvIn, inrow, &nvrow, p1, &nvIn, cz+cs, 2);
+ rcSwap(in, p1);
+ if (nvrow < 3) continue;
+
+ // find the horizontal bounds in the row
+ float minX = inrow[0], maxX = inrow[0];
+ for (int i=1; i<nvrow; ++i)
+ {
+ if (minX > inrow[i*3]) minX = inrow[i*3];
+ if (maxX < inrow[i*3]) maxX = inrow[i*3];
+ }
+ int x0 = (int)((minX - bmin[0])*ics);
+ int x1 = (int)((maxX - bmin[0])*ics);
+ x0 = rcClamp(x0, 0, w-1);
+ x1 = rcClamp(x1, 0, w-1);
+
+ int nv, nv2 = nvrow;
+
+ for (int x = x0; x <= x1; ++x)
+ {
+ // Clip polygon to column. store the remaining polygon as well
+ const float cx = bmin[0] + x*cs;
+ dividePoly(inrow, nv2, p1, &nv, p2, &nv2, cx+cs, 0);
+ rcSwap(inrow, p2);
+ if (nv < 3) continue;
+
+ // Calculate min and max of the span.
+ float smin = p1[1], smax = p1[1];
+ for (int i = 1; i < nv; ++i)
+ {
+ smin = rcMin(smin, p1[i*3+1]);
+ smax = rcMax(smax, p1[i*3+1]);
+ }
+ smin -= bmin[1];
+ smax -= bmin[1];
+ // Skip the span if it is outside the heightfield bbox
+ if (smax < 0.0f) continue;
+ if (smin > by) continue;
+ // Clamp the span to the heightfield bbox.
+ if (smin < 0.0f) smin = 0;
+ if (smax > by) smax = by;
+
+ // Snap the span to the heightfield height grid.
+ unsigned short ismin = (unsigned short)rcClamp((int)floorf(smin * ich), 0, RC_SPAN_MAX_HEIGHT);
+ unsigned short ismax = (unsigned short)rcClamp((int)ceilf(smax * ich), (int)ismin+1, RC_SPAN_MAX_HEIGHT);
+
+ if (!addSpan(hf, x, y, ismin, ismax, area, flagMergeThr))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// No spans will be added if the triangle does not overlap the heightfield grid.
+///
+/// @see rcHeightfield
+bool rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2,
+ const unsigned char area, rcHeightfield& solid,
+ const int flagMergeThr)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES);
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ if (!rasterizeTri(v0, v1, v2, area, solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr))
+ {
+ ctx->log(RC_LOG_ERROR, "rcRasterizeTriangle: Out of memory.");
+ return false;
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// Spans will only be added for triangles that overlap the heightfield grid.
+///
+/// @see rcHeightfield
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int /*nv*/,
+ const int* tris, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES);
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ // Rasterize triangles.
+ for (int i = 0; i < nt; ++i)
+ {
+ const float* v0 = &verts[tris[i*3+0]*3];
+ const float* v1 = &verts[tris[i*3+1]*3];
+ const float* v2 = &verts[tris[i*3+2]*3];
+ // Rasterize.
+ if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr))
+ {
+ ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory.");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// Spans will only be added for triangles that overlap the heightfield grid.
+///
+/// @see rcHeightfield
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int /*nv*/,
+ const unsigned short* tris, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES);
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ // Rasterize triangles.
+ for (int i = 0; i < nt; ++i)
+ {
+ const float* v0 = &verts[tris[i*3+0]*3];
+ const float* v1 = &verts[tris[i*3+1]*3];
+ const float* v2 = &verts[tris[i*3+2]*3];
+ // Rasterize.
+ if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr))
+ {
+ ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory.");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/// @par
+///
+/// Spans will only be added for triangles that overlap the heightfield grid.
+///
+/// @see rcHeightfield
+bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const unsigned char* areas, const int nt,
+ rcHeightfield& solid, const int flagMergeThr)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES);
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ // Rasterize triangles.
+ for (int i = 0; i < nt; ++i)
+ {
+ const float* v0 = &verts[(i*3+0)*3];
+ const float* v1 = &verts[(i*3+1)*3];
+ const float* v2 = &verts[(i*3+2)*3];
+ // Rasterize.
+ if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr))
+ {
+ ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory.");
+ return false;
+ }
+ }
+
+ return true;
+}
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp b/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp
new file mode 100644
index 0000000000..38a2bd6bfa
--- /dev/null
+++ b/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp
@@ -0,0 +1,1824 @@
+//
+// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastAlloc.h"
+#include "RecastAssert.h"
+#include <new>
+
+
+static void calculateDistanceField(rcCompactHeightfield& chf, unsigned short* src, unsigned short& maxDist)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ // Init distance and points.
+ for (int i = 0; i < chf.spanCount; ++i)
+ src[i] = 0xffff;
+
+ // Mark boundary cells.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ const unsigned char area = chf.areas[i];
+
+ int nc = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ if (area == chf.areas[ai])
+ nc++;
+ }
+ }
+ if (nc != 4)
+ src[i] = 0;
+ }
+ }
+ }
+
+
+ // Pass 1
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 0) != RC_NOT_CONNECTED)
+ {
+ // (-1,0)
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (-1,-1)
+ if (rcGetCon(as, 3) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(3);
+ const int aay = ay + rcGetDirOffsetY(3);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 3);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ if (rcGetCon(s, 3) != RC_NOT_CONNECTED)
+ {
+ // (0,-1)
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (1,-1)
+ if (rcGetCon(as, 2) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(2);
+ const int aay = ay + rcGetDirOffsetY(2);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 2);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ }
+ }
+ }
+
+ // Pass 2
+ for (int y = h-1; y >= 0; --y)
+ {
+ for (int x = w-1; x >= 0; --x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 2) != RC_NOT_CONNECTED)
+ {
+ // (1,0)
+ const int ax = x + rcGetDirOffsetX(2);
+ const int ay = y + rcGetDirOffsetY(2);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 2);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (1,1)
+ if (rcGetCon(as, 1) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(1);
+ const int aay = ay + rcGetDirOffsetY(1);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 1);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ if (rcGetCon(s, 1) != RC_NOT_CONNECTED)
+ {
+ // (0,1)
+ const int ax = x + rcGetDirOffsetX(1);
+ const int ay = y + rcGetDirOffsetY(1);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 1);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (-1,1)
+ if (rcGetCon(as, 0) != RC_NOT_CONNECTED)
+ {
+ const int aax = ax + rcGetDirOffsetX(0);
+ const int aay = ay + rcGetDirOffsetY(0);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 0);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ }
+ }
+ }
+
+ maxDist = 0;
+ for (int i = 0; i < chf.spanCount; ++i)
+ maxDist = rcMax(src[i], maxDist);
+
+}
+
+static unsigned short* boxBlur(rcCompactHeightfield& chf, int thr,
+ unsigned short* src, unsigned short* dst)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ thr *= 2;
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ const unsigned short cd = src[i];
+ if (cd <= thr)
+ {
+ dst[i] = cd;
+ continue;
+ }
+
+ int d = (int)cd;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ d += (int)src[ai];
+
+ const rcCompactSpan& as = chf.spans[ai];
+ const int dir2 = (dir+1) & 0x3;
+ if (rcGetCon(as, dir2) != RC_NOT_CONNECTED)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir2);
+ const int ay2 = ay + rcGetDirOffsetY(dir2);
+ const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2);
+ d += (int)src[ai2];
+ }
+ else
+ {
+ d += cd;
+ }
+ }
+ else
+ {
+ d += cd*2;
+ }
+ }
+ dst[i] = (unsigned short)((d+5)/9);
+ }
+ }
+ }
+ return dst;
+}
+
+
+static bool floodRegion(int x, int y, int i,
+ unsigned short level, unsigned short r,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg, unsigned short* srcDist,
+ rcIntArray& stack)
+{
+ const int w = chf.width;
+
+ const unsigned char area = chf.areas[i];
+
+ // Flood fill mark region.
+ stack.resize(0);
+ stack.push((int)x);
+ stack.push((int)y);
+ stack.push((int)i);
+ srcReg[i] = r;
+ srcDist[i] = 0;
+
+ unsigned short lev = level >= 2 ? level-2 : 0;
+ int count = 0;
+
+ while (stack.size() > 0)
+ {
+ int ci = stack.pop();
+ int cy = stack.pop();
+ int cx = stack.pop();
+
+ const rcCompactSpan& cs = chf.spans[ci];
+
+ // Check if any of the neighbours already have a valid region set.
+ unsigned short ar = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ // 8 connected
+ if (rcGetCon(cs, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir);
+ if (chf.areas[ai] != area)
+ continue;
+ unsigned short nr = srcReg[ai];
+ if (nr & RC_BORDER_REG) // Do not take borders into account.
+ continue;
+ if (nr != 0 && nr != r)
+ {
+ ar = nr;
+ break;
+ }
+
+ const rcCompactSpan& as = chf.spans[ai];
+
+ const int dir2 = (dir+1) & 0x3;
+ if (rcGetCon(as, dir2) != RC_NOT_CONNECTED)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir2);
+ const int ay2 = ay + rcGetDirOffsetY(dir2);
+ const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2);
+ if (chf.areas[ai2] != area)
+ continue;
+ unsigned short nr2 = srcReg[ai2];
+ if (nr2 != 0 && nr2 != r)
+ {
+ ar = nr2;
+ break;
+ }
+ }
+ }
+ }
+ if (ar != 0)
+ {
+ srcReg[ci] = 0;
+ continue;
+ }
+
+ count++;
+
+ // Expand neighbours.
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(cs, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir);
+ if (chf.areas[ai] != area)
+ continue;
+ if (chf.dist[ai] >= lev && srcReg[ai] == 0)
+ {
+ srcReg[ai] = r;
+ srcDist[ai] = 0;
+ stack.push(ax);
+ stack.push(ay);
+ stack.push(ai);
+ }
+ }
+ }
+ }
+
+ return count > 0;
+}
+
+static unsigned short* expandRegions(int maxIter, unsigned short level,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg, unsigned short* srcDist,
+ unsigned short* dstReg, unsigned short* dstDist,
+ rcIntArray& stack,
+ bool fillStack)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ if (fillStack)
+ {
+ // Find cells revealed by the raised level.
+ stack.resize(0);
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.dist[i] >= level && srcReg[i] == 0 && chf.areas[i] != RC_NULL_AREA)
+ {
+ stack.push(x);
+ stack.push(y);
+ stack.push(i);
+ }
+ }
+ }
+ }
+ }
+ else // use cells in the input stack
+ {
+ // mark all cells which already have a region
+ for (int j=0; j<stack.size(); j+=3)
+ {
+ int i = stack[j+2];
+ if (srcReg[i] != 0)
+ stack[j+2] = -1;
+ }
+ }
+
+ int iter = 0;
+ while (stack.size() > 0)
+ {
+ int failed = 0;
+
+ memcpy(dstReg, srcReg, sizeof(unsigned short)*chf.spanCount);
+ memcpy(dstDist, srcDist, sizeof(unsigned short)*chf.spanCount);
+
+ for (int j = 0; j < stack.size(); j += 3)
+ {
+ int x = stack[j+0];
+ int y = stack[j+1];
+ int i = stack[j+2];
+ if (i < 0)
+ {
+ failed++;
+ continue;
+ }
+
+ unsigned short r = srcReg[i];
+ unsigned short d2 = 0xffff;
+ const unsigned char area = chf.areas[i];
+ const rcCompactSpan& s = chf.spans[i];
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) == RC_NOT_CONNECTED) continue;
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ if (chf.areas[ai] != area) continue;
+ if (srcReg[ai] > 0 && (srcReg[ai] & RC_BORDER_REG) == 0)
+ {
+ if ((int)srcDist[ai]+2 < (int)d2)
+ {
+ r = srcReg[ai];
+ d2 = srcDist[ai]+2;
+ }
+ }
+ }
+ if (r)
+ {
+ stack[j+2] = -1; // mark as used
+ dstReg[i] = r;
+ dstDist[i] = d2;
+ }
+ else
+ {
+ failed++;
+ }
+ }
+
+ // rcSwap source and dest.
+ rcSwap(srcReg, dstReg);
+ rcSwap(srcDist, dstDist);
+
+ if (failed*3 == stack.size())
+ break;
+
+ if (level > 0)
+ {
+ ++iter;
+ if (iter >= maxIter)
+ break;
+ }
+ }
+
+ return srcReg;
+}
+
+
+
+static void sortCellsByLevel(unsigned short startLevel,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg,
+ unsigned int nbStacks, rcIntArray* stacks,
+ unsigned short loglevelsPerStack) // the levels per stack (2 in our case) as a bit shift
+{
+ const int w = chf.width;
+ const int h = chf.height;
+ startLevel = startLevel >> loglevelsPerStack;
+
+ for (unsigned int j=0; j<nbStacks; ++j)
+ stacks[j].resize(0);
+
+ // put all cells in the level range into the appropriate stacks
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.areas[i] == RC_NULL_AREA || srcReg[i] != 0)
+ continue;
+
+ int level = chf.dist[i] >> loglevelsPerStack;
+ int sId = startLevel - level;
+ if (sId >= (int)nbStacks)
+ continue;
+ if (sId < 0)
+ sId = 0;
+
+ stacks[sId].push(x);
+ stacks[sId].push(y);
+ stacks[sId].push(i);
+ }
+ }
+ }
+}
+
+
+static void appendStacks(rcIntArray& srcStack, rcIntArray& dstStack,
+ unsigned short* srcReg)
+{
+ for (int j=0; j<srcStack.size(); j+=3)
+ {
+ int i = srcStack[j+2];
+ if ((i < 0) || (srcReg[i] != 0))
+ continue;
+ dstStack.push(srcStack[j]);
+ dstStack.push(srcStack[j+1]);
+ dstStack.push(srcStack[j+2]);
+ }
+}
+
+struct rcRegion
+{
+ inline rcRegion(unsigned short i) :
+ spanCount(0),
+ id(i),
+ areaType(0),
+ remap(false),
+ visited(false),
+ overlap(false),
+ connectsToBorder(false),
+ ymin(0xffff),
+ ymax(0)
+ {}
+
+ int spanCount; // Number of spans belonging to this region
+ unsigned short id; // ID of the region
+ unsigned char areaType; // Are type.
+ bool remap;
+ bool visited;
+ bool overlap;
+ bool connectsToBorder;
+ unsigned short ymin, ymax;
+ rcIntArray connections;
+ rcIntArray floors;
+};
+
+static void removeAdjacentNeighbours(rcRegion& reg)
+{
+ // Remove adjacent duplicates.
+ for (int i = 0; i < reg.connections.size() && reg.connections.size() > 1; )
+ {
+ int ni = (i+1) % reg.connections.size();
+ if (reg.connections[i] == reg.connections[ni])
+ {
+ // Remove duplicate
+ for (int j = i; j < reg.connections.size()-1; ++j)
+ reg.connections[j] = reg.connections[j+1];
+ reg.connections.pop();
+ }
+ else
+ ++i;
+ }
+}
+
+static void replaceNeighbour(rcRegion& reg, unsigned short oldId, unsigned short newId)
+{
+ bool neiChanged = false;
+ for (int i = 0; i < reg.connections.size(); ++i)
+ {
+ if (reg.connections[i] == oldId)
+ {
+ reg.connections[i] = newId;
+ neiChanged = true;
+ }
+ }
+ for (int i = 0; i < reg.floors.size(); ++i)
+ {
+ if (reg.floors[i] == oldId)
+ reg.floors[i] = newId;
+ }
+ if (neiChanged)
+ removeAdjacentNeighbours(reg);
+}
+
+static bool canMergeWithRegion(const rcRegion& rega, const rcRegion& regb)
+{
+ if (rega.areaType != regb.areaType)
+ return false;
+ int n = 0;
+ for (int i = 0; i < rega.connections.size(); ++i)
+ {
+ if (rega.connections[i] == regb.id)
+ n++;
+ }
+ if (n > 1)
+ return false;
+ for (int i = 0; i < rega.floors.size(); ++i)
+ {
+ if (rega.floors[i] == regb.id)
+ return false;
+ }
+ return true;
+}
+
+static void addUniqueFloorRegion(rcRegion& reg, int n)
+{
+ for (int i = 0; i < reg.floors.size(); ++i)
+ if (reg.floors[i] == n)
+ return;
+ reg.floors.push(n);
+}
+
+static bool mergeRegions(rcRegion& rega, rcRegion& regb)
+{
+ unsigned short aid = rega.id;
+ unsigned short bid = regb.id;
+
+ // Duplicate current neighbourhood.
+ rcIntArray acon;
+ acon.resize(rega.connections.size());
+ for (int i = 0; i < rega.connections.size(); ++i)
+ acon[i] = rega.connections[i];
+ rcIntArray& bcon = regb.connections;
+
+ // Find insertion point on A.
+ int insa = -1;
+ for (int i = 0; i < acon.size(); ++i)
+ {
+ if (acon[i] == bid)
+ {
+ insa = i;
+ break;
+ }
+ }
+ if (insa == -1)
+ return false;
+
+ // Find insertion point on B.
+ int insb = -1;
+ for (int i = 0; i < bcon.size(); ++i)
+ {
+ if (bcon[i] == aid)
+ {
+ insb = i;
+ break;
+ }
+ }
+ if (insb == -1)
+ return false;
+
+ // Merge neighbours.
+ rega.connections.resize(0);
+ for (int i = 0, ni = acon.size(); i < ni-1; ++i)
+ rega.connections.push(acon[(insa+1+i) % ni]);
+
+ for (int i = 0, ni = bcon.size(); i < ni-1; ++i)
+ rega.connections.push(bcon[(insb+1+i) % ni]);
+
+ removeAdjacentNeighbours(rega);
+
+ for (int j = 0; j < regb.floors.size(); ++j)
+ addUniqueFloorRegion(rega, regb.floors[j]);
+ rega.spanCount += regb.spanCount;
+ regb.spanCount = 0;
+ regb.connections.resize(0);
+
+ return true;
+}
+
+static bool isRegionConnectedToBorder(const rcRegion& reg)
+{
+ // Region is connected to border if
+ // one of the neighbours is null id.
+ for (int i = 0; i < reg.connections.size(); ++i)
+ {
+ if (reg.connections[i] == 0)
+ return true;
+ }
+ return false;
+}
+
+static bool isSolidEdge(rcCompactHeightfield& chf, unsigned short* srcReg,
+ int x, int y, int i, int dir)
+{
+ const rcCompactSpan& s = chf.spans[i];
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ r = srcReg[ai];
+ }
+ if (r == srcReg[i])
+ return false;
+ return true;
+}
+
+static void walkContour(int x, int y, int i, int dir,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg,
+ rcIntArray& cont)
+{
+ int startDir = dir;
+ int starti = i;
+
+ const rcCompactSpan& ss = chf.spans[i];
+ unsigned short curReg = 0;
+ if (rcGetCon(ss, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(ss, dir);
+ curReg = srcReg[ai];
+ }
+ cont.push(curReg);
+
+ int iter = 0;
+ while (++iter < 40000)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (isSolidEdge(chf, srcReg, x, y, i, dir))
+ {
+ // Choose the edge corner
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ r = srcReg[ai];
+ }
+ if (r != curReg)
+ {
+ curReg = r;
+ cont.push(curReg);
+ }
+
+ dir = (dir+1) & 0x3; // Rotate CW
+ }
+ else
+ {
+ int ni = -1;
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const rcCompactCell& nc = chf.cells[nx+ny*chf.width];
+ ni = (int)nc.index + rcGetCon(s, dir);
+ }
+ if (ni == -1)
+ {
+ // Should not happen.
+ return;
+ }
+ x = nx;
+ y = ny;
+ i = ni;
+ dir = (dir+3) & 0x3; // Rotate CCW
+ }
+
+ if (starti == i && startDir == dir)
+ {
+ break;
+ }
+ }
+
+ // Remove adjacent duplicates.
+ if (cont.size() > 1)
+ {
+ for (int j = 0; j < cont.size(); )
+ {
+ int nj = (j+1) % cont.size();
+ if (cont[j] == cont[nj])
+ {
+ for (int k = j; k < cont.size()-1; ++k)
+ cont[k] = cont[k+1];
+ cont.pop();
+ }
+ else
+ ++j;
+ }
+ }
+}
+
+
+static bool mergeAndFilterRegions(rcContext* ctx, int minRegionArea, int mergeRegionSize,
+ unsigned short& maxRegionId,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg, rcIntArray& overlaps)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ const int nreg = maxRegionId+1;
+ rcRegion* regions = (rcRegion*)rcAlloc(sizeof(rcRegion)*nreg, RC_ALLOC_TEMP);
+ if (!regions)
+ {
+ ctx->log(RC_LOG_ERROR, "mergeAndFilterRegions: Out of memory 'regions' (%d).", nreg);
+ return false;
+ }
+
+ // Construct regions
+ for (int i = 0; i < nreg; ++i)
+ new(&regions[i]) rcRegion((unsigned short)i);
+
+ // Find edge of a region and find connections around the contour.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ unsigned short r = srcReg[i];
+ if (r == 0 || r >= nreg)
+ continue;
+
+ rcRegion& reg = regions[r];
+ reg.spanCount++;
+
+ // Update floors.
+ for (int j = (int)c.index; j < ni; ++j)
+ {
+ if (i == j) continue;
+ unsigned short floorId = srcReg[j];
+ if (floorId == 0 || floorId >= nreg)
+ continue;
+ if (floorId == r)
+ reg.overlap = true;
+ addUniqueFloorRegion(reg, floorId);
+ }
+
+ // Have found contour
+ if (reg.connections.size() > 0)
+ continue;
+
+ reg.areaType = chf.areas[i];
+
+ // Check if this cell is next to a border.
+ int ndir = -1;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (isSolidEdge(chf, srcReg, x, y, i, dir))
+ {
+ ndir = dir;
+ break;
+ }
+ }
+
+ if (ndir != -1)
+ {
+ // The cell is at border.
+ // Walk around the contour to find all the neighbours.
+ walkContour(x, y, i, ndir, chf, srcReg, reg.connections);
+ }
+ }
+ }
+ }
+
+ // Remove too small regions.
+ rcIntArray stack(32);
+ rcIntArray trace(32);
+ for (int i = 0; i < nreg; ++i)
+ {
+ rcRegion& reg = regions[i];
+ if (reg.id == 0 || (reg.id & RC_BORDER_REG))
+ continue;
+ if (reg.spanCount == 0)
+ continue;
+ if (reg.visited)
+ continue;
+
+ // Count the total size of all the connected regions.
+ // Also keep track of the regions connects to a tile border.
+ bool connectsToBorder = false;
+ int spanCount = 0;
+ stack.resize(0);
+ trace.resize(0);
+
+ reg.visited = true;
+ stack.push(i);
+
+ while (stack.size())
+ {
+ // Pop
+ int ri = stack.pop();
+
+ rcRegion& creg = regions[ri];
+
+ spanCount += creg.spanCount;
+ trace.push(ri);
+
+ for (int j = 0; j < creg.connections.size(); ++j)
+ {
+ if (creg.connections[j] & RC_BORDER_REG)
+ {
+ connectsToBorder = true;
+ continue;
+ }
+ rcRegion& neireg = regions[creg.connections[j]];
+ if (neireg.visited)
+ continue;
+ if (neireg.id == 0 || (neireg.id & RC_BORDER_REG))
+ continue;
+ // Visit
+ stack.push(neireg.id);
+ neireg.visited = true;
+ }
+ }
+
+ // If the accumulated regions size is too small, remove it.
+ // Do not remove areas which connect to tile borders
+ // as their size cannot be estimated correctly and removing them
+ // can potentially remove necessary areas.
+ if (spanCount < minRegionArea && !connectsToBorder)
+ {
+ // Kill all visited regions.
+ for (int j = 0; j < trace.size(); ++j)
+ {
+ regions[trace[j]].spanCount = 0;
+ regions[trace[j]].id = 0;
+ }
+ }
+ }
+
+ // Merge too small regions to neighbour regions.
+ int mergeCount = 0 ;
+ do
+ {
+ mergeCount = 0;
+ for (int i = 0; i < nreg; ++i)
+ {
+ rcRegion& reg = regions[i];
+ if (reg.id == 0 || (reg.id & RC_BORDER_REG))
+ continue;
+ if (reg.overlap)
+ continue;
+ if (reg.spanCount == 0)
+ continue;
+
+ // Check to see if the region should be merged.
+ if (reg.spanCount > mergeRegionSize && isRegionConnectedToBorder(reg))
+ continue;
+
+ // Small region with more than 1 connection.
+ // Or region which is not connected to a border at all.
+ // Find smallest neighbour region that connects to this one.
+ int smallest = 0xfffffff;
+ unsigned short mergeId = reg.id;
+ for (int j = 0; j < reg.connections.size(); ++j)
+ {
+ if (reg.connections[j] & RC_BORDER_REG) continue;
+ rcRegion& mreg = regions[reg.connections[j]];
+ if (mreg.id == 0 || (mreg.id & RC_BORDER_REG) || mreg.overlap) continue;
+ if (mreg.spanCount < smallest &&
+ canMergeWithRegion(reg, mreg) &&
+ canMergeWithRegion(mreg, reg))
+ {
+ smallest = mreg.spanCount;
+ mergeId = mreg.id;
+ }
+ }
+ // Found new id.
+ if (mergeId != reg.id)
+ {
+ unsigned short oldId = reg.id;
+ rcRegion& target = regions[mergeId];
+
+ // Merge neighbours.
+ if (mergeRegions(target, reg))
+ {
+ // Fixup regions pointing to current region.
+ for (int j = 0; j < nreg; ++j)
+ {
+ if (regions[j].id == 0 || (regions[j].id & RC_BORDER_REG)) continue;
+ // If another region was already merged into current region
+ // change the nid of the previous region too.
+ if (regions[j].id == oldId)
+ regions[j].id = mergeId;
+ // Replace the current region with the new one if the
+ // current regions is neighbour.
+ replaceNeighbour(regions[j], oldId, mergeId);
+ }
+ mergeCount++;
+ }
+ }
+ }
+ }
+ while (mergeCount > 0);
+
+ // Compress region Ids.
+ for (int i = 0; i < nreg; ++i)
+ {
+ regions[i].remap = false;
+ if (regions[i].id == 0) continue; // Skip nil regions.
+ if (regions[i].id & RC_BORDER_REG) continue; // Skip external regions.
+ regions[i].remap = true;
+ }
+
+ unsigned short regIdGen = 0;
+ for (int i = 0; i < nreg; ++i)
+ {
+ if (!regions[i].remap)
+ continue;
+ unsigned short oldId = regions[i].id;
+ unsigned short newId = ++regIdGen;
+ for (int j = i; j < nreg; ++j)
+ {
+ if (regions[j].id == oldId)
+ {
+ regions[j].id = newId;
+ regions[j].remap = false;
+ }
+ }
+ }
+ maxRegionId = regIdGen;
+
+ // Remap regions.
+ for (int i = 0; i < chf.spanCount; ++i)
+ {
+ if ((srcReg[i] & RC_BORDER_REG) == 0)
+ srcReg[i] = regions[srcReg[i]].id;
+ }
+
+ // Return regions that we found to be overlapping.
+ for (int i = 0; i < nreg; ++i)
+ if (regions[i].overlap)
+ overlaps.push(regions[i].id);
+
+ for (int i = 0; i < nreg; ++i)
+ regions[i].~rcRegion();
+ rcFree(regions);
+
+
+ return true;
+}
+
+
+static void addUniqueConnection(rcRegion& reg, int n)
+{
+ for (int i = 0; i < reg.connections.size(); ++i)
+ if (reg.connections[i] == n)
+ return;
+ reg.connections.push(n);
+}
+
+static bool mergeAndFilterLayerRegions(rcContext* ctx, int minRegionArea,
+ unsigned short& maxRegionId,
+ rcCompactHeightfield& chf,
+ unsigned short* srcReg, rcIntArray& /*overlaps*/)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ const int nreg = maxRegionId+1;
+ rcRegion* regions = (rcRegion*)rcAlloc(sizeof(rcRegion)*nreg, RC_ALLOC_TEMP);
+ if (!regions)
+ {
+ ctx->log(RC_LOG_ERROR, "mergeAndFilterLayerRegions: Out of memory 'regions' (%d).", nreg);
+ return false;
+ }
+
+ // Construct regions
+ for (int i = 0; i < nreg; ++i)
+ new(&regions[i]) rcRegion((unsigned short)i);
+
+ // Find region neighbours and overlapping regions.
+ rcIntArray lregs(32);
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ lregs.resize(0);
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ const unsigned short ri = srcReg[i];
+ if (ri == 0 || ri >= nreg) continue;
+ rcRegion& reg = regions[ri];
+
+ reg.spanCount++;
+
+ reg.ymin = rcMin(reg.ymin, s.y);
+ reg.ymax = rcMax(reg.ymax, s.y);
+
+ // Collect all region layers.
+ lregs.push(ri);
+
+ // Update neighbours
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ const unsigned short rai = srcReg[ai];
+ if (rai > 0 && rai < nreg && rai != ri)
+ addUniqueConnection(reg, rai);
+ if (rai & RC_BORDER_REG)
+ reg.connectsToBorder = true;
+ }
+ }
+
+ }
+
+ // Update overlapping regions.
+ for (int i = 0; i < lregs.size()-1; ++i)
+ {
+ for (int j = i+1; j < lregs.size(); ++j)
+ {
+ if (lregs[i] != lregs[j])
+ {
+ rcRegion& ri = regions[lregs[i]];
+ rcRegion& rj = regions[lregs[j]];
+ addUniqueFloorRegion(ri, lregs[j]);
+ addUniqueFloorRegion(rj, lregs[i]);
+ }
+ }
+ }
+
+ }
+ }
+
+ // Create 2D layers from regions.
+ unsigned short layerId = 1;
+
+ for (int i = 0; i < nreg; ++i)
+ regions[i].id = 0;
+
+ // Merge montone regions to create non-overlapping areas.
+ rcIntArray stack(32);
+ for (int i = 1; i < nreg; ++i)
+ {
+ rcRegion& root = regions[i];
+ // Skip already visited.
+ if (root.id != 0)
+ continue;
+
+ // Start search.
+ root.id = layerId;
+
+ stack.resize(0);
+ stack.push(i);
+
+ while (stack.size() > 0)
+ {
+ // Pop front
+ rcRegion& reg = regions[stack[0]];
+ for (int j = 0; j < stack.size()-1; ++j)
+ stack[j] = stack[j+1];
+ stack.resize(stack.size()-1);
+
+ const int ncons = (int)reg.connections.size();
+ for (int j = 0; j < ncons; ++j)
+ {
+ const int nei = reg.connections[j];
+ rcRegion& regn = regions[nei];
+ // Skip already visited.
+ if (regn.id != 0)
+ continue;
+ // Skip if the neighbour is overlapping root region.
+ bool overlap = false;
+ for (int k = 0; k < root.floors.size(); k++)
+ {
+ if (root.floors[k] == nei)
+ {
+ overlap = true;
+ break;
+ }
+ }
+ if (overlap)
+ continue;
+
+ // Deepen
+ stack.push(nei);
+
+ // Mark layer id
+ regn.id = layerId;
+ // Merge current layers to root.
+ for (int k = 0; k < regn.floors.size(); ++k)
+ addUniqueFloorRegion(root, regn.floors[k]);
+ root.ymin = rcMin(root.ymin, regn.ymin);
+ root.ymax = rcMax(root.ymax, regn.ymax);
+ root.spanCount += regn.spanCount;
+ regn.spanCount = 0;
+ root.connectsToBorder = root.connectsToBorder || regn.connectsToBorder;
+ }
+ }
+
+ layerId++;
+ }
+
+ // Remove small regions
+ for (int i = 0; i < nreg; ++i)
+ {
+ if (regions[i].spanCount > 0 && regions[i].spanCount < minRegionArea && !regions[i].connectsToBorder)
+ {
+ unsigned short reg = regions[i].id;
+ for (int j = 0; j < nreg; ++j)
+ if (regions[j].id == reg)
+ regions[j].id = 0;
+ }
+ }
+
+ // Compress region Ids.
+ for (int i = 0; i < nreg; ++i)
+ {
+ regions[i].remap = false;
+ if (regions[i].id == 0) continue; // Skip nil regions.
+ if (regions[i].id & RC_BORDER_REG) continue; // Skip external regions.
+ regions[i].remap = true;
+ }
+
+ unsigned short regIdGen = 0;
+ for (int i = 0; i < nreg; ++i)
+ {
+ if (!regions[i].remap)
+ continue;
+ unsigned short oldId = regions[i].id;
+ unsigned short newId = ++regIdGen;
+ for (int j = i; j < nreg; ++j)
+ {
+ if (regions[j].id == oldId)
+ {
+ regions[j].id = newId;
+ regions[j].remap = false;
+ }
+ }
+ }
+ maxRegionId = regIdGen;
+
+ // Remap regions.
+ for (int i = 0; i < chf.spanCount; ++i)
+ {
+ if ((srcReg[i] & RC_BORDER_REG) == 0)
+ srcReg[i] = regions[srcReg[i]].id;
+ }
+
+ for (int i = 0; i < nreg; ++i)
+ regions[i].~rcRegion();
+ rcFree(regions);
+
+ return true;
+}
+
+
+
+/// @par
+///
+/// This is usually the second to the last step in creating a fully built
+/// compact heightfield. This step is required before regions are built
+/// using #rcBuildRegions or #rcBuildRegionsMonotone.
+///
+/// After this step, the distance data is available via the rcCompactHeightfield::maxDistance
+/// and rcCompactHeightfield::dist fields.
+///
+/// @see rcCompactHeightfield, rcBuildRegions, rcBuildRegionsMonotone
+bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_DISTANCEFIELD);
+
+ if (chf.dist)
+ {
+ rcFree(chf.dist);
+ chf.dist = 0;
+ }
+
+ unsigned short* src = (unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP);
+ if (!src)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'src' (%d).", chf.spanCount);
+ return false;
+ }
+ unsigned short* dst = (unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP);
+ if (!dst)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'dst' (%d).", chf.spanCount);
+ rcFree(src);
+ return false;
+ }
+
+ unsigned short maxDist = 0;
+
+ {
+ rcScopedTimer timerDist(ctx, RC_TIMER_BUILD_DISTANCEFIELD_DIST);
+
+ calculateDistanceField(chf, src, maxDist);
+ chf.maxDistance = maxDist;
+ }
+
+ {
+ rcScopedTimer timerBlur(ctx, RC_TIMER_BUILD_DISTANCEFIELD_BLUR);
+
+ // Blur
+ if (boxBlur(chf, 1, src, dst) != src)
+ rcSwap(src, dst);
+
+ // Store distance.
+ chf.dist = src;
+ }
+
+ rcFree(dst);
+
+ return true;
+}
+
+static void paintRectRegion(int minx, int maxx, int miny, int maxy, unsigned short regId,
+ rcCompactHeightfield& chf, unsigned short* srcReg)
+{
+ const int w = chf.width;
+ for (int y = miny; y < maxy; ++y)
+ {
+ for (int x = minx; x < maxx; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.areas[i] != RC_NULL_AREA)
+ srcReg[i] = regId;
+ }
+ }
+ }
+}
+
+
+static const unsigned short RC_NULL_NEI = 0xffff;
+
+struct rcSweepSpan
+{
+ unsigned short rid; // row id
+ unsigned short id; // region id
+ unsigned short ns; // number samples
+ unsigned short nei; // neighbour id
+};
+
+/// @par
+///
+/// Non-null regions will consist of connected, non-overlapping walkable spans that form a single contour.
+/// Contours will form simple polygons.
+///
+/// If multiple regions form an area that is smaller than @p minRegionArea, then all spans will be
+/// re-assigned to the zero (null) region.
+///
+/// Partitioning can result in smaller than necessary regions. @p mergeRegionArea helps
+/// reduce unecessarily small regions.
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// The region data will be available via the rcCompactHeightfield::maxRegions
+/// and rcCompactSpan::reg fields.
+///
+/// @warning The distance field must be created using #rcBuildDistanceField before attempting to build regions.
+///
+/// @see rcCompactHeightfield, rcCompactSpan, rcBuildDistanceField, rcBuildRegionsMonotone, rcConfig
+bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS);
+
+ const int w = chf.width;
+ const int h = chf.height;
+ unsigned short id = 1;
+
+ rcScopedDelete<unsigned short> srcReg((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP));
+ if (!srcReg)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildRegionsMonotone: Out of memory 'src' (%d).", chf.spanCount);
+ return false;
+ }
+ memset(srcReg,0,sizeof(unsigned short)*chf.spanCount);
+
+ const int nsweeps = rcMax(chf.width,chf.height);
+ rcScopedDelete<rcSweepSpan> sweeps((rcSweepSpan*)rcAlloc(sizeof(rcSweepSpan)*nsweeps, RC_ALLOC_TEMP));
+ if (!sweeps)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildRegionsMonotone: Out of memory 'sweeps' (%d).", nsweeps);
+ return false;
+ }
+
+
+ // Mark border regions.
+ if (borderSize > 0)
+ {
+ // Make sure border will not overflow.
+ const int bw = rcMin(w, borderSize);
+ const int bh = rcMin(h, borderSize);
+ // Paint regions
+ paintRectRegion(0, bw, 0, h, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(w-bw, w, 0, h, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(0, w, 0, bh, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(0, w, h-bh, h, id|RC_BORDER_REG, chf, srcReg); id++;
+
+ chf.borderSize = borderSize;
+ }
+
+ rcIntArray prev(256);
+
+ // Sweep one line at a time.
+ for (int y = borderSize; y < h-borderSize; ++y)
+ {
+ // Collect spans from this row.
+ prev.resize(id+1);
+ memset(&prev[0],0,sizeof(int)*id);
+ unsigned short rid = 1;
+
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ if (chf.areas[i] == RC_NULL_AREA) continue;
+
+ // -x
+ unsigned short previd = 0;
+ if (rcGetCon(s, 0) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ if ((srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai])
+ previd = srcReg[ai];
+ }
+
+ if (!previd)
+ {
+ previd = rid++;
+ sweeps[previd].rid = previd;
+ sweeps[previd].ns = 0;
+ sweeps[previd].nei = 0;
+ }
+
+ // -y
+ if (rcGetCon(s,3) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ if (srcReg[ai] && (srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai])
+ {
+ unsigned short nr = srcReg[ai];
+ if (!sweeps[previd].nei || sweeps[previd].nei == nr)
+ {
+ sweeps[previd].nei = nr;
+ sweeps[previd].ns++;
+ prev[nr]++;
+ }
+ else
+ {
+ sweeps[previd].nei = RC_NULL_NEI;
+ }
+ }
+ }
+
+ srcReg[i] = previd;
+ }
+ }
+
+ // Create unique ID.
+ for (int i = 1; i < rid; ++i)
+ {
+ if (sweeps[i].nei != RC_NULL_NEI && sweeps[i].nei != 0 &&
+ prev[sweeps[i].nei] == (int)sweeps[i].ns)
+ {
+ sweeps[i].id = sweeps[i].nei;
+ }
+ else
+ {
+ sweeps[i].id = id++;
+ }
+ }
+
+ // Remap IDs
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (srcReg[i] > 0 && srcReg[i] < rid)
+ srcReg[i] = sweeps[srcReg[i]].id;
+ }
+ }
+ }
+
+
+ {
+ rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER);
+
+ // Merge regions and filter out small regions.
+ rcIntArray overlaps;
+ chf.maxRegions = id;
+ if (!mergeAndFilterRegions(ctx, minRegionArea, mergeRegionArea, chf.maxRegions, chf, srcReg, overlaps))
+ return false;
+
+ // Monotone partitioning does not generate overlapping regions.
+ }
+
+ // Store the result out.
+ for (int i = 0; i < chf.spanCount; ++i)
+ chf.spans[i].reg = srcReg[i];
+
+ return true;
+}
+
+/// @par
+///
+/// Non-null regions will consist of connected, non-overlapping walkable spans that form a single contour.
+/// Contours will form simple polygons.
+///
+/// If multiple regions form an area that is smaller than @p minRegionArea, then all spans will be
+/// re-assigned to the zero (null) region.
+///
+/// Watershed partitioning can result in smaller than necessary regions, especially in diagonal corridors.
+/// @p mergeRegionArea helps reduce unecessarily small regions.
+///
+/// See the #rcConfig documentation for more information on the configuration parameters.
+///
+/// The region data will be available via the rcCompactHeightfield::maxRegions
+/// and rcCompactSpan::reg fields.
+///
+/// @warning The distance field must be created using #rcBuildDistanceField before attempting to build regions.
+///
+/// @see rcCompactHeightfield, rcCompactSpan, rcBuildDistanceField, rcBuildRegionsMonotone, rcConfig
+bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea, const int mergeRegionArea)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS);
+
+ const int w = chf.width;
+ const int h = chf.height;
+
+ rcScopedDelete<unsigned short> buf((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount*4, RC_ALLOC_TEMP));
+ if (!buf)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildRegions: Out of memory 'tmp' (%d).", chf.spanCount*4);
+ return false;
+ }
+
+ ctx->startTimer(RC_TIMER_BUILD_REGIONS_WATERSHED);
+
+ const int LOG_NB_STACKS = 3;
+ const int NB_STACKS = 1 << LOG_NB_STACKS;
+ rcIntArray lvlStacks[NB_STACKS];
+ for (int i=0; i<NB_STACKS; ++i)
+ lvlStacks[i].resize(1024);
+
+ rcIntArray stack(1024);
+ rcIntArray visited(1024);
+
+ unsigned short* srcReg = buf;
+ unsigned short* srcDist = buf+chf.spanCount;
+ unsigned short* dstReg = buf+chf.spanCount*2;
+ unsigned short* dstDist = buf+chf.spanCount*3;
+
+ memset(srcReg, 0, sizeof(unsigned short)*chf.spanCount);
+ memset(srcDist, 0, sizeof(unsigned short)*chf.spanCount);
+
+ unsigned short regionId = 1;
+ unsigned short level = (chf.maxDistance+1) & ~1;
+
+ // TODO: Figure better formula, expandIters defines how much the
+ // watershed "overflows" and simplifies the regions. Tying it to
+ // agent radius was usually good indication how greedy it could be.
+// const int expandIters = 4 + walkableRadius * 2;
+ const int expandIters = 8;
+
+ if (borderSize > 0)
+ {
+ // Make sure border will not overflow.
+ const int bw = rcMin(w, borderSize);
+ const int bh = rcMin(h, borderSize);
+
+ // Paint regions
+ paintRectRegion(0, bw, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++;
+ paintRectRegion(w-bw, w, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++;
+ paintRectRegion(0, w, 0, bh, regionId|RC_BORDER_REG, chf, srcReg); regionId++;
+ paintRectRegion(0, w, h-bh, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++;
+
+ chf.borderSize = borderSize;
+ }
+
+ int sId = -1;
+ while (level > 0)
+ {
+ level = level >= 2 ? level-2 : 0;
+ sId = (sId+1) & (NB_STACKS-1);
+
+// ctx->startTimer(RC_TIMER_DIVIDE_TO_LEVELS);
+
+ if (sId == 0)
+ sortCellsByLevel(level, chf, srcReg, NB_STACKS, lvlStacks, 1);
+ else
+ appendStacks(lvlStacks[sId-1], lvlStacks[sId], srcReg); // copy left overs from last level
+
+// ctx->stopTimer(RC_TIMER_DIVIDE_TO_LEVELS);
+
+ {
+ rcScopedTimer timerExpand(ctx, RC_TIMER_BUILD_REGIONS_EXPAND);
+
+ // Expand current regions until no empty connected cells found.
+ if (expandRegions(expandIters, level, chf, srcReg, srcDist, dstReg, dstDist, lvlStacks[sId], false) != srcReg)
+ {
+ rcSwap(srcReg, dstReg);
+ rcSwap(srcDist, dstDist);
+ }
+ }
+
+ {
+ rcScopedTimer timerFloor(ctx, RC_TIMER_BUILD_REGIONS_FLOOD);
+
+ // Mark new regions with IDs.
+ for (int j = 0; j<lvlStacks[sId].size(); j += 3)
+ {
+ int x = lvlStacks[sId][j];
+ int y = lvlStacks[sId][j+1];
+ int i = lvlStacks[sId][j+2];
+ if (i >= 0 && srcReg[i] == 0)
+ {
+ if (floodRegion(x, y, i, level, regionId, chf, srcReg, srcDist, stack))
+ {
+ if (regionId == 0xFFFF)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildRegions: Region ID overflow");
+ return false;
+ }
+
+ regionId++;
+ }
+ }
+ }
+ }
+ }
+
+ // Expand current regions until no empty connected cells found.
+ if (expandRegions(expandIters*8, 0, chf, srcReg, srcDist, dstReg, dstDist, stack, true) != srcReg)
+ {
+ rcSwap(srcReg, dstReg);
+ rcSwap(srcDist, dstDist);
+ }
+
+ ctx->stopTimer(RC_TIMER_BUILD_REGIONS_WATERSHED);
+
+ {
+ rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER);
+
+ // Merge regions and filter out smalle regions.
+ rcIntArray overlaps;
+ chf.maxRegions = regionId;
+ if (!mergeAndFilterRegions(ctx, minRegionArea, mergeRegionArea, chf.maxRegions, chf, srcReg, overlaps))
+ return false;
+
+ // If overlapping regions were found during merging, split those regions.
+ if (overlaps.size() > 0)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildRegions: %d overlapping regions.", overlaps.size());
+ }
+ }
+
+ // Write the result out.
+ for (int i = 0; i < chf.spanCount; ++i)
+ chf.spans[i].reg = srcReg[i];
+
+ return true;
+}
+
+
+bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf,
+ const int borderSize, const int minRegionArea)
+{
+ rcAssert(ctx);
+
+ rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS);
+
+ const int w = chf.width;
+ const int h = chf.height;
+ unsigned short id = 1;
+
+ rcScopedDelete<unsigned short> srcReg((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP));
+ if (!srcReg)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildLayerRegions: Out of memory 'src' (%d).", chf.spanCount);
+ return false;
+ }
+ memset(srcReg,0,sizeof(unsigned short)*chf.spanCount);
+
+ const int nsweeps = rcMax(chf.width,chf.height);
+ rcScopedDelete<rcSweepSpan> sweeps((rcSweepSpan*)rcAlloc(sizeof(rcSweepSpan)*nsweeps, RC_ALLOC_TEMP));
+ if (!sweeps)
+ {
+ ctx->log(RC_LOG_ERROR, "rcBuildLayerRegions: Out of memory 'sweeps' (%d).", nsweeps);
+ return false;
+ }
+
+
+ // Mark border regions.
+ if (borderSize > 0)
+ {
+ // Make sure border will not overflow.
+ const int bw = rcMin(w, borderSize);
+ const int bh = rcMin(h, borderSize);
+ // Paint regions
+ paintRectRegion(0, bw, 0, h, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(w-bw, w, 0, h, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(0, w, 0, bh, id|RC_BORDER_REG, chf, srcReg); id++;
+ paintRectRegion(0, w, h-bh, h, id|RC_BORDER_REG, chf, srcReg); id++;
+
+ chf.borderSize = borderSize;
+ }
+
+ rcIntArray prev(256);
+
+ // Sweep one line at a time.
+ for (int y = borderSize; y < h-borderSize; ++y)
+ {
+ // Collect spans from this row.
+ prev.resize(id+1);
+ memset(&prev[0],0,sizeof(int)*id);
+ unsigned short rid = 1;
+
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ if (chf.areas[i] == RC_NULL_AREA) continue;
+
+ // -x
+ unsigned short previd = 0;
+ if (rcGetCon(s, 0) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ if ((srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai])
+ previd = srcReg[ai];
+ }
+
+ if (!previd)
+ {
+ previd = rid++;
+ sweeps[previd].rid = previd;
+ sweeps[previd].ns = 0;
+ sweeps[previd].nei = 0;
+ }
+
+ // -y
+ if (rcGetCon(s,3) != RC_NOT_CONNECTED)
+ {
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ if (srcReg[ai] && (srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai])
+ {
+ unsigned short nr = srcReg[ai];
+ if (!sweeps[previd].nei || sweeps[previd].nei == nr)
+ {
+ sweeps[previd].nei = nr;
+ sweeps[previd].ns++;
+ prev[nr]++;
+ }
+ else
+ {
+ sweeps[previd].nei = RC_NULL_NEI;
+ }
+ }
+ }
+
+ srcReg[i] = previd;
+ }
+ }
+
+ // Create unique ID.
+ for (int i = 1; i < rid; ++i)
+ {
+ if (sweeps[i].nei != RC_NULL_NEI && sweeps[i].nei != 0 &&
+ prev[sweeps[i].nei] == (int)sweeps[i].ns)
+ {
+ sweeps[i].id = sweeps[i].nei;
+ }
+ else
+ {
+ sweeps[i].id = id++;
+ }
+ }
+
+ // Remap IDs
+ for (int x = borderSize; x < w-borderSize; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (srcReg[i] > 0 && srcReg[i] < rid)
+ srcReg[i] = sweeps[srcReg[i]].id;
+ }
+ }
+ }
+
+
+ {
+ rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER);
+
+ // Merge monotone regions to layers and remove small regions.
+ rcIntArray overlaps;
+ chf.maxRegions = id;
+ if (!mergeAndFilterLayerRegions(ctx, minRegionArea, chf.maxRegions, chf, srcReg, overlaps))
+ return false;
+ }
+
+
+ // Store the result out.
+ for (int i = 0; i < chf.spanCount; ++i)
+ chf.spans[i].reg = srcReg[i];
+
+ return true;
+}