Build renderer and material component foundations
Add dedicated skinned rendering, pose restoration, shared Material and Material Instance slots, registry-driven components, Surface/Solari integration, transactional schema upgrades, navigation authoring, documentation, and evaluation evidence.
This commit is contained in:
1 parent
0553a85220
commit
0798aa5d57
169 files changed
+27098
-3469
No files matched your search
@@ -9,9 +9,10 @@ use bevy::mesh::{Indices, PrimitiveTopology};
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::{
|
||||
asset_server_path, brush_math::validate_brush, inspector_component_active, BrushDesc,
|
||||
BrushFaceDesc, ColliderDesc, InspectorOrder, LevelObject, MaterialAsset, MaterialDesc,
|
||||
COMPONENT_BRUSH_DESC, COMPONENT_COLLIDER_DESC, COMPONENT_MATERIAL_DESC,
|
||||
asset_server_path, authoring_component_active, brush_math::validate_brush,
|
||||
AuthoringComponentStates, BrushDesc, BrushFaceDesc, ColliderDesc, InspectorOrder, LevelObject,
|
||||
MaterialAsset, MaterialDesc, COMPONENT_BRUSH_DESC, COMPONENT_COLLIDER_DESC,
|
||||
COMPONENT_MATERIAL_DESC,
|
||||
};
|
||||
|
||||
use super::materials::material_from_desc;
|
||||
@@ -33,6 +34,7 @@ pub fn hydrate_brushes(
|
||||
&BrushDesc,
|
||||
Option<&MaterialDesc>,
|
||||
Option<&ColliderDesc>,
|
||||
Option<&AuthoringComponentStates>,
|
||||
Option<&InspectorOrder>,
|
||||
),
|
||||
(
|
||||
@@ -42,6 +44,7 @@ pub fn hydrate_brushes(
|
||||
Changed<BrushDesc>,
|
||||
Changed<MaterialDesc>,
|
||||
Changed<ColliderDesc>,
|
||||
Changed<AuthoringComponentStates>,
|
||||
Changed<InspectorOrder>,
|
||||
)>,
|
||||
),
|
||||
@@ -49,9 +52,9 @@ pub fn hydrate_brushes(
|
||||
children: Query<&Children>,
|
||||
generated_brushes: Query<(), With<HydratedBrushMesh>>,
|
||||
) {
|
||||
for (entity, brush, material, collider, order) in &brushes {
|
||||
for (entity, brush, material, collider, states, legacy_order) in &brushes {
|
||||
despawn_brush_mesh(&mut commands, entity, &children, &generated_brushes);
|
||||
if !inspector_component_active(order, COMPONENT_BRUSH_DESC) {
|
||||
if !authoring_component_active(states, legacy_order, COMPONENT_BRUSH_DESC) {
|
||||
continue;
|
||||
}
|
||||
spawn_brush_mesh(
|
||||
@@ -61,8 +64,12 @@ pub fn hydrate_brushes(
|
||||
&mut materials,
|
||||
entity,
|
||||
brush,
|
||||
material.filter(|_| inspector_component_active(order, COMPONENT_MATERIAL_DESC)),
|
||||
collider.filter(|_| inspector_component_active(order, COMPONENT_COLLIDER_DESC)),
|
||||
material.filter(|_| {
|
||||
authoring_component_active(states, legacy_order, COMPONENT_MATERIAL_DESC)
|
||||
}),
|
||||
collider.filter(|_| {
|
||||
authoring_component_active(states, legacy_order, COMPONENT_COLLIDER_DESC)
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user