Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 27, 2025

BuildingObjects with the HasShadows flag require special rendering: Part 1 (shadow images 4-7) must render before Part 0 (base images 0-3) so shadows appear below the building.

Changes

  • BuildingComponentsViewModel: Added BuildingFlags property and logic to reorder variation parts when HasShadows is set. Swaps first two parts (base and shadow) while preserving remaining parts.

  • ImageTableViewModel: Extended constructor to accept and forward BuildingObjectFlags to BuildingComponentsViewModel.

  • ObjectEditorViewModel: Extracts building flags from BuildingObject and passes them through the view model chain.

Example

// Without HasShadows: renders parts in order [0, 1, 2]
// With HasShadows: renders parts as [1, 0, 2] - shadows first, then base, then additional parts
if (hasShadows && variation.Count >= minPartsForShadowReordering)
{
    reorderedVariation = [variation[shadowPartIndex], variation[basePartIndex], .. variation.Skip(minPartsForShadowReordering)];
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll s/Objects/Building/BuildingComponentsViewModel.cs (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

In the GUI solution there is a set of viewmodels for the BuildingObject, notable BuildingViewModel. It supports viewing the complex structure of the images and variations. One special case that needs to be taken care of is if the BuildingObject it is a viewmodel for has a flag specifically with the "HasShadows" value. If this flag is set, then the rendering of the building should take this into account. If the object has shadows, the first 4 images are the base layer (and only layer) and the second 4 images are the shadows, which should be rendered first/below the base layer


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 27, 2025 13:50
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add shadow rendering support for BuildingViewModel Support HasShadows flag in BuildingComponentsViewModel rendering Dec 27, 2025
Copilot AI requested a review from LeftofZen December 27, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants