Z-order via position.z and reset-to-default for asset properties

- Position is now { x, y, z }; higher z draws on top, ties keep hierarchy order
- Viewport sorts the objects layer deterministically (syncDrawOrder)
- Inspector shows a Z field; asset properties that differ from the schema
  default are marked bold with a reset button (ResetAssetPropertyCommand)
- isModified() helper, unit tests, E2E checks and seed updated

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-07 11:42:18 +02:00
1 parent aaa8154adf
commit d4b1ffa051
18 files changed
+232 -63

No files matched your search

+11
View File
@@ -33,6 +33,17 @@ export function isOverridden(object: SceneObject, key: string): boolean {
return object.overrides[key] !== undefined;
}
/**
* Whether the asset's own value for `key` differs from the schema default – the asset-level
* counterpart of an override. The inspector highlights such values and offers a reset.
*/
export function isModified(asset: Asset, key: string): boolean {
const def = schemaFor(asset.type).find((d) => d.key === key);
if (!def) return false;
const own = asset.props[key];
return own !== undefined && own !== def.default;
}
/** Value the object would have without its override for `key` (the asset's value). */
export function inheritedValue(asset: Asset, key: string): PropertyValue | undefined {
return resolveAssetProps(asset)[key];