concinnity_core/components/model_renderer.rs
1// src/components/model_renderer.rs
2
3use crate::ecs::asset_id::AssetId;
4
5/// Multi-mesh render description for an entity: a `Model` whose sub-meshes all
6/// share this entity's transform, each with its own material.
7///
8/// Runtime-only. Mutually exclusive with `MeshRenderer` on an entity.
9#[derive(Debug, Clone)]
10pub struct ModelRenderer {
11 /// The `Model` to render.
12 pub model: AssetId,
13 /// View-distance cutoff in world units; 0 keeps the draw visible at any
14 /// distance.
15 pub cull_distance: f32,
16}
17
18impl Default for ModelRenderer {
19 fn default() -> Self {
20 Self {
21 model: AssetId::default(),
22 cull_distance: 0.0,
23 }
24 }
25}