Improve the CameraServer and CameraFeed class documentations
This closes https://github.com/godotengine/godot-docs/issues/3255.
This commit is contained in:
parent
c44de001de
commit
73ec2c6ece
@ -4,7 +4,7 @@
|
|||||||
A camera feed gives you access to a single physical camera attached to your device.
|
A camera feed gives you access to a single physical camera attached to your device.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<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.
|
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. See also [CameraServer].
|
||||||
[b]Note:[/b] 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.
|
[b]Note:[/b] 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.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<description>
|
<description>
|
||||||
The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
|
The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
|
||||||
It is notably used to provide AR modules with a video feed from the camera.
|
It is notably used to provide AR modules with a video feed from the camera.
|
||||||
|
[b]Note:[/b] This class is currently only implemented on macOS and iOS. On other platforms, no [CameraFeed]s will be available.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
@ -14,7 +15,7 @@
|
|||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="feed" type="CameraFeed" />
|
<argument index="0" name="feed" type="CameraFeed" />
|
||||||
<description>
|
<description>
|
||||||
Adds a camera feed to the camera server.
|
Adds the camera [code]feed[/code] to the camera server.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="feeds">
|
<method name="feeds">
|
||||||
@ -27,7 +28,7 @@
|
|||||||
<return type="CameraFeed" />
|
<return type="CameraFeed" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Returns the [CameraFeed] with this id.
|
Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_feed_count">
|
<method name="get_feed_count">
|
||||||
@ -40,7 +41,7 @@
|
|||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="feed" type="CameraFeed" />
|
<argument index="0" name="feed" type="CameraFeed" />
|
||||||
<description>
|
<description>
|
||||||
Removes a [CameraFeed].
|
Removes the specified camera [code]feed[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
@ -48,13 +49,13 @@
|
|||||||
<signal name="camera_feed_added">
|
<signal name="camera_feed_added">
|
||||||
<argument index="0" name="id" type="int" />
|
<argument index="0" name="id" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Emitted when a [CameraFeed] is added (e.g. webcam is plugged in).
|
Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in).
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="camera_feed_removed">
|
<signal name="camera_feed_removed">
|
||||||
<argument index="0" name="id" type="int" />
|
<argument index="0" name="id" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Emitted when a [CameraFeed] is removed (e.g. webcam is unplugged).
|
Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged).
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
@ -63,7 +64,7 @@
|
|||||||
The RGBA camera image.
|
The RGBA camera image.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
|
<constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
|
||||||
The YCbCr camera image.
|
The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
|
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
|
||||||
The Y component camera image.
|
The Y component camera image.
|
||||||
|
Loading…
Reference in New Issue
Block a user