diff options
author | HampusM <hampus@hampusmat.com> | 2024-05-07 19:55:49 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-05-07 19:55:49 +0200 |
commit | 6c2dbb854145979662bd8c58ad999cc5a87dfe1f (patch) | |
tree | 9c0b3718eb2d56e6f1580234fdcd9d665ad8d9ba | |
parent | 5013c63cf727eaa94c30f2680163a9f868aafb6e (diff) |
feat(engine): add material builder function adding a single texture
-rw-r--r-- | engine/src/material.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engine/src/material.rs b/engine/src/material.rs index 69fe970..c896084 100644 --- a/engine/src/material.rs +++ b/engine/src/material.rs @@ -156,6 +156,14 @@ impl Builder } #[must_use] + pub fn texture(mut self, texture: Texture) -> Self + { + self.textures.push(texture); + + self + } + + #[must_use] pub fn shininess(mut self, shininess: f32) -> Self { self.shininess = shininess; |