pub struct TimeOfDay {
pub hour: f32,
}Expand description
The hour of the day the scene shows (core.time_of_day, a world resource), 0 to 24 (24 is midnight again): the hour a
lowering chose for a scene whose source varies over the day (its environment stored at several hours, a program’s
material keyed by the hour), the program’s hour where it chose one, else the source’s stated default, counted where
it is a default. A program of the source reads it as crate::shader::FrameParameter::TimeOfDay. A world no
lowering chose an hour for has none, and a consumer gives such a program no hour.
Fields§
§hour: f32Hours since midnight; finite, 0 to 24.
Trait Implementations§
impl Copy for TimeOfDay
Source§impl Resource for TimeOfDay
impl Resource for TimeOfDay
const NAME: &'static str = "core.time_of_day"
const VERSION: u32 = 1
Source§fn references(&self, _out: &mut Vec<Entity>)
fn references(&self, _out: &mut Vec<Entity>)
The entities this resource refers to, appended to
out. A resource holding entity references must declare
every one of them and implement Resource::retain_references.Source§fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
Forget every reference to an entity
keep refuses (set it to “none”). The world calls it whenever entities
leave it (World::despawn, World::retain, World::move_components) and on the copy a
World::subset or World::split_off part gets, so a resource never refers to an entity its world lacks.impl StructuralPartialEq for TimeOfDay
Auto Trait Implementations§
impl Forget for TimeOfDay
impl Freeze for TimeOfDay
impl RefUnwindSafe for TimeOfDay
impl Send for TimeOfDay
impl Sync for TimeOfDay
impl Unpin for TimeOfDay
impl UnsafeUnpin for TimeOfDay
impl UnwindSafe for TimeOfDay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more