From b0315b7ebc16fcbae6c3098db6c824f9057d2a71 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 20 Nov 2023 22:00:34 +0100 Subject: feat(engine): add materials --- engine/src/vector.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'engine/src/vector.rs') diff --git a/engine/src/vector.rs b/engine/src/vector.rs index a5ef911..e0aa262 100644 --- a/engine/src/vector.rs +++ b/engine/src/vector.rs @@ -226,6 +226,20 @@ where } } +impl From for Vec3 +where + Value: Clone, +{ + fn from(value: Value) -> Self + { + Self { + x: value.clone(), + y: value.clone(), + z: value, + } + } +} + impl From> for Vec3 { fn from(color: Color) -> Self -- cgit v1.2.3-18-g5258