1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
use *;
use Rect;
use crateRatatuiCameraStrategy;
/// Spawn this component with your bevy camera in order to send each frame's rendered image to
/// a RatatuiCameraWidget that will be inserted into the same camera entity.
///
/// Example:
///
/// ```no_run
/// # use bevy::prelude::*;
/// # use bevy_ratatui_camera::RatatuiCamera;
/// #
/// # fn setup_scene_system(mut commands: Commands) {
/// commands.spawn((
/// RatatuiCamera::default(),
/// Camera3d::default(),
/// ));
/// # };
/// ```
///
/// When within a camera entity alongside a RatatuiCamera, the depth prepass texture will copied
/// back from the GPU each frame and will be used to update a depth buffer held on the associated
/// RatatuiCameraWidget. This depth buffer can be used to achieve occlusion effects by skipping
/// terminal buffer cell draws based on depth comparisons.
;
/// Component representing the area that the camera entity's widget was rendered within last frame.
/// Used internally for triggering resizes, and translating buffer coordinates to bevy coordinates.
;
/// Bevy relation that allows you to create subcameras that render to a main camera's render
/// texture instead of creating their own. When `RatatuiSubcamera` is within into a camera entity
/// (instead of a `RatatuiCamera`), rather than creating its own render texture for unicode
/// conversion, this camera will render to the texture of the RatatuiCamera main camera entity
/// indicated by the relation. The composite render from both cameras will then be converted to
/// unicode as one image.
///
/// Example:
///
/// ```no_run
/// # use bevy::prelude::*;
/// # use bevy_ratatui_camera::{RatatuiCamera, RatatuiSubcameras};
/// #
/// # #[derive(Component)]
/// # pub struct POVCamera;
/// # #[derive(Component)]
/// # pub struct FXCamera;
/// #
/// # fn setup_scene_system(mut commands: Commands) {
/// commands.spawn((
/// RatatuiCamera::default(),
/// Camera3d::default(),
/// related!(RatatuiSubcameras[
/// (Camera3d::default(), POVCamera),
/// (Camera3d::default(), FXCamera),
/// ]),
/// ));
/// # };
/// ```
///
;
/// Bevy relation target for subcameras that will render to this camera entity's render target.
;
/// System set for the systems that perform this crate's functionality. Because important pieces of
/// this crate's functionality are provided by components that are not added by the user directly,
/// but are inserted and updated by this crate's observers and message handlers (e.g.
/// RatatuiCameraWidget), it is important to order your systems relative to this system set to make
/// sure certain components are present and up-to-date.
///
/// System set that runs in the [First] schedule, for the systems that create the
/// RatatuiCameraWidget components each frame, retrieve rendered images from the GPU, and keep the
/// mechanisms for performing that retrieval up-to-date (e.g. after resizes).
;