21 lines
669 B
Rust
21 lines
669 B
Rust
use crate::Arena;
|
|
use anyhow::Result;
|
|
use shared::{core::texture::TextureMapping3D, textures::WindyTexture, utils::Transform};
|
|
|
|
use crate::{
|
|
core::texture::{CreateFloatTexture, CreateTextureMapping, FloatTexture},
|
|
utils::{FileLoc, TextureParameterDictionary},
|
|
};
|
|
|
|
impl CreateFloatTexture for WindyTexture {
|
|
fn create(
|
|
render_from_texture: Transform,
|
|
parameters: TextureParameterDictionary,
|
|
loc: FileLoc,
|
|
_arena: &Arena,
|
|
) -> Result<FloatTexture> {
|
|
let map = TextureMapping3D::create(¶meters, &render_from_texture, &loc)?;
|
|
let tex = WindyTexture::new(map);
|
|
Ok(FloatTexture::Windy(tex))
|
|
}
|
|
}
|