From eef7baf24c5e797ebd043cc7fe577541053f7a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 16 Jun 2019 11:23:24 +0200 Subject: [PATCH] Sync classref with current source --- classes/class_@globalscope.rst | 8 ++ classes/class_animationnode.rst | 2 + classes/class_animationnodeadd2.rst | 9 +- classes/class_animationnodeadd3.rst | 17 ++- classes/class_animationnodeanimation.rst | 9 +- classes/class_animationnodeblend2.rst | 9 +- classes/class_animationnodeblend3.rst | 17 ++- classes/class_animationnodeblendspace1d.rst | 35 +++++- classes/class_animationnodeblendspace2d.rst | 55 ++++++++- classes/class_arvrinterface.rst | 8 ++ classes/class_camerafeed.rst | 128 ++++++++++++++++++++ classes/class_cameraserver.rst | 104 ++++++++++++++++ classes/class_cameratexture.rst | 68 +++++++++++ classes/class_environment.rst | 20 ++- classes/class_object.rst | 2 +- classes/class_projectsettings.rst | 8 ++ classes/class_reference.rst | 2 +- classes/class_texture.rst | 2 +- classes/class_visualserver.rst | 16 ++- 19 files changed, 501 insertions(+), 18 deletions(-) create mode 100644 classes/class_camerafeed.rst create mode 100644 classes/class_cameraserver.rst create mode 100644 classes/class_cameratexture.rst diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 7288a757e..21581f373 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -22,6 +22,8 @@ Properties +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`AudioServer` | :ref:`AudioServer` | +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`CameraServer` | :ref:`CameraServer` | ++---------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`ClassDB` | :ref:`ClassDB` | +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Engine` | :ref:`Engine` | @@ -2147,6 +2149,12 @@ Property Descriptions :ref:`AudioServer` singleton +.. _class_@GlobalScope_property_CameraServer: + +- :ref:`CameraServer` **CameraServer** + +:ref:`CameraServer` singleton + .. _class_@GlobalScope_property_ClassDB: - :ref:`ClassDB` **ClassDB** diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index b81d29766..346652f67 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -79,6 +79,8 @@ Called when the node was removed from the graph. - **tree_changed** **(** **)** +Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. + Enumerations ------------ diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index 64489ab52..e0d7b72c0 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -14,7 +14,7 @@ AnimationNodeAdd2 Brief Description ----------------- - +Blends two animations additively inside of an :ref:`AnimationNodeBlendTree`. Properties ---------- @@ -23,6 +23,11 @@ Properties | :ref:`bool` | :ref:`sync` | +-------------------------+----------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range. + Property Descriptions --------------------- @@ -36,3 +41,5 @@ Property Descriptions | *Getter* | is_using_sync() | +----------+---------------------+ +If ``true``, sets the ``optimization`` to ``false`` when calling :ref:`AnimationNode.blend_input`, forcing the blended animations to update every frame. + diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index efc729555..f970b9f85 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -14,7 +14,7 @@ AnimationNodeAdd3 Brief Description ----------------- - +Blends two of three animations additively inside of an :ref:`AnimationNodeBlendTree`. Properties ---------- @@ -23,6 +23,19 @@ Properties | :ref:`bool` | :ref:`sync` | +-------------------------+----------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations together additively out of three based on a value in the ``[-1.0, 1.0]`` range. + +This node has three inputs: + +- The base animation to add to + +- A -add animation to blend with when the blend amount is in the ``[-1.0, 0.0]`` range. + +- A +add animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range + Property Descriptions --------------------- @@ -36,3 +49,5 @@ Property Descriptions | *Getter* | is_using_sync() | +----------+---------------------+ +If ``true``, sets the ``optimization`` to ``false`` when calling :ref:`AnimationNode.blend_input`, forcing the blended animations to update every frame. + diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index a35b2176d..bc766b8a3 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -14,7 +14,7 @@ AnimationNodeAnimation Brief Description ----------------- - +Input animation to use in an :ref:`AnimationNodeBlendTree`. Properties ---------- @@ -23,6 +23,11 @@ Properties | :ref:`String` | :ref:`animation` | +-----------------------------+-------------------------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Only features one output set using the :ref:`animation` property. Use it as an input for :ref:`AnimationNode` that blend animations together. + Property Descriptions --------------------- @@ -36,3 +41,5 @@ Property Descriptions | *Getter* | get_animation() | +----------+----------------------+ +Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player`. + diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index d0d351271..afe0462e0 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -14,7 +14,7 @@ AnimationNodeBlend2 Brief Description ----------------- - +Blends two animations linearly inside of an :ref:`AnimationNodeBlendTree`. Properties ---------- @@ -23,6 +23,11 @@ Properties | :ref:`bool` | :ref:`sync` | +-------------------------+------------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range. + Property Descriptions --------------------- @@ -36,3 +41,5 @@ Property Descriptions | *Getter* | is_using_sync() | +----------+---------------------+ +If ``true``, sets the ``optimization`` to ``false`` when calling :ref:`AnimationNode.blend_input`, forcing the blended animations to update every frame. + diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index 75729ff0c..82fbb8643 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -14,7 +14,7 @@ AnimationNodeBlend3 Brief Description ----------------- - +Blends two of three animations linearly inside of an :ref:`AnimationNodeBlendTree`. Properties ---------- @@ -23,6 +23,19 @@ Properties | :ref:`bool` | :ref:`sync` | +-------------------------+------------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations together linearly out of three based on a value in the ``[-1.0, 1.0]`` range. + +This node has three inputs: + +- The base animation + +- A -blend animation to blend with when the blend amount is in the ``[-1.0, 0.0]`` range. + +- A +blend animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range + Property Descriptions --------------------- @@ -36,3 +49,5 @@ Property Descriptions | *Getter* | is_using_sync() | +----------+---------------------+ +If ``true``, sets the ``optimization`` to ``false`` when calling :ref:`AnimationNode.blend_input`, forcing the blended animations to update every frame. + diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index 8f26b9ba2..a47ace85b 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -14,7 +14,7 @@ AnimationNodeBlendSpace1D Brief Description ----------------- - +Blends linearly between two of any number of :ref:`AnimationNode` of any type placed on a virtual axis. Properties ---------- @@ -48,6 +48,17 @@ Methods | void | :ref:`set_blend_point_position` **(** :ref:`int` point, :ref:`float` pos **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. + +This is a virtual axis on which you can add any type of :ref:`AnimationNode` using :ref:`add_blend_point`. + +Outputs the linear blend of the two ``AnimationNode`` closest to the node's current ``value``. + +You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. + Property Descriptions --------------------- @@ -61,6 +72,8 @@ Property Descriptions | *Getter* | get_max_space() | +----------+----------------------+ +The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point`. + .. _class_AnimationNodeBlendSpace1D_property_min_space: - :ref:`float` **min_space** @@ -71,6 +84,8 @@ Property Descriptions | *Getter* | get_min_space() | +----------+----------------------+ +The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point`. + .. _class_AnimationNodeBlendSpace1D_property_snap: - :ref:`float` **snap** @@ -81,6 +96,8 @@ Property Descriptions | *Getter* | get_snap() | +----------+-----------------+ +Position increment to snap to when moving a point on the axis. + .. _class_AnimationNodeBlendSpace1D_property_value_label: - :ref:`String` **value_label** @@ -91,6 +108,8 @@ Property Descriptions | *Getter* | get_value_label() | +----------+------------------------+ +Label of the virtual axis of the blend space. + Method Descriptions ------------------- @@ -98,27 +117,41 @@ Method Descriptions - void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** +Add a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. + .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count: - :ref:`int` **get_blend_point_count** **(** **)** const +Returns the number of points on the blend axis. + .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node: - :ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** const +Returns the ``AnimationNode`` referenced by the point at index ``point``. + .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position: - :ref:`float` **get_blend_point_position** **(** :ref:`int` point **)** const +Returns the position of the point at index ``point``. + .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point: - void **remove_blend_point** **(** :ref:`int` point **)** +Removes the point at index ``point`` from the blend axis. + .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node: - void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +Changes the AnimationNode referenced by the point at index ``point``. + .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position: - void **set_blend_point_position** **(** :ref:`int` point, :ref:`float` pos **)** +Updates the position of the point at index ``point`` on the blend axis. + diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 18ef5c6bc..a5854de59 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -14,7 +14,7 @@ AnimationNodeBlendSpace2D Brief Description ----------------- - +Blends linearly between three :ref:`AnimationNode` of any type placed in a 2d space. Properties ---------- @@ -69,6 +69,8 @@ Signals - **triangles_updated** **(** **)** +Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. + Enumerations ------------ @@ -82,11 +84,20 @@ Enumerations enum **BlendMode**: -- **BLEND_MODE_INTERPOLATED** = **0** +- **BLEND_MODE_INTERPOLATED** = **0** --- The interpolation between animations is linear. -- **BLEND_MODE_DISCRETE** = **1** --- Useful for frame-by-frame 2D animations. +- **BLEND_MODE_DISCRETE** = **1** --- The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. -- **BLEND_MODE_DISCRETE_CARRY** = **2** --- Keep the current play position when switching between discrete animations. +- **BLEND_MODE_DISCRETE_CARRY** = **2** --- Similar to :ref:`BLEND_MODE_DISCRETE`, but starts the new animation at the last animation's playback position. + +Description +----------- + +A resource to add to an :ref:`AnimationNodeBlendTree`. + +This node allows you to blend linearly between three animations using a :ref:`Vector2` weight. + +You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to create up the blend space by hand. Property Descriptions --------------------- @@ -101,6 +112,8 @@ Property Descriptions | *Getter* | get_auto_triangles() | +----------+---------------------------+ +If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. + .. _class_AnimationNodeBlendSpace2D_property_blend_mode: - :ref:`BlendMode` **blend_mode** @@ -111,6 +124,8 @@ Property Descriptions | *Getter* | get_blend_mode() | +----------+-----------------------+ +Controls the interpolation between animations. See :ref:`BlendMode` constants. + .. _class_AnimationNodeBlendSpace2D_property_max_space: - :ref:`Vector2` **max_space** @@ -121,6 +136,8 @@ Property Descriptions | *Getter* | get_max_space() | +----------+----------------------+ +The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point`. + .. _class_AnimationNodeBlendSpace2D_property_min_space: - :ref:`Vector2` **min_space** @@ -131,6 +148,8 @@ Property Descriptions | *Getter* | get_min_space() | +----------+----------------------+ +The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point`. + .. _class_AnimationNodeBlendSpace2D_property_snap: - :ref:`Vector2` **snap** @@ -141,6 +160,8 @@ Property Descriptions | *Getter* | get_snap() | +----------+-----------------+ +Position increment to snap to when moving a point. + .. _class_AnimationNodeBlendSpace2D_property_x_label: - :ref:`String` **x_label** @@ -151,6 +172,8 @@ Property Descriptions | *Getter* | get_x_label() | +----------+--------------------+ +Name of the blend space's X axis. + .. _class_AnimationNodeBlendSpace2D_property_y_label: - :ref:`String` **y_label** @@ -161,6 +184,8 @@ Property Descriptions | *Getter* | get_y_label() | +----------+--------------------+ +Name of the blend space's Y axis. + Method Descriptions ------------------- @@ -168,43 +193,65 @@ Method Descriptions - void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** +Add a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. + .. _class_AnimationNodeBlendSpace2D_method_add_triangle: - void **add_triangle** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` at_index=-1 **)** +Creates a new triangle using three points ``x``, ``y``, and ``z``. Triangles can overlap. You can insert the triangle at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array. + .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_count: - :ref:`int` **get_blend_point_count** **(** **)** const +Returns the number of points in the blend space. + .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_node: - :ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** const +Returns the ``AnimationRootNode`` referenced by the point at index ``point``. + .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_position: - :ref:`Vector2` **get_blend_point_position** **(** :ref:`int` point **)** const +Returns the position of the point at index ``point``. + .. _class_AnimationNodeBlendSpace2D_method_get_triangle_count: - :ref:`int` **get_triangle_count** **(** **)** const +Returns the number of triangles in the blend space. + .. _class_AnimationNodeBlendSpace2D_method_get_triangle_point: - :ref:`int` **get_triangle_point** **(** :ref:`int` triangle, :ref:`int` point **)** +Returns the position of the point at index ``point`` in the triangle of index ``triangle``. + .. _class_AnimationNodeBlendSpace2D_method_remove_blend_point: - void **remove_blend_point** **(** :ref:`int` point **)** +Removes the point at index ``point`` from the blend space. + .. _class_AnimationNodeBlendSpace2D_method_remove_triangle: - void **remove_triangle** **(** :ref:`int` triangle **)** +Removes the triangle at index ``triangle`` from the blend space. + .. _class_AnimationNodeBlendSpace2D_method_set_blend_point_node: - void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +Changes the AnimationNode referenced by the point at index ``point``. + .. _class_AnimationNodeBlendSpace2D_method_set_blend_point_position: - void **set_blend_point_position** **(** :ref:`int` point, :ref:`Vector2` pos **)** +Updates the position of the point at index ``point`` on the blend axis. + diff --git a/classes/class_arvrinterface.rst b/classes/class_arvrinterface.rst index e51cc8ca4..ef641f4d3 100644 --- a/classes/class_arvrinterface.rst +++ b/classes/class_arvrinterface.rst @@ -32,6 +32,8 @@ Properties Methods ------- ++------------------------------------------------------------+----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_camera_feed_id` **(** **)** | +------------------------------------------------------------+----------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_capabilities` **(** **)** const | +------------------------------------------------------------+----------------------------------------------------------------------------------------------+ @@ -164,6 +166,12 @@ Is this our primary interface? Method Descriptions ------------------- +.. _class_ARVRInterface_method_get_camera_feed_id: + +- :ref:`int` **get_camera_feed_id** **(** **)** + +If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed id in the :ref:`CameraServer` for this interface. + .. _class_ARVRInterface_method_get_capabilities: - :ref:`int` **get_capabilities** **(** **)** const diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst new file mode 100644 index 000000000..6eb2797e8 --- /dev/null +++ b/classes/class_camerafeed.rst @@ -0,0 +1,128 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the CameraFeed.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_CameraFeed: + +CameraFeed +========== + +**Inherits:** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +A camera feed gives you access to a single physical camera attached to your device. + +Properties +---------- + ++---------------------------------------+-----------------------------------------------------------------+ +| :ref:`bool` | :ref:`feed_is_active` | ++---------------------------------------+-----------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`feed_transform` | ++---------------------------------------+-----------------------------------------------------------------+ + +Methods +------- + ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_id` **(** **)** const | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** const | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`FeedPosition` | :ref:`get_position` **(** **)** const | ++---------------------------------------------------+-----------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_CameraFeed_FeedDataType: + +.. _class_CameraFeed_constant_FEED_NOIMAGE: + +.. _class_CameraFeed_constant_FEED_RGB: + +.. _class_CameraFeed_constant_FEED_YCbCr: + +.. _class_CameraFeed_constant_FEED_YCbCr_Sep: + +enum **FeedDataType**: + +- **FEED_NOIMAGE** = **0** --- No image set for the feed. + +- **FEED_RGB** = **1** --- Feed supplies RGB images. + +- **FEED_YCbCr** = **2** --- Feed supplies YCbCr images that need to be converted to RGB. + +- **FEED_YCbCr_Sep** = **3** --- Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + +.. _enum_CameraFeed_FeedPosition: + +.. _class_CameraFeed_constant_FEED_UNSPECIFIED: + +.. _class_CameraFeed_constant_FEED_FRONT: + +.. _class_CameraFeed_constant_FEED_BACK: + +enum **FeedPosition**: + +- **FEED_UNSPECIFIED** = **0** --- Unspecified position. + +- **FEED_FRONT** = **1** --- Camera is mounted at the front of the device. + +- **FEED_BACK** = **2** --- Camera is moutned at the back of the device. + +Description +----------- + +A camera feed gives you access to a single physical camera attached to your device. + +When enabled Godot will start capturing frames from the camera which can then be used. Do note that many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. + +Property Descriptions +--------------------- + +.. _class_CameraFeed_property_feed_is_active: + +- :ref:`bool` **feed_is_active** + ++----------+-------------------+ +| *Setter* | set_active(value) | ++----------+-------------------+ +| *Getter* | is_active() | ++----------+-------------------+ + +.. _class_CameraFeed_property_feed_transform: + +- :ref:`Transform2D` **feed_transform** + ++----------+----------------------+ +| *Setter* | set_transform(value) | ++----------+----------------------+ +| *Getter* | get_transform() | ++----------+----------------------+ + +Method Descriptions +------------------- + +.. _class_CameraFeed_method_get_id: + +- :ref:`int` **get_id** **(** **)** const + +Get unique id for this feed + +.. _class_CameraFeed_method_get_name: + +- :ref:`String` **get_name** **(** **)** const + +Get name of the camera + +.. _class_CameraFeed_method_get_position: + +- :ref:`FeedPosition` **get_position** **(** **)** const + +Position of camera on the device. + diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst new file mode 100644 index 000000000..cd871ccee --- /dev/null +++ b/classes/class_cameraserver.rst @@ -0,0 +1,104 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the CameraServer.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_CameraServer: + +CameraServer +============ + +**Inherits:** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Our camera server keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. + +Methods +------- + ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_feed` **(** :ref:`CameraFeed` feed **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`feeds` **(** **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`CameraFeed` | :ref:`get_feed` **(** :ref:`int` index **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_feed_count` **(** **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_feed` **(** :ref:`CameraFeed` feed **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_CameraServer_signal_camera_feed_added: + +- **camera_feed_added** **(** :ref:`int` id **)** + +Emitted when a :ref:`CameraFeed` is added (webcam is plugged in). + +.. _class_CameraServer_signal_camera_feed_removed: + +- **camera_feed_removed** **(** :ref:`int` id **)** + +Emitted when a :ref:`CameraFeed` is removed (webcam is removed). + +Enumerations +------------ + +.. _enum_CameraServer_FeedImage: + +.. _class_CameraServer_constant_FEED_RGBA_IMAGE: + +.. _class_CameraServer_constant_FEED_YCbCr_IMAGE: + +.. _class_CameraServer_constant_FEED_Y_IMAGE: + +.. _class_CameraServer_constant_FEED_CbCr_IMAGE: + +enum **FeedImage**: + +- **FEED_RGBA_IMAGE** = **0** --- The RGBA camera image. + +- **FEED_YCbCr_IMAGE** = **0** --- The YCbCr camera image. + +- **FEED_Y_IMAGE** = **0** --- The Y component camera image. + +- **FEED_CbCr_IMAGE** = **1** --- The CbCr component camera image. + +Method Descriptions +------------------- + +.. _class_CameraServer_method_add_feed: + +- void **add_feed** **(** :ref:`CameraFeed` feed **)** + +Adds a camera feed to the camera server. + +.. _class_CameraServer_method_feeds: + +- :ref:`Array` **feeds** **(** **)** + +Returns an array of :ref:`CameraFeed`\ s. + +.. _class_CameraServer_method_get_feed: + +- :ref:`CameraFeed` **get_feed** **(** :ref:`int` index **)** + +Returns the :ref:`CameraFeed` with this id. + +.. _class_CameraServer_method_get_feed_count: + +- :ref:`int` **get_feed_count** **(** **)** + +Returns the number of :ref:`CameraFeed`\ s registered. + +.. _class_CameraServer_method_remove_feed: + +- void **remove_feed** **(** :ref:`CameraFeed` feed **)** + +Removes a :ref:`CameraFeed`. + diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst new file mode 100644 index 000000000..0bd08f413 --- /dev/null +++ b/classes/class_cameratexture.rst @@ -0,0 +1,68 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the CameraTexture.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_CameraTexture: + +CameraTexture +============= + +**Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +This texture gives access to the camera texture provided by a :ref:`CameraFeed`. Note that many cameras supply YCbCr images which need to be converted in a shader. + +Properties +---------- + ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`int` | :ref:`camera_feed_id` | ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`camera_is_active` | ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`FeedImage` | :ref:`which_feed` | ++-----------------------------------------------+------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_CameraTexture_property_camera_feed_id: + +- :ref:`int` **camera_feed_id** + ++----------+---------------------------+ +| *Setter* | set_camera_feed_id(value) | ++----------+---------------------------+ +| *Getter* | get_camera_feed_id() | ++----------+---------------------------+ + +Id of the :ref:`CameraFeed` for which we want to display the image. + +.. _class_CameraTexture_property_camera_is_active: + +- :ref:`bool` **camera_is_active** + ++----------+--------------------------+ +| *Setter* | set_camera_active(value) | ++----------+--------------------------+ +| *Getter* | get_camera_active() | ++----------+--------------------------+ + +Convenience property that gives access to the active property of the :ref:`CameraFeed`. + +.. _class_CameraTexture_property_which_feed: + +- :ref:`FeedImage` **which_feed** + ++----------+-----------------------+ +| *Setter* | set_which_feed(value) | ++----------+-----------------------+ +| *Getter* | get_which_feed() | ++----------+-----------------------+ + +Which image within the :ref:`CameraFeed` we want access to, important if the camera image is split in a Y and CbCr component. + diff --git a/classes/class_environment.rst b/classes/class_environment.rst index fb01748ed..5f298c870 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -46,6 +46,8 @@ Properties +--------------------------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`auto_exposure_speed` | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`background_camera_feed_id` | ++--------------------------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`background_canvas_max_layer` | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`background_color` | @@ -204,6 +206,8 @@ Enumerations .. _class_Environment_constant_BG_CANVAS: +.. _class_Environment_constant_BG_CAMERA_FEED: + .. _class_Environment_constant_BG_MAX: enum **BGMode**: @@ -220,7 +224,9 @@ enum **BGMode**: - **BG_CANVAS** = **4** --- Display a :ref:`CanvasLayer` in the background. -- **BG_MAX** = **6** --- Helper constant keeping track of the enum's size, has no direct usage in API calls. +- **BG_CAMERA_FEED** = **6** --- Display a camera feed in the background. + +- **BG_MAX** = **7** --- Helper constant keeping track of the enum's size, has no direct usage in API calls. .. _enum_Environment_GlowBlendMode: @@ -495,6 +501,18 @@ Scale of the auto exposure effect. Affects the intensity of auto exposure. Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. +.. _class_Environment_property_background_camera_feed_id: + +- :ref:`int` **background_camera_feed_id** + ++----------+---------------------------+ +| *Setter* | set_camera_feed_id(value) | ++----------+---------------------------+ +| *Getter* | get_camera_feed_id() | ++----------+---------------------------+ + +The id of the camera feed to show in the background. + .. _class_Environment_property_background_canvas_max_layer: - :ref:`int` **background_canvas_max_layer** diff --git a/classes/class_object.rst b/classes/class_object.rst index d3fa87302..3ca7965a5 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -7,7 +7,7 @@ Object ====== -**Inherited By:** :ref:`ARVRPositionalTracker`, :ref:`ARVRServer`, :ref:`AudioServer`, :ref:`ClassDB`, :ref:`EditorFileSystemDirectory`, :ref:`EditorNavigationMeshGenerator`, :ref:`EditorSelection`, :ref:`Engine`, :ref:`Geometry`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JSON`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`Physics2DDirectBodyState`, :ref:`Physics2DDirectSpaceState`, :ref:`Physics2DServer`, :ref:`PhysicsDirectBodyState`, :ref:`PhysicsDirectSpaceState`, :ref:`PhysicsServer`, :ref:`ProjectSettings`, :ref:`Reference`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptEditor`, :ref:`VisualServer` +**Inherited By:** :ref:`ARVRPositionalTracker`, :ref:`ARVRServer`, :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`EditorFileSystemDirectory`, :ref:`EditorNavigationMeshGenerator`, :ref:`EditorSelection`, :ref:`Engine`, :ref:`Geometry`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JSON`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`Physics2DDirectBodyState`, :ref:`Physics2DDirectSpaceState`, :ref:`Physics2DServer`, :ref:`PhysicsDirectBodyState`, :ref:`PhysicsDirectSpaceState`, :ref:`PhysicsServer`, :ref:`ProjectSettings`, :ref:`Reference`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptEditor`, :ref:`VisualServer` **Category:** Core diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index dd64e66bd..be5e74562 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -28,6 +28,8 @@ Properties +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/boot_splash/image` | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`application/boot_splash/use_filter` | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/custom_user_dir_name` | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/icon` | @@ -618,6 +620,12 @@ If ``true``, scale the boot splash image to the full window length when engine s Path to an image used as the boot splash. +.. _class_ProjectSettings_property_application/boot_splash/use_filter: + +- :ref:`bool` **application/boot_splash/use_filter** + +If ``true``, applies linear filtering when scaling the image (recommended for high resolution artwork). If ``false``, uses nearest-neighbor interpolation (recommended for pixel art). + .. _class_ProjectSettings_property_application/config/custom_user_dir_name: - :ref:`String` **application/config/custom_user_dir_name** diff --git a/classes/class_reference.rst b/classes/class_reference.rst index 986459b24..a8baf36c6 100644 --- a/classes/class_reference.rst +++ b/classes/class_reference.rst @@ -9,7 +9,7 @@ Reference **Inherits:** :ref:`Object` -**Inherited By:** :ref:`ARVRInterface`, :ref:`AStar`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`ConfigFile`, :ref:`Directory`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorImportPlugin`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScript`, :ref:`EncodedObjectAsID`, :ref:`Expression`, :ref:`File`, :ref:`FuncRef`, :ref:`GDNative`, :ref:`GDScriptFunctionState`, :ref:`GDScriptNativeClass`, :ref:`HTTPClient`, :ref:`JSONParseResult`, :ref:`KinematicCollision`, :ref:`KinematicCollision2D`, :ref:`Marshalls`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`Physics2DShapeQueryParameters`, :ref:`Physics2DShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`PhysicsShapeQueryParameters`, :ref:`PhysicsShapeQueryResult`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`ResourceInteractiveLoader`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SpatialGizmo`, :ref:`SpatialVelocityTracker`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCP_Server`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser` +**Inherited By:** :ref:`ARVRInterface`, :ref:`AStar`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`ConfigFile`, :ref:`Directory`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorImportPlugin`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScript`, :ref:`EncodedObjectAsID`, :ref:`Expression`, :ref:`File`, :ref:`FuncRef`, :ref:`GDNative`, :ref:`GDScriptFunctionState`, :ref:`GDScriptNativeClass`, :ref:`HTTPClient`, :ref:`JSONParseResult`, :ref:`KinematicCollision`, :ref:`KinematicCollision2D`, :ref:`Marshalls`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`Physics2DShapeQueryParameters`, :ref:`Physics2DShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`PhysicsShapeQueryParameters`, :ref:`PhysicsShapeQueryResult`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`ResourceInteractiveLoader`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SpatialGizmo`, :ref:`SpatialVelocityTracker`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCP_Server`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser` **Category:** Core diff --git a/classes/class_texture.rst b/classes/class_texture.rst index 594d5bcf9..23d1d13ce 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -9,7 +9,7 @@ Texture **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CurveTexture`, :ref:`GradientTexture`, :ref:`ImageTexture`, :ref:`LargeTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`StreamTexture`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CurveTexture`, :ref:`GradientTexture`, :ref:`ImageTexture`, :ref:`LargeTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`StreamTexture`, :ref:`ViewportTexture` **Category:** Core diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index 3d9d0f05a..e1e96ddcd 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -596,7 +596,7 @@ Methods +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`scenario_set_reflection_atlas_size` **(** :ref:`RID` scenario, :ref:`int` size, :ref:`int` subdiv **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** | +| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -638,6 +638,8 @@ Methods +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_allocate` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` depth_3d, :ref:`Format` format, :ref:`TextureType` type, :ref:`int` flags=7 **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_bind` **(** :ref:`RID` texture, :ref:`int` number **)** | ++---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create` **(** **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create_from_image` **(** :ref:`Image` image, :ref:`int` flags=7 **)** | @@ -1645,7 +1647,7 @@ enum **EnvironmentBG**: - **ENV_BG_KEEP** = **5** -- **ENV_BG_MAX** = **6** +- **ENV_BG_MAX** = **7** .. _enum_VisualServer_EnvironmentDOFBlurQuality: @@ -3158,9 +3160,9 @@ The callback method must use only 1 argument which will be called with 'userdata .. _class_VisualServer_method_set_boot_image: -- void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** +- void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** -Sets a boot image. The color defines the background color and if scale is ``true`` the image will be scaled to fit the screen size. +Sets a boot image. The color defines the background color. If ``scale`` is ``true``, the image will be scaled to fit the screen size. If ``use_filter`` is ``true``, the image will be scaled with linear interpolation. If ``use_filter`` is ``false``, the image will be scaled with nearest-neighbor interpolation. .. _class_VisualServer_method_set_debug_generate_wireframes: @@ -3258,6 +3260,12 @@ Sets a sky's texture. - void **texture_allocate** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` depth_3d, :ref:`Format` format, :ref:`TextureType` type, :ref:`int` flags=7 **)** +.. _class_VisualServer_method_texture_bind: + +- void **texture_bind** **(** :ref:`RID` texture, :ref:`int` number **)** + +Binds the texture to a texture slot. + .. _class_VisualServer_method_texture_create: - :ref:`RID` **texture_create** **(** **)**