lights & world: derive Clone for PointLight and World.

This commit is contained in:
Bill Thiede 2021-07-18 11:14:44 -07:00
parent 967920e1fa
commit 94ea724344
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
use crate::tuples::{Color, Tuple};
#[derive(Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq)]
pub struct PointLight {
pub position: Tuple,
pub intensity: Color,

View File

@ -20,7 +20,7 @@ use crate::{
/// assert_eq!(w.light, None);
/// ```
#[derive(Debug, Default)]
#[derive(Clone, Debug, Default)]
pub struct World {
// TODO(wathiede): make this a list of abstract Light traits.
pub light: Option<PointLight>,