Commit 0e3d6257 by Rémi Verschelde

doc: Sync classref with current source

Lots of internal API changes and some docstrings were lost in the conversion. I manually salvaged many of them but for all the rendering-related ones, an additional pass is needed. Added missing enum bindings in BaseMaterial3D and VisualServer.
parent 0c7fc80c
......@@ -53,8 +53,14 @@
<member name="Marshalls" type="Reference" setter="" getter="">
The [Marshalls] singleton.
</member>
<member name="NavigationMeshGenerator" type="EditorNavigationMeshGenerator" setter="" getter="">
The [EditorNavigationMeshGenerator] singleton.
<member name="Navigation2DServer" type="Navigation2DServer" setter="" getter="">
The [Navigation2DServer] singleton.
</member>
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
The [NavigationMeshGenerator] singleton.
</member>
<member name="NavigationServer" type="NavigationServer" setter="" getter="">
The [NavigationServer] singleton.
</member>
<member name="OS" type="OS" setter="" getter="">
The [OS] singleton.
......@@ -1367,7 +1373,7 @@
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
<constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
......
......@@ -60,6 +60,10 @@
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
<member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
</member>
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The animation speed is multiplied by this value.
</member>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedTexture" inherits="Texture" version="4.0">
<class name="AnimatedTexture" inherits="Texture2D" version="4.0">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
<description>
[AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
[AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Also, it doesn't support [AtlasTexture]. Each frame needs to be separate image.
</description>
......@@ -21,12 +21,12 @@
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="frame" type="int">
</argument>
<description>
Returns the given frame's [Texture].
Returns the given frame's [Texture2D].
</description>
</method>
<method name="set_frame_delay">
......@@ -52,16 +52,15 @@
</return>
<argument index="0" name="frame" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0">
Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
......
......@@ -14,7 +14,7 @@
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
[/codeblock]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
......
......@@ -45,7 +45,11 @@
</argument>
<argument index="2" name="blend_shapes" type="Array" default="[ ]">
</argument>
<argument index="3" name="compress_flags" type="int" default="97280">
<argument index="3" name="lods" type="Dictionary" default="{
}">
</argument>
<argument index="4" name="compress_flags" type="int" default="31744">
</argument>
<description>
Creates a new surface.
......@@ -62,6 +66,12 @@
Removes all blend shapes from this [ArrayMesh].
</description>
</method>
<method name="clear_surfaces">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int">
</return>
......@@ -150,15 +160,6 @@
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_remove">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down.
</description>
</method>
<method name="surface_set_name">
<return type="void">
</return>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AtlasTexture" inherits="Texture" version="4.0">
<class name="AtlasTexture" inherits="Texture2D" version="4.0">
<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.
[Texture2D] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture2D], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
</description>
<tutorials>
</tutorials>
<methods>
</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 name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas">
The texture that contains the atlas. Can be any [Texture2D] subtype.
</member>
<member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false">
If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )">
The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
</member>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BakedLightmap" inherits="VisualInstance" version="4.0">
<brief_description>
Prerendered indirect light map for a scene.
</brief_description>
<description>
Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the [GIProbe] approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/baked_lightmaps.html</link>
</tutorials>
<methods>
<method name="bake">
<return type="int" enum="BakedLightmap.BakeError">
</return>
<argument index="0" name="from_node" type="Node" default="null">
</argument>
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<description>
Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed.
</description>
</method>
<method name="debug_bake">
<return type="void">
</return>
<description>
Executes a dry run bake of lightmaps within the currently edited scene.
</description>
</method>
</methods>
<members>
<member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size" default="0.25">
Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large.
</member>
<member name="bake_default_texels_per_unit" type="float" setter="set_bake_default_texels_per_unit" getter="get_bake_default_texels_per_unit" default="20.0">
If a [member Mesh.lightmap_size_hint] isn't specified, the lightmap baker will dynamically set the lightmap size using this value. This value is measured in texels per world unit. The maximum lightmap texture size is 4096x4096.
</member>
<member name="bake_energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
Multiplies the light sources' intensity by this value. For instance, if the value is set to 2, lights will be twice as bright. If the value is set to 0.5, lights will be half as bright.
</member>
<member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
The size of the affected area.
</member>
<member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr" default="false">
If [code]true[/code], the lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller file size.
</member>
<member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode" default="0">
Lightmapping mode. See [enum BakeMode].
</member>
<member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0">
Defines how far the light will travel before it is no longer effective. The higher the number, the farther the light will travel. For instance, if the value is set to 2, the light will go twice as far. If the value is set to 0.5, the light will only go half as far.
</member>
<member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality].
</member>
<member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size" default="0.5">
Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size].
</member>
<member name="image_path" type="String" setter="set_image_path" getter="get_image_path" default="&quot;.&quot;">
The location where lightmaps will be saved.
</member>
<member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
The calculated light data.
</member>
</members>
<constants>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
The lowest bake quality mode. Fastest to calculate.
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
The default bake quality mode.
</constant>
<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
The highest bake quality mode. Takes longer to calculate.
</constant>
<constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode">
Less precise but faster bake mode.
</constant>
<constant name="BAKE_MODE_RAY_TRACE" value="1" enum="BakeMode">
More precise bake mode but can take considerably longer to bake.
</constant>
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
Baking was successful.
</constant>
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError">
Returns if no viable save path is found. This can happen where an [member image_path] is not specified or when the save location is invalid.
</constant>
<constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError">
Currently unused.
</constant>
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError">
Returns when the baker cannot save per-mesh textures to file.
</constant>
<constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError">
Returns if user cancels baking.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BakedLightmapData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_user">
<return type="void">
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<argument index="1" name="lightmap" type="Texture">
</argument>
<argument index="2" name="instance" type="int">
</argument>
<description>
</description>
</method>
<method name="clear_users">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_user_count" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_user_lightmap" qualifiers="const">
<return type="Texture">
</return>
<argument index="0" name="user_idx" type="int">
</argument>
<description>
</description>
</method>
<method name="get_user_path" qualifiers="const">
<return type="NodePath">
</return>
<argument index="0" name="user_idx" type="int">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 0, 0, 0 )">
</member>
<member name="cell_space_transform" type="Transform" setter="set_cell_space_transform" getter="get_cell_space_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
</member>
<member name="cell_subdiv" type="int" setter="set_cell_subdiv" getter="get_cell_subdiv" default="1">
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
</member>
<member name="octree" type="PoolByteArray" setter="set_octree" getter="get_octree" default="PoolByteArray( )">
</member>
</members>
<constants>
</constants>
</class>
......@@ -43,7 +43,7 @@
<method name="add_texture">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<description>
Adds a texture to the [BitmapFont].
......@@ -88,7 +88,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
......
......@@ -23,7 +23,7 @@
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
Flat buttons don't display decoration.
</member>
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
<member name="icon" type="Texture2D" 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" default="&quot;&quot;">
......
......@@ -238,7 +238,7 @@
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
</member>
<member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap">
<member name="normalmap" type="Texture2D" setter="set_normalmap" getter="get_normalmap">
Normal map to be used for the [member texture] property.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
......@@ -292,7 +292,7 @@
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Tangential acceleration randomness ratio.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
</members>
......
......@@ -175,6 +175,8 @@
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0">
If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
</member>
<member name="effects" type="CameraEffects" setter="set_effects" getter="get_effects">
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] to use for this camera.
</member>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CameraEffects" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1">
</member>
<member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0">
</member>
<member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false">
</member>
<member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0">
</member>
<member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0">
</member>
<member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false">
</member>
<member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0">
</member>
<member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0">
</member>
<member name="override_exposure_enable" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false">
</member>
</members>
<constants>
</constants>
</class>
......@@ -10,57 +10,7 @@
<tutorials>
</tutorials>
<methods>
<method name="get_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the unique ID for this feed.
</description>
</method>
<method name="get_name" qualifiers="const">
<return type="String">
</return>
<description>
Returns the camera's name.
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="int" enum="CameraFeed.FeedPosition">
</return>
<description>
Returns the position of camera on the device.
</description>
</method>
</methods>
<members>
<member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
If [code]true[/code], the feed is active.
</member>
<member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )">
The transform applied to the camera's image.
</member>
</members>
<constants>
<constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
No image set for the feed.
</constant>
<constant name="FEED_RGB" value="1" enum="FeedDataType">
Feed supplies RGB images.
</constant>
<constant name="FEED_YCBCR" value="2" enum="FeedDataType">
Feed supplies YCbCr images that need to be converted to RGB.
</constant>
<constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
</constant>
<constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
Unspecified position.
</constant>
<constant name="FEED_FRONT" value="1" enum="FeedPosition">
Camera is mounted at the front of the device.
</constant>
<constant name="FEED_BACK" value="2" enum="FeedPosition">
Camera is mounted at the back of the device.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CameraTexture" inherits="Texture" version="4.0">
<class name="CameraTexture" inherits="Texture2D" version="4.0">
<brief_description>
Texture provided by a [CameraFeed].
</brief_description>
......@@ -18,7 +18,6 @@
<member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false">
Convenience property that gives access to the active property of the [CameraFeed].
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0">
Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component.
</member>
......
......@@ -18,7 +18,7 @@
The manner in which material reacts to lighting.
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
The number of columns in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D].
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
......@@ -26,7 +26,7 @@
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
The number of rows in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D].
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
......
......@@ -20,7 +20,7 @@
<theme_item name="check_vadjust" type="int" default="0">
The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="checked" type="Texture">
<theme_item name="checked" type="Texture2D">
The check icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="disabled" type="StyleBox">
......@@ -62,13 +62,13 @@
<theme_item name="pressed" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
<theme_item name="radio_checked" type="Texture">
<theme_item name="radio_checked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="radio_unchecked" type="Texture">
<theme_item name="radio_unchecked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
<theme_item name="unchecked" type="Texture">
<theme_item name="unchecked" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked.
</theme_item>
</theme_items>
......
......@@ -56,16 +56,16 @@
<theme_item name="normal" type="StyleBox">
The [StyleBox] to display as a background.
</theme_item>
<theme_item name="off" type="Texture">
<theme_item name="off" type="Texture2D">
The icon to display when the [CheckButton] is unchecked.
</theme_item>
<theme_item name="off_disabled" type="Texture">
<theme_item name="off_disabled" type="Texture2D">
The icon to display when the [CheckButton] is unchecked and disabled.
</theme_item>
<theme_item name="on" type="Texture">
<theme_item name="on" type="Texture2D">
The icon to display when the [CheckButton] is checked.
</theme_item>
<theme_item name="on_disabled" type="Texture">
<theme_item name="on_disabled" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled.
</theme_item>
<theme_item name="pressed" type="StyleBox">
......
......@@ -87,11 +87,11 @@
<constants>
</constants>
<theme_items>
<theme_item name="add_preset" type="Texture">
<theme_item name="add_preset" type="Texture2D">
</theme_item>
<theme_item name="color_hue" type="Texture">
<theme_item name="color_hue" type="Texture2D">
</theme_item>
<theme_item name="color_sample" type="Texture">
<theme_item name="color_sample" type="Texture2D">
</theme_item>
<theme_item name="h_width" type="int" default="30">
</theme_item>
......@@ -99,11 +99,11 @@
</theme_item>
<theme_item name="margin" type="int" default="4">
</theme_item>
<theme_item name="overbright_indicator" type="Texture">
<theme_item name="overbright_indicator" type="Texture2D">
</theme_item>
<theme_item name="preset_bg" type="Texture">
<theme_item name="preset_bg" type="Texture2D">
</theme_item>
<theme_item name="screen_picker" type="Texture">
<theme_item name="screen_picker" type="Texture2D">
</theme_item>
<theme_item name="sv_height" type="int" default="256">
</theme_item>
......
......@@ -55,7 +55,7 @@
<constants>
</constants>
<theme_items>
<theme_item name="bg" type="Texture">
<theme_item name="bg" type="Texture2D">
The background of the color preview rect on the button.
</theme_item>
<theme_item name="disabled" type="StyleBox">
......
......@@ -125,7 +125,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used.
......@@ -317,7 +317,7 @@
</description>
</method>
<method name="get_icon" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="name" type="String">
</argument>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CubeMap" inherits="Resource" version="4.0">
<brief_description>
A CubeMap is a 6-sided 3D texture.
</brief_description>
<description>
A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_height" qualifiers="const">
<return type="int">
</return>
<description>
Returns the [CubeMap]'s height.
</description>
</method>
<method name="get_side" qualifiers="const">
<return type="Image">
</return>
<argument index="0" name="side" type="int" enum="CubeMap.Side">
</argument>
<description>
Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int">
</return>
<description>
Returns the [CubeMap]'s width.
</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>
Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="7">
The render flags for the [CubeMap]. See the [enum Flags] constants for details.
</member>
<member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY].
</member>
<member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0">
The [CubeMap]'s storage mode. See [enum Storage] constants.
</member>
</members>
<constants>
<constant name="STORAGE_RAW" value="0" enum="Storage">
Store the [CubeMap] without any compression.
</constant>
<constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
Store the [CubeMap] with strong compression that reduces image quality.
</constant>
<constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
Store the [CubeMap] with moderate compression that doesn't reduce image quality.
</constant>
<constant name="SIDE_LEFT" value="0" enum="Side">
Identifier for the left face of the [CubeMap].
</constant>
<constant name="SIDE_RIGHT" value="1" enum="Side">
Identifier for the right face of the [CubeMap].
</constant>
<constant name="SIDE_BOTTOM" value="2" enum="Side">
Identifier for the bottom face of the [CubeMap].
</constant>
<constant name="SIDE_TOP" value="3" enum="Side">
Identifier for the top face of the [CubeMap].
</constant>
<constant name="SIDE_FRONT" value="4" enum="Side">
Identifier for the front face of the [CubeMap].
</constant>
<constant name="SIDE_BACK" value="5" enum="Side">
Identifier for the back face of the [CubeMap].
</constant>
<constant name="FLAG_MIPMAPS" value="1" enum="Flags">
Generate mipmaps, to enable smooth zooming out of the texture.
</constant>
<constant name="FLAG_REPEAT" value="2" enum="Flags">
Repeat (instead of clamp to edge).
</constant>
<constant name="FLAG_FILTER" value="4" enum="Flags">
Turn on magnifying filter, to enable smooth zooming in of the texture.
</constant>
<constant name="FLAGS_DEFAULT" value="7" enum="Flags">
Default flags. Generate mipmaps, repeat, and filter are enabled.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureArray" inherits="TextureLayered" version="4.0">
<class name="Cubemap" inherits="TextureLayered" version="4.0">
<brief_description>
Array of textures stored in a single primitive.
</brief_description>
<description>
[TextureArray]s store an array of images in a single [Texture] primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases.
</description>
<tutorials>
</tutorials>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CubemapArray" inherits="TextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CurveTexture" inherits="Texture" version="4.0">
<class name="CurveTexture" inherits="Texture2D" version="4.0">
<brief_description>
A texture that shows a curve.
</brief_description>
......
......@@ -21,6 +21,8 @@
<member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0">
Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange].
</member>
<member name="directional_shadow_fade_start" type="float" setter="set_param" getter="get_param" default="0.8">
</member>
<member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0">
The maximum distance for shadow splits.
</member>
......
......@@ -108,12 +108,6 @@
<member name="size" type="int" setter="set_size" getter="get_size" default="16">
The font size in pixels.
</member>
<member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false">
If [code]true[/code], filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired.
</member>
<member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false">
If [code]true[/code], mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective.
</member>
</members>
<constants>
<constant name="SPACING_TOP" value="0" enum="SpacingType">
......
......@@ -127,7 +127,7 @@
<argument index="1" name="preview_size" type="int">
</argument>
<description>
Returns mesh previews rendered at the given size as an [Array] of [Texture]s.
Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s.
</description>
</method>
<method name="open_scene_from_path">
......
......@@ -67,11 +67,11 @@
</argument>
<argument index="2" name="script" type="Script">
</argument>
<argument index="3" name="icon" type="Texture">
<argument index="3" name="icon" type="Texture2D">
</argument>
<description>
Adds 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.
When given node or resource is selected, the base type will be instanced (e.g. "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
During run-time, this will be a simple object with a script so this function does not need to be called then.
</description>
......
......@@ -18,7 +18,7 @@
</description>
</method>
<method name="generate" qualifiers="virtual">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="from" type="Resource">
</argument>
......@@ -31,7 +31,7 @@
</description>
</method>
<method name="generate_from_path" qualifiers="virtual">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="path" type="String">
</argument>
......
......@@ -15,7 +15,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="material" type="SpatialMaterial">
<argument index="1" name="material" type="StandardMaterial3D">
</argument>
<description>
Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
......@@ -68,7 +68,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<argument index="2" name="on_top" type="bool" default="false">
</argument>
......@@ -118,7 +118,7 @@
</description>
</method>
<method name="get_material">
<return type="SpatialMaterial">
<return type="StandardMaterial3D">
</return>
<argument index="0" name="name" type="String">
</argument>
......
......@@ -134,15 +134,15 @@
<theme_items>
<theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )">
</theme_item>
<theme_item name="folder" type="Texture">
<theme_item name="folder" type="Texture2D">
</theme_item>
<theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</theme_item>
<theme_item name="parent_folder" type="Texture">
<theme_item name="parent_folder" type="Texture2D">
</theme_item>
<theme_item name="reload" type="Texture">
<theme_item name="reload" type="Texture2D">
</theme_item>
<theme_item name="toggle_hidden" type="Texture">
<theme_item name="toggle_hidden" type="Texture2D">
</theme_item>
</theme_items>
</class>
......@@ -5,7 +5,7 @@
</brief_description>
<description>
[GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/voxel_cone_tracing/high_quality].
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
......@@ -31,34 +31,12 @@
</method>
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
Offsets the lookup of the light contribution from the [GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [member normal_bias] should be played around with to minimize self-shadowing and light leaking.
[b]Note:[/b] [code]bias[/code] should usually be above 1.0 as that is the size of the voxels.
</member>
<member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false">
If [code]true[/code], the data for this [GIProbe] will be compressed. Compression saves space, but results in far worse visual quality.
</member>
<member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data">
The [GIProbeData] resource that holds the data for this [GIProbe].
</member>
<member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="4">
The maximum brightness that the [GIProbe] will recognize. Brightness will be scaled within this range.
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
Energy multiplier. Makes the lighting contribution from the [GIProbe] brighter.
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
If [code]true[/code], ignores the sky contribution when calculating lighting.
</member>
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
Offsets the lookup into the [GIProbe] based on the object's normal direction. Can be used to reduce some self-shadowing artifacts.
</member>
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
How much light propagates through the probe internally. A higher value allows light to spread further.
</member>
<member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1">
Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
</member>
......
......@@ -7,29 +7,83 @@
<tutorials>
</tutorials>
<methods>
<method name="allocate">
<return type="void">
</return>
<argument index="0" name="to_cell_xform" type="Transform">
</argument>
<argument index="1" name="aabb" type="AABB">
</argument>
<argument index="2" name="octree_size" type="Vector3">
</argument>
<argument index="3" name="octree_cells" type="PoolByteArray">
</argument>
<argument index="4" name="data_cells" type="PoolByteArray">
</argument>
<argument index="5" name="distance_field" type="PoolByteArray">
</argument>
<argument index="6" name="level_counts" type="PoolIntArray">
</argument>
<description>
</description>
</method>
<method name="get_bounds" qualifiers="const">
<return type="AABB">
</return>
<description>
</description>
</method>
<method name="get_data_cells" qualifiers="const">
<return type="PoolByteArray">
</return>
<description>
</description>
</method>
<method name="get_level_counts" qualifiers="const">
<return type="PoolIntArray">
</return>
<description>
</description>
</method>
<method name="get_octree_cells" qualifiers="const">
<return type="PoolByteArray">
</return>
<description>
</description>
</method>
<method name="get_octree_size" qualifiers="const">
<return type="Vector3">
</return>
<description>
</description>
</method>
<method name="get_to_cell_xform" qualifiers="const">
<return type="Transform">
</return>
<description>
</description>
</method>
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.4">
<member name="anisotropy_strength" type="float" setter="set_anisotropy_strength" getter="get_anisotropy_strength" default="0.5">
</member>
<member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 1, 1, 1 )">
<member name="ao" type="float" setter="set_ao" getter="get_ao" default="0.0">
</member>
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
<member name="ao_size" type="float" setter="set_ao_size" getter="get_ao_size" default="0.5">
</member>
<member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false">
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
</member>
<member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data" default="PoolIntArray( )">
</member>
<member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="1">
<member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0">
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.4">
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
</member>
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0">
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
</member>
<member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
<member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
</member>
</members>
<constants>
......
......@@ -66,8 +66,10 @@
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
<member name="use_dynamic_gi" type="bool" setter="set_flag" getter="get_flag" default="false">
</member>
<member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] or [BakedLightmap].
If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe].
</member>
</members>
<constants>
......@@ -87,12 +89,14 @@
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
<constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags">
Will allow the GeometryInstance to be used when baking lights using a [GIProbe] or [BakedLightmap].
Will allow the GeometryInstance to be used when baking lights using a [GIProbe].
</constant>
<constant name="FLAG_USE_DYNAMIC_GI" value="1" enum="Flags">
</constant>
<constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="Flags">
<constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="Flags">
Unused in this class, exposed for consistency with [enum VisualServer.InstanceFlags].
</constant>
<constant name="FLAG_MAX" value="2" enum="Flags">
<constant name="FLAG_MAX" value="3" enum="Flags">
Represents the size of the [enum Flags] enum.
</constant>
</constants>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GradientTexture" inherits="Texture" version="4.0">
<class name="GradientTexture" inherits="Texture2D" version="4.0">
<brief_description>
Gradient-filled texture.
</brief_description>
......
......@@ -308,21 +308,21 @@
</theme_item>
<theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )">
</theme_item>
<theme_item name="minus" type="Texture">
<theme_item name="minus" type="Texture2D">
</theme_item>
<theme_item name="more" type="Texture">
<theme_item name="more" type="Texture2D">
</theme_item>
<theme_item name="port_grab_distance_horizontal" type="int" default="48">
</theme_item>
<theme_item name="port_grab_distance_vertical" type="int" default="6">
</theme_item>
<theme_item name="reset" type="Texture">
<theme_item name="reset" type="Texture2D">
</theme_item>
<theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )">
</theme_item>
<theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )">
</theme_item>
<theme_item name="snap" type="Texture">
<theme_item name="snap" type="Texture2D">
</theme_item>
</theme_items>
</class>
......@@ -166,9 +166,9 @@
</argument>
<argument index="6" name="color_right" type="Color">
</argument>
<argument index="7" name="custom_left" type="Texture" default="null">
<argument index="7" name="custom_left" type="Texture2D" default="null">
</argument>
<argument index="8" name="custom_right" type="Texture" default="null">
<argument index="8" name="custom_right" type="Texture2D" default="null">
</argument>
<description>
Sets properties of the slot with ID [code]idx[/code].
......@@ -254,7 +254,7 @@
<theme_items>
<theme_item name="breakpoint" type="StyleBox">
</theme_item>
<theme_item name="close" type="Texture">
<theme_item name="close" type="Texture2D">
</theme_item>
<theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )">
</theme_item>
......@@ -270,13 +270,13 @@
</theme_item>
<theme_item name="frame" type="StyleBox">
</theme_item>
<theme_item name="port" type="Texture">
<theme_item name="port" type="Texture2D">
</theme_item>
<theme_item name="port_offset" type="int" default="3">
</theme_item>
<theme_item name="position" type="StyleBox">
</theme_item>
<theme_item name="resizer" type="Texture">
<theme_item name="resizer" type="Texture2D">
</theme_item>
<theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )">
</theme_item>
......
......@@ -13,10 +13,10 @@
<constants>
</constants>
<theme_items>
<theme_item name="decrement" type="Texture">
<theme_item name="decrement" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
<theme_item name="decrement_highlight" type="Texture">
<theme_item name="decrement_highlight" type="Texture2D">
Displayed when the mouse cursor hovers over the decrement button.
</theme_item>
<theme_item name="grabber" type="StyleBox">
......@@ -28,10 +28,10 @@
<theme_item name="grabber_pressed" type="StyleBox">
Used when the grabber is being dragged.
</theme_item>
<theme_item name="increment" type="Texture">
<theme_item name="increment" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
<theme_item name="increment_highlight" type="Texture">
<theme_item name="increment_highlight" type="Texture2D">
Displayed when the mouse cursor hovers over the increment button.
</theme_item>
<theme_item name="scroll" type="StyleBox">
......
......@@ -13,17 +13,17 @@
<constants>
</constants>
<theme_items>
<theme_item name="grabber" type="Texture">
<theme_item name="grabber" type="Texture2D">
</theme_item>
<theme_item name="grabber_area" type="StyleBox">
</theme_item>
<theme_item name="grabber_disabled" type="Texture">
<theme_item name="grabber_disabled" type="Texture2D">
</theme_item>
<theme_item name="grabber_highlight" type="Texture">
<theme_item name="grabber_highlight" type="Texture2D">
</theme_item>
<theme_item name="slider" type="StyleBox">
</theme_item>
<theme_item name="tick" type="Texture">
<theme_item name="tick" type="Texture2D">
</theme_item>
</theme_items>
</class>
......@@ -17,7 +17,7 @@
</theme_item>
<theme_item name="bg" type="StyleBox">
</theme_item>
<theme_item name="grabber" type="Texture">
<theme_item name="grabber" type="Texture2D">
</theme_item>
<theme_item name="separation" type="int" default="12">
</theme_item>
......
......@@ -4,7 +4,7 @@
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. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
</description>
<tutorials>
</tutorials>
......@@ -86,14 +86,26 @@
</return>
<argument index="0" name="mode" type="int" enum="Image.CompressMode">
</argument>
<argument index="1" name="source" type="int" enum="Image.CompressSource">
<argument index="1" name="source" type="int" enum="Image.CompressSource" default="0">
</argument>
<argument index="2" name="lossy_quality" type="float">
<argument index="2" name="lossy_quality" type="float" default="0.7">
</argument>
<description>
Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants.
</description>
</method>
<method name="compress_from_channels">
<return type="int" enum="Error">
</return>
<argument index="0" name="mode" type="int" enum="Image.CompressMode">
</argument>
<argument index="1" name="channels" type="int" enum="Image.CompressSource">
</argument>
<argument index="2" name="lossy_quality" type="float" default="0.7">
</argument>
<description>
</description>
</method>
<method name="convert">
<return type="void">
</return>
......@@ -169,6 +181,14 @@
Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found.
</description>
</method>
<method name="detect_used_channels">
<return type="int" enum="Image.UsedChannels">
</return>
<argument index="0" name="source" type="int" enum="Image.CompressSource" default="0">
</argument>
<description>
</description>
</method>
<method name="expand_x2_hq2x">
<return type="void">
</return>
......@@ -497,10 +517,10 @@
</member>
</members>
<constants>
<constant name="MAX_WIDTH" value="16384">
<constant name="MAX_WIDTH" value="16777216">
The maximal width allowed for [Image] resources.
</constant>
<constant name="MAX_HEIGHT" value="16384">
<constant name="MAX_HEIGHT" value="16777216">
The maximal height allowed for [Image] resources.
</constant>
<constant name="FORMAT_L8" value="0" enum="Format">
......@@ -526,8 +546,7 @@
<constant name="FORMAT_RGBA4444" value="6" enum="Format">
OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4.
</constant>
<constant name="FORMAT_RGBA5551" value="7" enum="Format">
OpenGL texture format [code]GL_RGB5_A1[/code] where 5 bits of depth for each component of RGB and one bit for alpha.
<constant name="FORMAT_RGB565" value="7" enum="Format">
</constant>
<constant name="FORMAT_RF" value="8" enum="Format">
OpenGL texture format [code]GL_R32F[/code] where there's one component, a 32-bit floating-point value.
......@@ -624,7 +643,11 @@
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque.
[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
<constant name="FORMAT_MAX" value="37" enum="Format">
<constant name="FORMAT_ETC2_RA_AS_RG" value="37" enum="Format">
</constant>
<constant name="FORMAT_DXT5_RA_AS_RG" value="38" enum="Format">
</constant>
<constant name="FORMAT_MAX" value="39" enum="Format">
Represents the size of the [enum Format] enum.
</constant>
<constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation">
......@@ -670,6 +693,18 @@
<constant name="COMPRESS_ETC2" value="4" enum="CompressMode">
Use ETC2 compression.
</constant>
<constant name="USED_CHANNELS_L" value="0" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_LA" value="1" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_R" value="2" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_RG" value="3" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_RGB" value="4" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_RGBA" value="5" enum="UsedChannels">
</constant>
<constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource">
Source texture (before compression) is a regular texture. Default for all textures.
</constant>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTexture" inherits="Texture" version="4.0">
<class name="ImageTexture" inherits="Texture2D" version="4.0">
<brief_description>
A [Texture] based on an [Image].
A [Texture2D] based on an [Image].
</brief_description>
<description>
A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
</description>
<tutorials>
</tutorials>
<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 [code]width[/code] and [code]height[/code].
[code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags].
</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 [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].
Create a new [ImageTexture] from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
......@@ -43,52 +25,26 @@
Returns the format of the [ImageTexture], one of [enum Image.Format].
</description>
</method>
<method name="load">
<return type="int" enum="Error">
<method name="set_size_override">
<return type="void">
</return>
<argument index="0" name="path" type="String">
<argument index="0" name="size" type="Vector2">
</argument>
<description>
Load an [ImageTexture] from a file path.
Resizes the [ImageTexture] to the specified dimensions.
</description>
</method>
<method name="set_data">
<method name="update">
<return type="void">
</return>
<argument index="0" name="image" type="Image">
</argument>
<description>
Sets the [Image] of this [ImageTexture].
</description>
</method>
<method name="set_size_override">
<return type="void">
</return>
<argument index="0" name="size" type="Vector2">
<argument index="1" name="immediate" type="bool" default="false">
</argument>
<description>
Resizes the [ImageTexture] to the specified dimensions.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
<member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
The storage quality for [constant STORAGE_COMPRESS_LOSSY].
</member>
<member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage" default="0">
The storage type (raw, lossy, or compressed).
</member>
</members>
<constants>
<constant name="STORAGE_RAW" value="0" enum="Storage">
[Image] data is stored raw and unaltered.
</constant>
<constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
[Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality].
</constant>
<constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
[Image] data is compressed with a lossless algorithm.
</constant>
</constants>
</class>
......@@ -38,7 +38,7 @@
</return>
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<argument index="1" name="texture" type="Texture" default="null">
<argument index="1" name="texture" type="Texture2D" default="null">
</argument>
<description>
Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references.
......
......@@ -14,7 +14,7 @@
<method name="add_icon_item">
<return type="void">
</return>
<argument index="0" name="icon" type="Texture">
<argument index="0" name="icon" type="Texture2D">
</argument>
<argument index="1" name="selectable" type="bool" default="true">
</argument>
......@@ -27,7 +27,7 @@
</return>
<argument index="0" name="text" type="String">
</argument>
<argument index="1" name="icon" type="Texture" default="null">
<argument index="1" name="icon" type="Texture2D" default="null">
</argument>
<argument index="2" name="selectable" type="bool" default="true">
</argument>
......@@ -88,7 +88,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
......@@ -286,10 +286,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="icon" type="Texture">
<argument index="1" name="icon" type="Texture2D">
</argument>
<description>
Sets (or replaces) the icon's [Texture] associated with the specified index.
Sets (or replaces) the icon's [Texture2D] associated with the specified index.
</description>
</method>
<method name="set_item_icon_modulate">
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LargeTexture" inherits="Texture" version="4.0">
<class name="LargeTexture" inherits="Texture2D" version="4.0">
<brief_description>
A [Texture] capable of storing many smaller textures with offsets.
A [Texture2D] 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 ([Texture]s) to this [LargeTexture] using different offsets.
A [Texture2D] capable of storing many smaller textures with offsets.
You can dynamically add pieces ([Texture2D]s) to this [LargeTexture] using different offsets.
</description>
<tutorials>
</tutorials>
......@@ -15,7 +15,7 @@
</return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Adds [code]texture[/code] to this [LargeTexture], starting on offset [code]ofs[/code].
......@@ -45,12 +45,12 @@
</description>
</method>
<method name="get_piece_texture" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns the [Texture] of the piece with the index [code]idx[/code].
Returns the [Texture2D] of the piece with the index [code]idx[/code].
</description>
</method>
<method name="set_piece_offset">
......@@ -69,10 +69,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Sets the [Texture] of the piece with index [code]idx[/code] to [code]texture[/code].
Sets the [Texture2D] of the piece with index [code]idx[/code] to [code]texture[/code].
</description>
</method>
<method name="set_size">
......@@ -85,9 +85,6 @@
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
</members>
<constants>
</constants>
</class>
......@@ -48,7 +48,7 @@
The light's strength multiplier.
</member>
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe].
Secondary multiplier used with indirect light (light bounces). Used with [GIProbe].
</member>
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
......@@ -109,16 +109,18 @@
<constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param">
Constant for accessing [member DirectionalLight.directional_shadow_split_3].
</constant>
<constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param">
<constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param">
</constant>
<constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param">
Constant for accessing [member DirectionalLight.directional_shadow_normal_bias].
</constant>
<constant name="PARAM_SHADOW_BIAS" value="13" enum="Param">
<constant name="PARAM_SHADOW_BIAS" value="14" enum="Param">
Constant for accessing [member shadow_bias].
</constant>
<constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param">
<constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="15" enum="Param">
Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale].
</constant>
<constant name="PARAM_MAX" value="15" enum="Param">
<constant name="PARAM_MAX" value="16" enum="Param">
Represents the size of the [enum Param] enum.
</constant>
<constant name="BAKE_DISABLED" value="0" enum="BakeMode">
......
......@@ -64,14 +64,11 @@
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" default="0.0">
Smoothing value for shadows.
</member>
<member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" default="0.0">
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" default="1">
The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
[Texture] used for the Light2D's appearance.
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] used for the Light2D's appearance.
</member>
<member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" default="1.0">
The [code]texture[/code]'s scale factor.
......@@ -93,19 +90,10 @@
<constant name="SHADOW_FILTER_NONE" value="0" enum="ShadowFilter">
No filter applies to the shadow map. See [member shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF3" value="1" enum="ShadowFilter">
Percentage closer filtering (3 samples) applies to the shadow map. See [member shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF5" value="2" enum="ShadowFilter">
<constant name="SHADOW_FILTER_PCF5" value="1" enum="ShadowFilter">
Percentage closer filtering (5 samples) applies to the shadow map. See [member shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF7" value="3" enum="ShadowFilter">
Percentage closer filtering (7 samples) applies to the shadow map. See [member shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF9" value="4" enum="ShadowFilter">
Percentage closer filtering (9 samples) applies to the shadow map. See [member shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF13" value="5" enum="ShadowFilter">
<constant name="SHADOW_FILTER_PCF13" value="2" enum="ShadowFilter">
Percentage closer filtering (13 samples) applies to the shadow map. See [member shadow_filter].
</constant>
</constants>
......
......@@ -5,7 +5,6 @@
</brief_description>
<description>
A line through several points in 2D space.
[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb].
</description>
<tutorials>
</tutorials>
......@@ -94,7 +93,7 @@
<member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" default="2.0">
The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [constant LINE_JOINT_SHARP].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0">
......
......@@ -130,7 +130,7 @@
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]).
</member>
<member name="right_icon" type="Texture" setter="set_right_icon" getter="get_right_icon">
<member name="right_icon" type="Texture2D" setter="set_right_icon" getter="get_right_icon">
Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to [code]false[/code].
</member>
<member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false">
......@@ -211,7 +211,7 @@
</constant>
</constants>
<theme_items>
<theme_item name="clear" type="Texture">
<theme_item name="clear" type="Texture2D">
Texture for the clear button. See [member clear_button_enabled].
</theme_item>
<theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
......
......@@ -14,7 +14,7 @@
<member name="d" type="float" setter="set_d" getter="get_d" default="0.0">
The line's distance from the origin.
</member>
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, -1 )">
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, 1 )">
The line's normal.
</member>
</members>
......
......@@ -13,7 +13,7 @@
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
Sets the [Material] to be used for the next pass. This renders the object again using a different material.
[b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial".
[b]Note:[/b] only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
......
......@@ -103,7 +103,7 @@
</methods>
<members>
<member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )">
Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit].
Sets a hint to be used for lightmap resolution.
</member>
</members>
<constants>
......@@ -116,18 +116,12 @@
<constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType">
Render array as line strip.
</constant>
<constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType">
Render array as line loop (like line strip, but closed).
</constant>
<constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType">
<constant name="PRIMITIVE_TRIANGLES" value="3" enum="PrimitiveType">
Render array as triangles (every three vertices a triangle is created).
</constant>
<constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType">
<constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType">
Render array as triangle strips.
</constant>
<constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType">
Render array as triangle fans.
</constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
Blend shapes are normalized.
</constant>
......@@ -161,9 +155,6 @@
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
Mesh array uses indices.
</constant>
<constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat">
Flag used to mark a compressed (half float) vertex array.
</constant>
<constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
Flag used to mark a compressed (half float) normal array.
</constant>
......@@ -179,23 +170,14 @@
<constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
</constant>
<constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat">
Flag used to mark a compressed bone array.
</constant>
<constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat">
Flag used to mark a compressed (half float) weight array.
</constant>
<constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
Flag used to mark a compressed index array.
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat">
Flag used to mark that the array uses 16-bit bones instead of 8-bit.
</constant>
<constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat">
Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly.
<constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
Array of vertices.
......
......@@ -15,11 +15,11 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] that will be drawn by the [MeshInstance2D].
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
</member>
</members>
<signals>
......
......@@ -79,13 +79,13 @@
</description>
</method>
<method name="get_item_preview" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns a generated item preview (a 3D rendering in isometric perspective).
[b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture] in a running project.
[b]Note:[/b] Since item previews are only generated in an editor context, this function will return an empty [Texture2D] in a running project.
</description>
</method>
<method name="get_item_shapes" qualifiers="const">
......@@ -164,7 +164,7 @@
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Sets a texture to use as the item's preview icon in the editor.
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MeshTexture" inherits="Texture" version="4.0">
<class name="MeshTexture" inherits="Texture2D" version="4.0">
<brief_description>
Simple texture that uses a mesh to draw itself.
</brief_description>
......@@ -11,10 +11,9 @@
<methods>
</methods>
<members>
<member name="base_texture" type="Texture" setter="set_base_texture" getter="get_base_texture">
<member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture">
Sets the base texture that the Mesh will use to draw.
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )">
Sets the size of the image, needed for reference.
</member>
......
......@@ -57,17 +57,6 @@
Returns the [Transform2D] of a specific instance.
</description>
</method>
<method name="set_as_bulk_array">
<return type="void">
</return>
<argument index="0" name="array" type="PoolRealArray">
</argument>
<description>
Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.
All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc...
[Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats.
</description>
</method>
<method name="set_instance_color">
<return type="void">
</return>
......@@ -77,7 +66,7 @@
</argument>
<description>
Sets the color of a specific instance.
For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material.
For the color to take effect, ensure that [member use_colors] is [code]true[/code] on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is [code]true[/code] on the material.
</description>
</method>
<method name="set_instance_custom_data">
......@@ -88,7 +77,8 @@
<argument index="1" name="custom_data" type="Color">
</argument>
<description>
Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used.
Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers.
For the custom data to be used, ensure that [member use_custom_data] is [code]true[/code].
</description>
</method>
<method name="set_instance_transform">
......@@ -115,11 +105,11 @@
</method>
</methods>
<members>
<member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat" default="0">
Format of colors in color array that gets passed to shader.
<member name="buffer" type="PoolRealArray" setter="set_buffer" getter="get_buffer" default="PoolRealArray( )">
</member>
<member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array">
</member>
<member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat" default="0">
Format of custom data in custom data array that gets passed to shader.
<member name="custom_data_array" type="PoolColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0">
Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count].
......@@ -127,9 +117,17 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Mesh to be drawn.
</member>
<member name="transform_2d_array" type="PoolVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array">
</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" default="0">
Format of transform used to transform mesh, either 2D or 3D.
</member>
<member name="use_colors" type="bool" setter="set_use_colors" getter="is_using_colors" default="false">
</member>
<member name="use_custom_data" type="bool" setter="set_use_custom_data" getter="is_using_custom_data" default="false">
</member>
<member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1">
Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers.
</member>
......@@ -141,23 +139,5 @@
<constant name="TRANSFORM_3D" value="1" enum="TransformFormat">
Use this when using 3D transforms.
</constant>
<constant name="COLOR_NONE" value="0" enum="ColorFormat">
Use when you are not using per-instance [Color]s.
</constant>
<constant name="COLOR_8BIT" value="1" enum="ColorFormat">
Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision.
</constant>
<constant name="COLOR_FLOAT" value="2" enum="ColorFormat">
The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color].
</constant>
<constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat">
Use when you are not using per-instance custom data.
</constant>
<constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat">
Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped.
</constant>
<constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat">
The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision.
</constant>
</constants>
</class>
......@@ -15,11 +15,11 @@
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
The [MultiMesh] that will be drawn by the [MultiMeshInstance2D].
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map that will be used if using the default [CanvasItemMaterial].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
</member>
</members>
<signals>
......
......@@ -4,49 +4,15 @@
Mesh-based navigation and pathfinding node.
</brief_description>
<description>
Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationMeshInstance] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_closest_point">
<return type="Vector3">
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
Returns the navigation point closest to the point given. Points are in local coordinate space.
</description>
</method>
<method name="get_closest_point_normal">
<return type="Vector3">
</return>
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on.
</description>
</method>
<method name="get_closest_point_owner">
<return type="Object">
</return>
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted).
</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>
Returns the navigation point closest to the given line segment. When enabling [code]use_collision[/code], only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.
</description>
</method>
<method name="get_simple_path">
......@@ -62,41 +28,12 @@
Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
</description>
</method>
<method name="navmesh_add">
<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>
Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner].
</description>
</method>
<method name="navmesh_remove">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Removes the [NavigationMesh] with the given ID.
</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>
Sets the transform applied to the [NavigationMesh] with the given ID.
</description>
</method>
</methods>
<members>
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
</member>
<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0">
</member>
<member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
</member>
......
......@@ -4,27 +4,15 @@
2D navigation and pathfinding node.
</brief_description>
<description>
Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. By default, these are automatically collected from child [NavigationPolygonInstance] nodes, but they can also be added on the fly with [method navpoly_add].
Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationPolygonInstance] nodes.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_closest_point">
<return type="Vector2">
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
Returns the navigation point closest to the point given. Points are in local coordinate space.
</description>
</method>
<method name="get_closest_point_owner">
<return type="Object">
</return>
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted).
</description>
</method>
<method name="get_simple_path">
......@@ -40,40 +28,13 @@
Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.
</description>
</method>
<method name="navpoly_add">
<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>
Adds a [NavigationPolygon]. Returns an ID for use with [method navpoly_remove] or [method navpoly_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner].
</description>
</method>
<method name="navpoly_remove">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Removes the [NavigationPolygon] with the given ID.
</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>
Sets the transform applied to the [NavigationPolygon] with the given ID.
</description>
</method>
</methods>
<members>
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0">
</member>
<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0">
</member>
</members>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Navigation2DServer" inherits="Object" category="Core" version="3.2">
<class name="Navigation2DServer" inherits="Object" version="4.0">
<brief_description>
Server interface for low-level 2D navigation access
</brief_description>
......@@ -16,8 +16,8 @@
Creates the agent.
</description>
</method>
<method name="agent_is_map_changed">
<return type="bool" qualifiers="const">
<method name="agent_is_map_changed" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="agent" type="RID">
</argument>
......@@ -89,7 +89,7 @@
</return>
<argument index="0" name="agent" type="RID">
</argument>
<argument index="1" name="position" type="Vector3">
<argument index="1" name="position" type="Vector2">
</argument>
<description>
Sets the position of the agent in world space.
......@@ -111,7 +111,7 @@
</return>
<argument index="0" name="agent" type="RID">
</argument>
<argument index="1" name="target_velocity" type="Vector3">
<argument index="1" name="target_velocity" type="Vector2">
</argument>
<description>
Sets the new target velocity.
......@@ -133,7 +133,7 @@
</return>
<argument index="0" name="agent" type="RID">
</argument>
<argument index="1" name="velocity" type="Vector3">
<argument index="1" name="velocity" type="Vector2">
</argument>
<description>
Sets the current velocity of the agent.
......@@ -155,7 +155,7 @@
Create a new map.
</description>
</method>
<method name="map_get_cell_size">
<method name="map_get_cell_size" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="map" type="RID">
......@@ -191,7 +191,7 @@
<method name="map_is_active" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="map" type="RID">
<argument index="0" name="nap" type="RID">
</argument>
<description>
Returns true if the map is active.
......@@ -264,11 +264,13 @@
</return>
<argument index="0" name="region" type="RID">
</argument>
<argument index="1" name="transform" type="Transform">
<argument index="1" name="transform" type="Transform2D">
</argument>
<description>
Sets the global transformation for the region.
</description>
</method>
</methods>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationAgent" inherits="Node" category="Core" version="3.2">
<class name="NavigationAgent" inherits="Node" version="4.0">
<brief_description>
3D Agent used in navigation for collision avoidance.
</brief_description>
......@@ -108,32 +108,32 @@
</method>
</methods>
<members>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
The radius of the agent.
</member>
<member name="agent_height_offset" type="float" setter="set_agent_height_offset" getter="get_agent_height_offset" default="0.0">
The agent height offset to match the navigation mesh height.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0">
The distance to search for other agents.
<member name="ignore_y" type="bool" setter="set_ignore_y" getter="get_ignore_y" default="true">
Ignores collisions on the Y axis. Must be true to move on a horizontal plane.
</member>
<member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10">
The maximum number of neighbors for the agent to consider.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0">
The maximum speed that an agent can move.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0">
The distance to search for other agents.
</member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path.
</member>
<member name="ignore_y" type="bool" setter="set_ignore_y" getter="get_ignore_y" default="true">
Ignores collisions on the Y axis. Must be true to move on a horizontal plane.
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
The radius of the agent.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
</members>
<signals>
......@@ -149,15 +149,17 @@
</signal>
<signal name="target_reached">
<description>
Notifies when the player defined target, set with [method set_target_location], is reached.
Notifies when the player defined target, set with [method set_target_location], is reached.
</description>
</signal>
<signal name="velocity_computed">
<argument index="0" name="safe_velocity" type="Vector2">
<argument index="0" name="safe_velocity" type="Vector3">
</argument>
<description>
Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
</description>
</signal>
</signals>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationAgent2D" inherits="Node" category="Core" version="3.2">
<class name="NavigationAgent2D" inherits="Node" version="4.0">
<brief_description>
2D Agent used in navigation for collision avoidance.
</brief_description>
......@@ -108,27 +108,27 @@
</method>
</methods>
<members>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
The radius of the agent.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0">
The distance to search for other agents.
</member>
<member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10">
The maximum number of neighbors for the agent to consider.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0">
The maximum speed that an agent can move.
</member>
<member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0">
The distance to search for other agents.
</member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
The radius of the agent.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
</members>
<signals>
<signal name="navigation_finished">
......@@ -143,15 +143,17 @@
</signal>
<signal name="target_reached">
<description>
Notifies when the player defined target, set with [method set_target_location], is reached.
Notifies when the player defined target, set with [method set_target_location], is reached.
</description>
</signal>
<signal name="velocity_computed">
<argument index="0" name="safe_velocity" type="Vector2">
<argument index="0" name="safe_velocity" type="Vector3">
</argument>
<description>
Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
</description>
</signal>
</signals>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorNavigationMeshGenerator" inherits="Object" version="4.0">
<class name="NavigationMeshGenerator" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationObstacle" inherits="Node" category="Core" version="3.2">
<class name="NavigationObstacle" inherits="Node" version="4.0">
<brief_description>
3D Obstacle used in navigation for collision avoidance.
</brief_description>
......@@ -26,4 +26,6 @@
</description>
</method>
</methods>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationObstacle2D" inherits="Node" category="Core" version="3.2">
<class name="NavigationObstacle2D" inherits="Node" version="4.0">
<brief_description>
2D Obstacle used in navigation for collision avoidance.
</brief_description>
......@@ -26,4 +26,6 @@
</description>
</method>
</methods>
<constants>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationServer" inherits="Object" category="Core" version="3.2">
<class name="NavigationServer" inherits="Object" version="4.0">
<brief_description>
Server interface for low-level 3D navigation access
</brief_description>
......@@ -16,8 +16,8 @@
Creates the agent.
</description>
</method>
<method name="agent_is_map_changed">
<return type="bool" qualifiers="const">
<method name="agent_is_map_changed" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="agent" type="RID">
</argument>
......@@ -155,7 +155,7 @@
Create a new map.
</description>
</method>
<method name="map_get_cell_size">
<method name="map_get_cell_size" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="map" type="RID">
......@@ -200,7 +200,7 @@
<method name="map_is_active" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="map" type="RID">
<argument index="0" name="nap" type="RID">
</argument>
<description>
Returns true if the map is active.
......@@ -320,4 +320,6 @@
</description>
</method>
</methods>
<constants>
</constants>
</class>
......@@ -56,7 +56,7 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
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. If the rect is empty, NinePatchRect will use the whole texture.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The node's texture resource.
</member>
</members>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture3D" inherits="TextureLayered" version="4.0">
<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0">
<brief_description>
Texture with 3 dimensions.
</brief_description>
<description>
Texture3D is a 3-dimensional texture that has a width, height, and depth.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" override="true" default="{&quot;depth&quot;: 0,&quot;flags&quot;: 4,&quot;format&quot;: 37,&quot;height&quot;: 0,&quot;layers&quot;: [ ],&quot;width&quot;: 0}" />
</members>
<constants>
</constants>
</class>
......@@ -18,9 +18,6 @@
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
The light's radius.
</member>
<member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
See [enum ShadowDetail].
</member>
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1">
See [enum ShadowMode].
</member>
......@@ -32,11 +29,5 @@
<constant name="SHADOW_CUBE" value="1" enum="ShadowMode">
Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality.
</constant>
<constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail">
Use more detail vertically when computing the shadow.
</constant>
<constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail">
Use more detail horizontally when computing the shadow.
</constant>
</constants>
</class>
......@@ -12,7 +12,7 @@
<method name="add_icon_item">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
......@@ -55,7 +55,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
......@@ -164,7 +164,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Sets the icon of the item at index [code]idx[/code].
......@@ -231,7 +231,7 @@
<constants>
</constants>
<theme_items>
<theme_item name="arrow" type="Texture">
<theme_item name="arrow" type="Texture2D">
The arrow icon to be drawn on the right end of the button.
</theme_item>
<theme_item name="arrow_margin" type="int" default="2">
......
......@@ -11,8 +11,8 @@
<methods>
</methods>
<members>
<member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama">
[Texture] to be applied to the PanoramaSky.
<member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama">
[Texture2D] to be applied to the PanoramaSky.
</member>
</members>
<constants>
......
......@@ -14,7 +14,7 @@
</methods>
<members>
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )">
The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture] will not be mirrored.
The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored.
</member>
<member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )">
The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
......
......@@ -68,7 +68,7 @@
<member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1">
The number of draw passes when rendering particles.
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
......
......@@ -33,7 +33,7 @@
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="false">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
......@@ -51,7 +51,7 @@
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
Normal map to be used for the [member texture] property.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
......@@ -69,7 +69,7 @@
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
<member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )">
......
......@@ -43,12 +43,6 @@
<description>
</description>
</method>
<method name="is_static_body">
<return type="bool">
</return>
<description>
</description>
</method>
</methods>
<members>
<member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
......
......@@ -5,7 +5,7 @@
</brief_description>
<description>
The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud).
PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [SpatialMaterial] by setting [member SpatialMaterial.flags_use_point_size] and the variable [member SpatialMaterial.params_point_size].
PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with [code]POINT_SIZE[/code], or in a [BaseMaterial3D] by setting [member BaseMaterial3D.use_point_size] and the variable [member BaseMaterial3D.point_size].
When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face.
</description>
<tutorials>
......
......@@ -5,7 +5,6 @@
</brief_description>
<description>
A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture.
[b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb].
</description>
<tutorials>
</tutorials>
......@@ -94,6 +93,8 @@
<member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false">
If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code].
</member>
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The offset applied to each vertex.
</member>
......@@ -103,9 +104,15 @@
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]">
</member>
<member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
</member>
<member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath(&quot;&quot;)">
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
</member>
<member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map">
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The polygon's fill texture. Use [code]uv[/code] to set texture coordinates.
</member>
<member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )">
......
......@@ -42,7 +42,7 @@
<method name="add_icon_check_item">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
......@@ -59,7 +59,7 @@
<method name="add_icon_check_shortcut">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
......@@ -76,7 +76,7 @@
<method name="add_icon_item">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
......@@ -92,7 +92,7 @@
<method name="add_icon_radio_check_item">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
......@@ -107,7 +107,7 @@
<method name="add_icon_radio_check_shortcut">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
......@@ -122,7 +122,7 @@
<method name="add_icon_shortcut">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
<argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
......@@ -259,7 +259,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
......@@ -485,10 +485,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="icon" type="Texture">
<argument index="1" name="icon" type="Texture2D">
</argument>
<description>
Replaces the [Texture] icon of the specified [code]idx[/code].
Replaces the [Texture2D] icon of the specified [code]idx[/code].
</description>
</method>
<method name="set_item_id">
......@@ -644,8 +644,8 @@
<constants>
</constants>
<theme_items>
<theme_item name="checked" type="Texture">
[Texture] icon for the checked checkbox items.
<theme_item name="checked" type="Texture2D">
[Texture2D] icon for the checked checkbox items.
</theme_item>
<theme_item name="font" type="Font">
[Font] used for the menu items.
......@@ -680,20 +680,20 @@
<theme_item name="panel_disabled" type="StyleBox">
[StyleBox] used when the [PopupMenu] item is disabled.
</theme_item>
<theme_item name="radio_checked" type="Texture">
[Texture] icon for the checked radio button items.
<theme_item name="radio_checked" type="Texture2D">
[Texture2D] icon for the checked radio button items.
</theme_item>
<theme_item name="radio_unchecked" type="Texture">
[Texture] icon for the unchecked radio button items.
<theme_item name="radio_unchecked" type="Texture2D">
[Texture2D] icon for the unchecked radio button items.
</theme_item>
<theme_item name="separator" type="StyleBox">
[StyleBox] used for the separators. See [method add_separator].
</theme_item>
<theme_item name="submenu" type="Texture">
[Texture] icon for the submenu arrow.
<theme_item name="submenu" type="Texture2D">
[Texture2D] icon for the submenu arrow.
</theme_item>
<theme_item name="unchecked" type="Texture">
[Texture] icon for the unchecked checkbox items.
<theme_item name="unchecked" type="Texture2D">
[Texture2D] icon for the unchecked checkbox items.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
The vertical space between each menu item.
......
......@@ -23,7 +23,7 @@
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode].
This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
......
......@@ -58,7 +58,7 @@
The direction of the sun using polar coordinates.
</member>
<member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize" default="2">
Size of [Texture] that the ProceduralSky will generate. The size is set using [enum TextureSize].
Size of [Texture2D] that the ProceduralSky will generate. The size is set using [enum TextureSize].
</member>
</members>
<constants>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ProxyTexture" inherits="Texture" version="4.0">
<class name="ProxyTexture" inherits="Texture2D" version="4.0">
<brief_description>
</brief_description>
<description>
......@@ -9,9 +9,8 @@
<methods>
</methods>
<members>
<member name="base" type="Texture" setter="set_base" getter="get_base">
<member name="base" type="Texture2D" setter="set_base" getter="get_base">
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
</members>
<constants>
</constants>
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RenderingDevice" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>
......@@ -37,7 +37,7 @@
<return type="RID">
</return>
<description>
Returns 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.
Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.
</description>
</method>
<method name="setup_local_to_scene">
......
......@@ -14,7 +14,7 @@
<method name="add_image">
<return type="void">
</return>
<argument index="0" name="image" type="Texture">
<argument index="0" name="image" type="Texture2D">
</argument>
<argument index="1" name="width" type="int" default="0">
</argument>
......
......@@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="get_default_texture_param" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="param" type="String">
</argument>
......@@ -43,7 +43,7 @@
</return>
<argument index="0" name="param" type="String">
</argument>
<argument index="1" name="texture" type="Texture">
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].
......
......@@ -258,6 +258,10 @@
</description>
</method>
</methods>
<members>
<member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true">
</member>
</members>
<constants>
<constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
</constant>
......
......@@ -11,6 +11,8 @@
<methods>
</methods>
<members>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0">
</member>
<member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2">
The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be.
See [enum RadianceSize] constants for values.
......@@ -42,5 +44,9 @@
<constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize">
Represents the size of the [enum RadianceSize] enum.
</constant>
<constant name="PROCESS_MODE_QUALITY" value="0" enum="ProcessMode">
</constant>
<constant name="PROCESS_MODE_REALTIME" value="1" enum="ProcessMode">
</constant>
</constants>
</class>
......@@ -51,8 +51,8 @@
<constants>
</constants>
<theme_items>
<theme_item name="updown" type="Texture">
Sets a custom [Texture] for up and down arrows of the [SpinBox].
<theme_item name="updown" type="Texture2D">
Sets a custom [Texture2D] for up and down arrows of the [SpinBox].
</theme_item>
</theme_items>
</class>
......@@ -52,7 +52,7 @@
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1">
The number of columns in the sprite sheet.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
<member name="normal_map" type="Texture2D" setter="set_normal_map" getter="get_normal_map">
The normal map gives depth to the Sprite.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
......@@ -67,8 +67,14 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
[Texture] object to draw.
<member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
</member>
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
</member>
<member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map">
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] object to draw.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1">
The number of rows in the sprite sheet.
......
......@@ -26,8 +26,8 @@
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
[Texture] object to draw.
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] object to draw.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1">
The number of rows in the sprite sheet.
......
......@@ -46,7 +46,7 @@
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2">
The direction in which the front of the texture faces.
</member>
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0">
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
If [code]true[/code], texture will be centered.
......
......@@ -23,7 +23,7 @@
</return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="frame" type="Texture">
<argument index="1" name="frame" type="Texture2D">
</argument>
<argument index="2" name="at_position" type="int" default="-1">
</argument>
......@@ -73,7 +73,7 @@
</description>
</method>
<method name="get_frame" qualifiers="const">
<return type="Texture">
<return type="Texture2D">
</return>
<argument index="0" name="anim" type="String">
</argument>
......@@ -161,7 +161,7 @@
</argument>
<argument index="1" name="idx" type="int">
</argument>
<argument index="2" name="txt" type="Texture">
<argument index="2" name="txt" type="Texture2D">
</argument>
<description>
Sets the texture of the given frame.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment