use crate::math::Color;
use crate::textures::Texture;
use std::sync::Arc;
#[derive(Debug, Clone)]
pub struct PointsMaterial {
pub color: Color,
pub opacity: f32,
pub alpha_test: f32,
pub transparent: Option<bool>,
pub size: f32,
pub size_attenuation: bool,
pub map: Option<Arc<Texture>>,
pub alpha_map: Option<Arc<Texture>>,
pub tone_mapped: bool,
pub render_state: super::RenderState,
}
impl Default for PointsMaterial {
fn default() -> Self {
Self {
color: Color::WHITE,
opacity: 1.0,
alpha_test: 0.0,
transparent: None,
size: 1.0,
size_attenuation: true,
map: None,
alpha_map: None,
tone_mapped: true,
render_state: super::RenderState::default(),
}
}
}
impl PointsMaterial {
pub fn new(color: Color, size: f32) -> Self {
Self {
color,
size,
..Default::default()
}
}
}