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:
Rbanh committed 2026-07-12 00:24:06 -04:00
1 parent 0553a85220
commit 0798aa5d57
169 files changed
+27098 -3469

No files matched your search

+28 -12
View File
@@ -4,23 +4,37 @@ use avian3d::prelude::*;
use bevy::prelude::*;
use crate::{
inspector_component_active, AuthoringRigidBody, ColliderDesc, ColliderShapeDesc,
InspectorOrder, LevelObject, PhysicsBody, RigidBodyDesc, COMPONENT_COLLIDER_DESC,
COMPONENT_PHYSICS_BODY, COMPONENT_RIGID_BODY_DESC,
authoring_component_active, AuthoringComponentStates, AuthoringRigidBody, ColliderDesc,
ColliderShapeDesc, InspectorOrder, LevelObject, PhysicsBody, RigidBodyDesc,
COMPONENT_COLLIDER_DESC, COMPONENT_PHYSICS_BODY, COMPONENT_RIGID_BODY_DESC,
};
#[allow(clippy::type_complexity)]
pub fn hydrate_physics(
mut commands: Commands,
physics: Query<
(Entity, &PhysicsBody, Option<&InspectorOrder>),
(
Entity,
&PhysicsBody,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
(
With<LevelObject>,
Or<(Changed<PhysicsBody>, Changed<InspectorOrder>)>,
Or<(
Changed<PhysicsBody>,
Changed<AuthoringComponentStates>,
Changed<InspectorOrder>,
)>,
),
>,
new_physics: Query<
(Entity, &PhysicsBody, Option<&InspectorOrder>),
(
Entity,
&PhysicsBody,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
(With<LevelObject>, Added<PhysicsBody>),
>,
split_physics: Query<
@@ -28,6 +42,7 @@ pub fn hydrate_physics(
Entity,
Option<&RigidBodyDesc>,
Option<&ColliderDesc>,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
(
@@ -37,13 +52,14 @@ pub fn hydrate_physics(
Added<RigidBodyDesc>,
Changed<ColliderDesc>,
Added<ColliderDesc>,
Changed<AuthoringComponentStates>,
Changed<InspectorOrder>,
)>,
),
>,
) {
for (entity, body, order) in new_physics.iter().chain(physics.iter()) {
if !inspector_component_active(order, COMPONENT_PHYSICS_BODY) {
for (entity, body, states, legacy_order) in new_physics.iter().chain(physics.iter()) {
if !authoring_component_active(states, legacy_order, COMPONENT_PHYSICS_BODY) {
commands
.entity(entity)
.remove::<RigidBody>()
@@ -63,12 +79,12 @@ pub fn hydrate_physics(
.insert((rigid_body, body.collider.clone()));
}
for (entity, rigid_body, collider, order) in &split_physics {
for (entity, rigid_body, collider, states, legacy_order) in &split_physics {
let mut entity_commands = commands.entity(entity);
entity_commands.remove::<RigidBody>().remove::<Collider>();
if let Some(rigid_body) =
rigid_body.filter(|_| inspector_component_active(order, COMPONENT_RIGID_BODY_DESC))
if let Some(rigid_body) = rigid_body
.filter(|_| authoring_component_active(states, legacy_order, COMPONENT_RIGID_BODY_DESC))
{
entity_commands.insert(rigid_body_from_desc(rigid_body.body));
}
@@ -76,7 +92,7 @@ pub fn hydrate_physics(
let Some(collider) = collider else {
continue;
};
if !inspector_component_active(order, COMPONENT_COLLIDER_DESC) {
if !authoring_component_active(states, legacy_order, COMPONENT_COLLIDER_DESC) {
continue;
}
if !collider.enabled || matches!(collider.shape, ColliderShapeDesc::StaticMesh { .. }) {