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
//! Program runtime.

use crate::{
    dom::Tree,
    render::{Attribute, Settings, Shader},
};

/// Program runtime data.
pub struct Input<'a> {
    /// Simulation settings.
    pub settings: Settings,
    /// Aesthetic settings.
    pub shader: Shader<'a>,
    /// Scene hierarchy.
    pub tree: Tree<'a, Attribute<'a>>,
}

impl<'a> Input<'a> {
    /// Construct a new instance.
    #[inline]
    #[must_use]
    pub const fn new(settings: Settings, shader: Shader<'a>, tree: Tree<'a, Attribute>) -> Self {
        Self {
            settings,
            shader,
            tree,
        }
    }
}