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
use crate::types::*;
use derive_new::new;
use derive_setters::Setters;
use serde::{Deserialize, Serialize};
define_node!(
/// The `Background` node defines the background used for rendering the 3D world.
///
/// See [Webots Reference](https://cyberbotics.com/doc/reference/background?version=R2025a).
Background {
/// Color of the sky when no texture is present.
/// Default: [0 0 0]
sky_color: MFColor,
/// Texture URL for the back face of the skybox.
/// Default: []
back_url: MFString,
/// Texture URL for the bottom face of the skybox.
/// Default: []
bottom_url: MFString,
/// Texture URL for the front face of the skybox.
/// Default: []
front_url: MFString,
/// Texture URL for the left face of the skybox.
/// Default: []
left_url: MFString,
/// Texture URL for the right face of the skybox.
/// Default: []
right_url: MFString,
/// Texture URL for the top face of the skybox.
/// Default: []
top_url: MFString,
/// Irradiance texture URL for the back face.
/// Default: []
back_irradiance_url: MFString,
/// Irradiance texture URL for the bottom face.
/// Default: []
bottom_irradiance_url: MFString,
/// Irradiance texture URL for the front face.
/// Default: []
front_irradiance_url: MFString,
/// Irradiance texture URL for the left face.
/// Default: []
left_irradiance_url: MFString,
/// Irradiance texture URL for the right face.
/// Default: []
right_irradiance_url: MFString,
/// Irradiance texture URL for the top face.
/// Default: []
top_irradiance_url: MFString,
/// Luminosity scale factor.
/// Default: 1.0
luminosity: SFFloat,
});
define_node!(
/// The `Fog` node simulates atmospheric effects.
///
/// See [Webots Reference](https://cyberbotics.com/doc/reference/fog?version=R2025a).
Fog {
/// Color of the fog.
/// Default: 1 1 1
color: SFColor,
/// Type of fog ("LINEAR", "EXPONENTIAL", "EXPONENTIAL2").
/// Default: "LINEAR"
fog_type: SFString,
/// Distance at which objects are totally obscured.
/// Default: 0.0
visibility_range: SFFloat,
});
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_environment_new() {
assert!(Background::new().luminosity.is_none());
assert!(Fog::new().fog_type.is_none());
}
}