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

+36 -8
View File
@@ -4,8 +4,8 @@ use bevy::light::CascadeShadowConfig;
use bevy::prelude::*;
use settings::ProjectSettings;
use shared::{
cascade_config_from_rendering, inspector_component_active, AuthoringLightKind, InspectorOrder,
LevelObject, LightDesc, ProjectSun, COMPONENT_LIGHT_DESC,
authoring_component_active, cascade_config_from_rendering, AuthoringComponentStates,
AuthoringLightKind, InspectorOrder, LevelObject, LightDesc, ProjectSun, COMPONENT_LIGHT_DESC,
};
/// Spawns the directional "sun" from project rendering settings.
@@ -14,7 +14,14 @@ pub fn spawn_sun(
mut commands: Commands,
settings: Res<ProjectSettings>,
existing: Query<(), With<DirectionalLight>>,
scene_suns: Query<(&LightDesc, Option<&InspectorOrder>), With<LevelObject>>,
scene_suns: Query<
(
&LightDesc,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
With<LevelObject>,
>,
) {
if !existing.is_empty() {
return;
@@ -39,7 +46,14 @@ pub fn spawn_sun(
#[unsafe(no_mangle)]
pub fn sync_project_sun_visibility(
scene_suns: Query<(&LightDesc, Option<&InspectorOrder>), With<LevelObject>>,
scene_suns: Query<
(
&LightDesc,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
With<LevelObject>,
>,
mut project_suns: Query<(&mut DirectionalLight, &mut Visibility), With<ProjectSun>>,
) {
let scene_override = has_scene_sun_override(&scene_suns);
@@ -54,10 +68,17 @@ pub fn sync_project_sun_visibility(
}
fn has_scene_sun_override(
scene_suns: &Query<(&LightDesc, Option<&InspectorOrder>), With<LevelObject>>,
scene_suns: &Query<
(
&LightDesc,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
With<LevelObject>,
>,
) -> bool {
scene_suns.iter().any(|(light, order)| {
inspector_component_active(order, COMPONENT_LIGHT_DESC)
scene_suns.iter().any(|(light, states, legacy_order)| {
authoring_component_active(states, legacy_order, COMPONENT_LIGHT_DESC)
&& matches!(light.kind, AuthoringLightKind::Directional)
})
}
@@ -99,7 +120,14 @@ pub fn sync_scene_directional_shadow_cascades(
#[unsafe(no_mangle)]
pub fn sync_project_sun_from_settings(
settings: Res<ProjectSettings>,
scene_suns: Query<(&LightDesc, Option<&InspectorOrder>), With<LevelObject>>,
scene_suns: Query<
(
&LightDesc,
Option<&AuthoringComponentStates>,
Option<&InspectorOrder>,
),
With<LevelObject>,
>,
mut project_suns: Query<(&mut DirectionalLight, &mut Visibility), With<ProjectSun>>,
) {
let scene_override = has_scene_sun_override(&scene_suns);